[asterisk-commits] tilghman: trunk r101873 - /trunk/res/res_config_curl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 1 12:45:31 CST 2008
Author: tilghman
Date: Fri Feb 1 12:45:31 2008
New Revision: 101873
URL: http://svn.digium.com/view/asterisk?view=rev&rev=101873
Log:
Fix multi, when using the LIKE query.
(closes issue #11889)
Reported by: jmls
Patches:
res_config_curl.patch uploaded by jmls (license 141)
Tested by: jmls
Modified:
trunk/res/res_config_curl.c
Modified: trunk/res/res_config_curl.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_curl.c?view=diff&rev=101873&r1=101872&r2=101873
==============================================================================
--- trunk/res/res_config_curl.c (original)
+++ trunk/res/res_config_curl.c Fri Feb 1 12:45:31 2008
@@ -77,7 +77,7 @@
return NULL;
}
- ast_str_set(&query, 0, "${CURL(%s,", url);
+ ast_str_set(&query, 0, "${CURL(%s/single,", url);
for (i = 0; (newparam = va_arg(ap, const char *)); i++) {
newval = va_arg(ap, const char *);
@@ -155,8 +155,12 @@
for (i = 0; (newparam = va_arg(ap, const char *)); i++) {
newval = va_arg(ap, const char *);
- if (i == 0)
+ if (i == 0) {
+ char *op;
initfield = ast_strdupa(newparam);
+ if ((op = strchr(initfield, ' ')))
+ *op = '\0';
+ }
ast_uri_encode(newparam, buf1, sizeof(buf1), EncodeSpecialChars);
ast_uri_encode(newval, buf2, sizeof(buf2), EncodeSpecialChars);
ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2);
More information about the asterisk-commits
mailing list