mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
BNPH-6149: allow to use system curl again, fix some types on auth_scheme values to all be long, don't use curl private function in our wrapper. This may cause missing symbol curl_easy_setopt with visibility turned on, if it does that, please let me know
This commit is contained in:
1 parent
12bc3828ee
commit
666231f91b
10 files changed
+16
-30
No files matched your search
@@ -86,7 +86,7 @@ typedef struct client_profile_s {
|
||||
uint32_t enable_ssl_verifyhost;
|
||||
char *cookie_file;
|
||||
switch_hash_t *vars_map;
|
||||
int auth_scheme;
|
||||
long auth_scheme;
|
||||
int timeout;
|
||||
profile_perms_t perms;
|
||||
char *ua;
|
||||
@@ -1749,7 +1749,7 @@ static switch_status_t do_config(void)
|
||||
char *cookie_file = NULL;
|
||||
char *ua = "mod_httapi/1.0";
|
||||
hash_node_t *hash_node;
|
||||
int auth_scheme = CURLAUTH_BASIC;
|
||||
long auth_scheme = CURLAUTH_BASIC;
|
||||
need_vars_map = 0;
|
||||
vars_map = NULL;
|
||||
|
||||
@@ -1791,7 +1791,7 @@ static switch_status_t do_config(void)
|
||||
} else if (!strcasecmp(val, "GSS-NEGOTIATE")) {
|
||||
auth_scheme |= CURLAUTH_GSSNEGOTIATE;
|
||||
} else if (!strcasecmp(val, "any")) {
|
||||
auth_scheme = CURLAUTH_ANY;
|
||||
auth_scheme = (long)CURLAUTH_ANY;
|
||||
}
|
||||
} else if (!strcasecmp(var, "disable-100-continue") && !switch_true(val)) {
|
||||
disable100continue = 0;
|
||||
|
||||
@@ -79,7 +79,7 @@ struct cdr_profile {
|
||||
int prefix_a;
|
||||
int disable100continue;
|
||||
int rotate;
|
||||
int auth_scheme;
|
||||
long auth_scheme;
|
||||
int timeout;
|
||||
switch_memory_pool_t *pool;
|
||||
};
|
||||
@@ -671,7 +671,7 @@ switch_status_t mod_format_cdr_load_profile_xml(switch_xml_t xprofile)
|
||||
} else if (!strcasecmp(val, "GSS-NEGOTIATE")) {
|
||||
profile->auth_scheme |= CURLAUTH_GSSNEGOTIATE;
|
||||
} else if (!strcasecmp(val, "any")) {
|
||||
profile->auth_scheme = CURLAUTH_ANY;
|
||||
profile->auth_scheme = (long)CURLAUTH_ANY;
|
||||
}
|
||||
} else if (!strcasecmp(var, "encode-values") && !zstr(val)) {
|
||||
profile->encode_values = switch_true(val) ? ENCODING_DEFAULT : ENCODING_NONE;
|
||||
|
||||
@@ -69,7 +69,7 @@ static struct {
|
||||
int prefix_a;
|
||||
int disable100continue;
|
||||
int rotate;
|
||||
int auth_scheme;
|
||||
long auth_scheme;
|
||||
switch_memory_pool_t *pool;
|
||||
switch_event_node_t *node;
|
||||
int encode_values;
|
||||
@@ -689,7 +689,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load)
|
||||
} else if (!strcasecmp(val, "GSS-NEGOTIATE")) {
|
||||
globals.auth_scheme |= CURLAUTH_GSSNEGOTIATE;
|
||||
} else if (!strcasecmp(val, "any")) {
|
||||
globals.auth_scheme = CURLAUTH_ANY;
|
||||
globals.auth_scheme = (long)CURLAUTH_ANY;
|
||||
}
|
||||
} else if (!strcasecmp(var, "encode-values") && !zstr(val)) {
|
||||
globals.encode_values = switch_true(val) ? ENCODING_DEFAULT : ENCODING_NONE;
|
||||
|
||||
@@ -146,7 +146,7 @@ static JSBool curl_run(JSContext * cx, JSObject * obj, uintN argc, jsval * argv,
|
||||
if (argc > 5) {
|
||||
cred = JS_GetStringBytes(JS_ValueToString(cx, argv[5]));
|
||||
if (!zstr(cred)) {
|
||||
switch_curl_easy_setopt(co->curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
switch_curl_easy_setopt(co->curl_handle, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
|
||||
switch_curl_easy_setopt(co->curl_handle, CURLOPT_USERPWD, cred);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ JS_CURL_FUNCTION_IMPL(Run)
|
||||
String::Utf8Value str4(info[5]);
|
||||
cred = js_safe_str(*str4);
|
||||
if (cred.length() > 0) {
|
||||
switch_curl_easy_setopt(_curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
switch_curl_easy_setopt(_curl_handle, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
|
||||
switch_curl_easy_setopt(_curl_handle, CURLOPT_USERPWD, cred.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ static struct {
|
||||
int prefix_a;
|
||||
int disable100continue;
|
||||
int rotate;
|
||||
int auth_scheme;
|
||||
long auth_scheme;
|
||||
int timeout;
|
||||
switch_memory_pool_t *pool;
|
||||
switch_event_node_t *node;
|
||||
@@ -576,7 +576,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
|
||||
} else if (!strcasecmp(val, "GSS-NEGOTIATE")) {
|
||||
globals.auth_scheme |= CURLAUTH_GSSNEGOTIATE;
|
||||
} else if (!strcasecmp(val, "any")) {
|
||||
globals.auth_scheme = CURLAUTH_ANY;
|
||||
globals.auth_scheme = (long)CURLAUTH_ANY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ struct xml_binding {
|
||||
char *cookie_file;
|
||||
switch_hash_t *vars_map;
|
||||
int use_dynamic_url;
|
||||
int auth_scheme;
|
||||
long auth_scheme;
|
||||
int timeout;
|
||||
};
|
||||
|
||||
@@ -368,7 +368,7 @@ static switch_status_t do_config(void)
|
||||
uint32_t enable_ssl_verifyhost = 0;
|
||||
char *cookie_file = NULL;
|
||||
hash_node_t *hash_node;
|
||||
int auth_scheme = CURLAUTH_BASIC;
|
||||
long auth_scheme = CURLAUTH_BASIC;
|
||||
need_vars_map = 0;
|
||||
vars_map = NULL;
|
||||
|
||||
@@ -399,7 +399,7 @@ static switch_status_t do_config(void)
|
||||
} else if (!strcasecmp(val, "GSS-NEGOTIATE")) {
|
||||
auth_scheme |= CURLAUTH_GSSNEGOTIATE;
|
||||
} else if (!strcasecmp(val, "any")) {
|
||||
auth_scheme = CURLAUTH_ANY;
|
||||
auth_scheme = (long)CURLAUTH_ANY;
|
||||
}
|
||||
} else if (!strcasecmp(var, "disable-100-continue") && !switch_true(val)) {
|
||||
disable100continue = 0;
|
||||
|
||||
Reference in new issue
Block a user