[asterisk-commits] trunk r18309 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 7 09:28:52 MST 2006


Author: russell
Date: Fri Apr  7 11:28:50 2006
New Revision: 18309

URL: http://svn.digium.com/view/asterisk?rev=18309&view=rev
Log:
change a couple uses of !strlen() to ast_strlen_zero().  Oddly enough, one of
these used to be this way and got changed ...

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=18309&r1=18308&r2=18309&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr  7 11:28:50 2006
@@ -13514,7 +13514,7 @@
 	if (!host) {
 		char *localtmp;
 		ast_copy_string(tmp, get_header(&p->initreq, "To"), sizeof(tmp));
-		if (!strlen(tmp)) {
+		if (ast_strlen_zero(tmp)) {
 			ast_log(LOG_ERROR, "Cannot retrieve the 'To' header from the original SIP request!\n");
 			return 0;
 		}
@@ -13525,7 +13525,7 @@
 			localtmp++;
 			/* This is okey because lhost and lport are as big as tmp */
 			sscanf(localtmp, "%[^<>:; ]:%[^<>:; ]", lhost, lport);
-			if (!strlen(lhost)) {
+			if (ast_strlen_zero(lhost)) {
 				ast_log(LOG_ERROR, "Can't find the host address\n");
 				return 0;
 			}



More information about the asterisk-commits mailing list