|
|
@ -463,7 +463,7 @@ static int require_curl(const char *url, const char *unused, va_list ap)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct ast_str *query, *buffer;
|
|
|
|
struct ast_str *query, *buffer;
|
|
|
|
char *elm, field[256];
|
|
|
|
char *elm, field[256];
|
|
|
|
int type, size;
|
|
|
|
int type, size, i = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (!ast_custom_function_find("CURL")) {
|
|
|
|
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");
|
|
|
|
ast_log(LOG_ERROR, "func_curl.so must be loaded in order to use res_config_curl.so!!\n");
|
|
|
@ -484,7 +484,9 @@ static int require_curl(const char *url, const char *unused, va_list ap)
|
|
|
|
type = va_arg(ap, require_type);
|
|
|
|
type = va_arg(ap, require_type);
|
|
|
|
size = va_arg(ap, int);
|
|
|
|
size = va_arg(ap, int);
|
|
|
|
ast_uri_encode(elm, field, sizeof(field), ast_uri_http);
|
|
|
|
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_CHAR ? "char" :
|
|
|
|
type == RQ_INTEGER1 ? "integer1" :
|
|
|
|
type == RQ_INTEGER1 ? "integer1" :
|
|
|
|
type == RQ_UINTEGER1 ? "uinteger1" :
|
|
|
|
type == RQ_UINTEGER1 ? "uinteger1" :
|
|
|
@ -500,6 +502,7 @@ static int require_curl(const char *url, const char *unused, va_list ap)
|
|
|
|
type == RQ_DATETIME ? "datetime" :
|
|
|
|
type == RQ_DATETIME ? "datetime" :
|
|
|
|
type == RQ_FLOAT ? "float" :
|
|
|
|
type == RQ_FLOAT ? "float" :
|
|
|
|
"unknown", size);
|
|
|
|
"unknown", size);
|
|
|
|
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ast_str_append(&query, 0, ")}");
|
|
|
|
ast_str_append(&query, 0, ")}");
|
|
|
|