[Asterisk-cvs] asterisk/channels chan_sip.c,1.781,1.782

kpfleming at lists.digium.com kpfleming at lists.digium.com
Tue Jul 19 19:48:22 CDT 2005


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

Modified Files:
	chan_sip.c 
Log Message:
simple fix for bug #3638


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.781
retrieving revision 1.782
diff -u -d -r1.781 -r1.782
--- chan_sip.c	15 Jul 2005 23:00:46 -0000	1.781
+++ chan_sip.c	19 Jul 2005 23:55:43 -0000	1.782
@@ -6221,12 +6221,13 @@
 	} else
 		of += 4;
 	/* Get just the username part */
-	if ((c = strchr(of, '@')))
-		*c = '\0';
-	if ((c = strchr(of, ':')))
+	if ((c = strchr(of, '@'))) {
 		*c = '\0';
-	ast_copy_string(p->cid_num, of, sizeof(p->cid_num));
-	ast_shrink_phone_number(p->cid_num);
+		if ((c = strchr(of, ':')))
+			*c = '\0';
+		ast_copy_string(p->cid_num, of, sizeof(p->cid_num));
+		ast_shrink_phone_number(p->cid_num);
+	}
 	if (*calleridname)
 		ast_copy_string(p->cid_name, calleridname, sizeof(p->cid_name));
 	if (ast_strlen_zero(of))




More information about the svn-commits mailing list