[asterisk-commits] seanbright: branch 11 r383668 - in /branches/11: ./ res/res_config_curl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 25 07:36:37 CDT 2013


Author: seanbright
Date: Mon Mar 25 07:36:33 2013
New Revision: 383668

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383668
Log:
Properly delimit post data in res_config_curl.
........

Merged revisions 383667 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/res/res_config_curl.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/res/res_config_curl.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_config_curl.c?view=diff&rev=383668&r1=383667&r2=383668
==============================================================================
--- branches/11/res/res_config_curl.c (original)
+++ branches/11/res/res_config_curl.c Mon Mar 25 07:36:33 2013
@@ -463,7 +463,7 @@
 {
 	struct ast_str *query, *buffer;
 	char *elm, field[256];
-	int type, size;
+	int type, size, i = 0;
 
 	if (!ast_custom_function_find("CURL")) {
 		ast_log(LOG_ERROR, "func_curl.so must be loaded in order to use res_config_curl.so!!\n");
@@ -484,7 +484,9 @@
 		type = va_arg(ap, require_type);
 		size = va_arg(ap, int);
 		ast_uri_encode(elm, field, sizeof(field), ast_uri_http);
-		ast_str_append(&query, 0, "%s=%s%%3A%d", field,
+		ast_str_append(&query, 0, "%s%s=%s%%3A%d",
+			i > 0 ? "&" : "",
+			field,
 			type == RQ_CHAR ? "char" :
 			type == RQ_INTEGER1 ? "integer1" :
 			type == RQ_UINTEGER1 ? "uinteger1" :
@@ -500,6 +502,7 @@
 			type == RQ_DATETIME ? "datetime" :
 			type == RQ_FLOAT ? "float" :
 			"unknown", size);
+		i++;
 	}
 
 	ast_str_append(&query, 0, ")}");




More information about the asterisk-commits mailing list