[asterisk-commits] mjordan: trunk r403824 - in /trunk: ./ channels/pjsip/dialplan_functions.c

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


Author: mjordan
Date: Sat Dec 14 19:39:20 2013
New Revision: 403824

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

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

Merged revisions 403823 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/channels/pjsip/dialplan_functions.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/channels/pjsip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/pjsip/dialplan_functions.c?view=diff&rev=403824&r1=403823&r2=403824
==============================================================================
--- trunk/channels/pjsip/dialplan_functions.c (original)
+++ trunk/channels/pjsip/dialplan_functions.c Sat Dec 14 19:39:20 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