summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-09-26 12:26:19 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-09-26 12:26:18 -0400
commitfb572c4c9d78d11d1f1c0acde74c759150913409 (patch)
treedb50a474ac0e0ecd0ef3c41607991e298dd20821 /src/modules
parent67ca168f6f6adefb41cc5ca3d7b4e1d857522e33 (diff)
fix proxy_excludes handling for connman in previous commit
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/connman/e_connman.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/modules/connman/e_connman.c b/src/modules/connman/e_connman.c
index 464a578..b937ab5 100644
--- a/src/modules/connman/e_connman.c
+++ b/src/modules/connman/e_connman.c
@@ -246,22 +246,21 @@ static void _service_parse_prop_changed(struct Connman_Service *cs,
246 } 246 }
247 if (eina_array_count(proxy_excludes) > 0) 247 if (eina_array_count(proxy_excludes) > 0)
248 { 248 {
249 char buf[256], concatinated_proxy_exceptions[256]; 249 Eina_Strbuf *buf;
250 size_t concatinated_string_length; 250 Eina_Array_Iterator it;
251 concatinated_proxy_exceptions[0] = '\0'; 251 unsigned int i;
252 for (unsigned int i = 0; i < eina_array_count(proxy_excludes); i++) 252 const char *p;
253 { 253
254 snprintf(buf, (sizeof(buf) - 1), "%s ", 254 buf = eina_strbuf_new();
255 (const char*)eina_array_data_get(proxy_excludes, i)); 255 EINA_ARRAY_ITER_NEXT(proxy_excludes, i, p, it)
256 concatinated_string_length = eina_strlcat(concatinated_proxy_exceptions, buf,
257 sizeof(concatinated_proxy_exceptions));
258 }
259 if ((concatinated_string_length < sizeof(concatinated_proxy_exceptions)) && (concatinated_string_length > 0))
260 { 256 {
261 concatinated_proxy_exceptions[concatinated_string_length - 1] = '\0'; 257 if (i)
258 eina_strbuf_append_char(buf, ',');
259 eina_strbuf_append(buf, p);
262 } 260 }
263 DBG("New no_proxy: %s", (const char*)concatinated_proxy_exceptions); 261 DBG("New no_proxy: %s", eina_strbuf_string_get(buf));
264 e_env_set("no_proxy", concatinated_proxy_exceptions); 262 e_env_set("no_proxy", eina_strbuf_string_get(buf));
263 eina_strbuf_free(buf);
265 } 264 }
266 } 265 }
267 else if (strcmp(method, "direct") == 0) 266 else if (strcmp(method, "direct") == 0)