[asterisk-commits] seanbright: branch group/1.6.1-maintenance r265977 - in /team/group/1.6.1-mai...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 26 11:42:27 CDT 2010


Author: seanbright
Date: Wed May 26 11:42:25 2010
New Revision: 265977

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=265977
Log:
Merged revisions 265449,265451 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r265449 | mmichelson | 2010-05-24 17:44:30 -0400 (Mon, 24 May 2010) | 11 lines
  
  Allow type=user SIP endpoints to be loaded properly from realtime.
  
  (closes issue #16021)
  Reported by: Guggemand
  Patches:
        realtime-type-fix.patch uploaded by Guggemand (license 897)
  	  (altered by me slightly to avoid ref leaks)
  Tested by: Guggemand
........
  r265451 | mmichelson | 2010-05-24 18:05:15 -0400 (Mon, 24 May 2010) | 8 lines
  
  Print openh323 log to the Asterisk console.
  
  (closes issue #17109)
  Reported by: under
  Patches:
        logstream.diff uploaded by under (license 914)
........

Modified:
    team/group/1.6.1-maintenance/   (props changed)
    team/group/1.6.1-maintenance/channels/chan_sip.c
    team/group/1.6.1-maintenance/channels/h323/ast_h323.cxx

Propchange: team/group/1.6.1-maintenance/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: team/group/1.6.1-maintenance/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/channels/chan_sip.c?view=diff&rev=265977&r1=265976&r2=265977
==============================================================================
--- team/group/1.6.1-maintenance/channels/chan_sip.c (original)
+++ team/group/1.6.1-maintenance/channels/chan_sip.c Wed May 26 11:42:25 2010
@@ -4470,17 +4470,7 @@
 	}
 
 	for (tmp = var; tmp; tmp = tmp->next) {
-		/* If this is type=user, then skip this object. */
-		if (!strcasecmp(tmp->name, "type") &&
-		    !strcasecmp(tmp->value, "user")) {
-			if(peerlist)
-				ast_config_destroy(peerlist);
-			else {
-				ast_variables_destroy(var);
-				ast_variables_destroy(varregs);
-			}
-			return NULL;
-		} else if (!newpeername && !strcasecmp(tmp->name, "name")) {
+		if (!newpeername && !strcasecmp(tmp->name, "name")) {
 			newpeername = tmp->value;
 		}
 	}
@@ -4612,8 +4602,27 @@
 		}
 	}
 
-	if (!p && (realtime || devstate_only))
+	if (!p && (realtime || devstate_only)) {
 		p = realtime_peer(peer, sin, devstate_only);
+		if (p) {
+			switch (which_objects) {
+			case FINDUSERS:
+				if (!(p->type & SIP_TYPE_USER)) {
+					unref_peer(p, "Wrong type of realtime SIP endpoint");
+					return NULL;
+				}
+				break;
+			case FINDPEERS:
+				if (!(p->type & SIP_TYPE_PEER)) {
+					unref_peer(p, "Wrong type of realtime SIP endpoint");
+					return NULL;
+				}
+				break;
+			case FINDALLDEVICES:
+				break;
+			}
+		}
+	}
 
 	return p;
 }

Modified: team/group/1.6.1-maintenance/channels/h323/ast_h323.cxx
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/channels/h323/ast_h323.cxx?view=diff&rev=265977&r1=265976&r2=265977
==============================================================================
--- team/group/1.6.1-maintenance/channels/h323/ast_h323.cxx (original)
+++ team/group/1.6.1-maintenance/channels/h323/ast_h323.cxx Wed May 26 11:42:25 2010
@@ -2256,6 +2256,7 @@
 {
 	channelsOpen = 0;
 	logstream = new PAsteriskLog();
+	PTrace::SetStream(logstream); 
 	endPoint = new MyH323EndPoint();
 }
 
@@ -2671,6 +2672,7 @@
 	close(_timerChangePipe[1]);
 #endif
 	if (logstream) {
+		PTrace::SetStream(NULL);
 		delete logstream;
 		logstream = NULL;
 	}




More information about the asterisk-commits mailing list