From: Alex Graveley Date: Mon, 30 Jul 2001 22:35:25 +0000 (+0000) Subject: Fix bug where only the first valid config token is loaded from the config X-Git-Tag: SOUP_0_4~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76629f68e31fb4653d8f6120ab2752d727d12b25;p=platform%2Fupstream%2Flibsoup.git Fix bug where only the first valid config token is loaded from the config 2001-07-30 Alex Graveley * src/soup-core/soup-misc.c (soup_load_config_internal): Fix bug where only the first valid config token is loaded from the config file. --- diff --git a/ChangeLog b/ChangeLog index 1a08cb3..df250db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-07-30 Alex Graveley + * src/soup-core/soup-misc.c (soup_load_config_internal): Fix bug + where only the first valid config token is loaded from the config file. + +2001-07-30 Alex Graveley + * src/soup-core/soup-socket.c (soup_address_new_cb): Fix dangling pointer error where a resolved SoupAddress is passed to the callback, and then realloc'd. diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c index 5dca235..73f1775 100644 --- a/libsoup/soup-misc.c +++ b/libsoup/soup-misc.c @@ -342,7 +342,7 @@ soup_config_token_allowed (gchar *key) static void soup_load_config_internal (gchar *config_file, gboolean admin) { - struct SoupConfigFuncs *funcs = soup_config_funcs; + struct SoupConfigFuncs *funcs; FILE *cfg; char buf[128]; @@ -381,9 +381,11 @@ soup_load_config_internal (gchar *config_file, gboolean admin) key = g_strchomp (split[0]); value = g_strchug (split[1]); - for (; funcs && funcs->key; funcs++) - if (!g_strcasecmp (key, funcs->key)) + for (funcs = soup_config_funcs; funcs && funcs->key; funcs++) + if (!g_strcasecmp (key, funcs->key)) { funcs->func (key, value); + break; + } g_strfreev (split); }