[Asterisk-cvs] asterisk/channels chan_sip.c,1.284,1.285

markster at lists.digium.com markster at lists.digium.com
Sun Feb 1 17:46:35 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv16337/channels

Modified Files:
	chan_sip.c 
Log Message:
If unregistered, don't consider it valid (bug #956)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -d -r1.284 -r1.285
--- chan_sip.c	26 Jan 2004 19:12:23 -0000	1.284
+++ chan_sip.c	1 Feb 2004 23:55:17 -0000	1.285
@@ -844,7 +844,8 @@
 					r->sa.sin_port = p->defaddr.sin_port;
 				}
 				memcpy(&r->recv, &r->sa, sizeof(r->recv));
-			}
+			} else
+				p = NULL;
 	}
 	ast_mutex_unlock(&peerl.lock);
 	if (!p && !found) {
@@ -5663,7 +5664,7 @@
 	strncpy(name, peer->name, sizeof(name) - 1);
 	peer->lastmsgssent = ((newmsgs << 8) | (oldmsgs));
 	ast_mutex_unlock(&peerl.lock);
-	if (create_addr(p, name) || !p->sa.sin_addr.s_addr || !p->sa.sin_port) {
+	if (create_addr(p, name)) {
 		/* Maybe they're not registered, etc. */
 		sip_destroy(p);
 		return 0;




More information about the svn-commits mailing list