fix proxy_excludes handling for connman in previous commit
This commit is contained in:
parent
67ca168f6f
commit
fb572c4c9d
|
@ -246,22 +246,21 @@ static void _service_parse_prop_changed(struct Connman_Service *cs,
|
||||||
}
|
}
|
||||||
if (eina_array_count(proxy_excludes) > 0)
|
if (eina_array_count(proxy_excludes) > 0)
|
||||||
{
|
{
|
||||||
char buf[256], concatinated_proxy_exceptions[256];
|
Eina_Strbuf *buf;
|
||||||
size_t concatinated_string_length;
|
Eina_Array_Iterator it;
|
||||||
concatinated_proxy_exceptions[0] = '\0';
|
unsigned int i;
|
||||||
for (unsigned int i = 0; i < eina_array_count(proxy_excludes); i++)
|
const char *p;
|
||||||
|
|
||||||
|
buf = eina_strbuf_new();
|
||||||
|
EINA_ARRAY_ITER_NEXT(proxy_excludes, i, p, it)
|
||||||
{
|
{
|
||||||
snprintf(buf, (sizeof(buf) - 1), "%s ",
|
if (i)
|
||||||
(const char*)eina_array_data_get(proxy_excludes, i));
|
eina_strbuf_append_char(buf, ',');
|
||||||
concatinated_string_length = eina_strlcat(concatinated_proxy_exceptions, buf,
|
eina_strbuf_append(buf, p);
|
||||||
sizeof(concatinated_proxy_exceptions));
|
|
||||||
}
|
}
|
||||||
if ((concatinated_string_length < sizeof(concatinated_proxy_exceptions)) && (concatinated_string_length > 0))
|
DBG("New no_proxy: %s", eina_strbuf_string_get(buf));
|
||||||
{
|
e_env_set("no_proxy", eina_strbuf_string_get(buf));
|
||||||
concatinated_proxy_exceptions[concatinated_string_length - 1] = '\0';
|
eina_strbuf_free(buf);
|
||||||
}
|
|
||||||
DBG("New no_proxy: %s", (const char*)concatinated_proxy_exceptions);
|
|
||||||
e_env_set("no_proxy", concatinated_proxy_exceptions);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strcmp(method, "direct") == 0)
|
else if (strcmp(method, "direct") == 0)
|
||||||
|
|
Loading…
Reference in New Issue