2001-07-30 Alex Graveley <alex@ximian.com>
+ * 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 <alex@ximian.com>
+
* 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.
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];
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);
}