[asterisk-commits] mjordan: branch 12 r403823 - /branches/12/channels/pjsip/dialplan_functions.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Dec 14 19:38:21 CST 2013


Author: mjordan
Date: Sat Dec 14 19:38:16 2013
New Revision: 403823

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403823
Log:
pjsip/dialplan_functions: Use the right buffer length when printing URIs

While entertaining, sizeof(buflen) is not the same as buflen. Doh.

Modified:
    branches/12/channels/pjsip/dialplan_functions.c

Modified: branches/12/channels/pjsip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/pjsip/dialplan_functions.c?view=diff&rev=403823&r1=403822&r2=403823
==============================================================================
--- branches/12/channels/pjsip/dialplan_functions.c (original)
+++ branches/12/channels/pjsip/dialplan_functions.c Sat Dec 14 19:38:16 2013
@@ -582,15 +582,15 @@
 	if (!strcmp(type, "secure")) {
 		snprintf(buf, buflen, "%u", dlg->secure ? 1 : 0);
 	} else if (!strcmp(type, "target_uri")) {
-		pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->target, buf, sizeof(buflen));
+		pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->target, buf, buflen);
 		buf_copy = ast_strdupa(buf);
 		ast_escape_quoted(buf_copy, buf, buflen);
 	} else if (!strcmp(type, "local_uri")) {
-		pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri, buf, sizeof(buflen));
+		pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri, buf, buflen);
 		buf_copy = ast_strdupa(buf);
 		ast_escape_quoted(buf_copy, buf, buflen);
 	} else if (!strcmp(type, "remote_uri")) {
-		pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->remote.info->uri, buf, sizeof(buflen));
+		pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->remote.info->uri, buf, buflen);
 		buf_copy = ast_strdupa(buf);
 		ast_escape_quoted(buf_copy, buf, buflen);
 	} else if (!strcmp(type, "t38state")) {




More information about the asterisk-commits mailing list