From 925f3333f6330aea8ebc3fb7a5091a5ba9147b84 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 04 Oct 2017 13:46:40 -0400 Subject: src/config.c: Set up hash table of types and callbacks --- diff --git a/src/config.c b/src/config.c index ef9a4a7..18e6875 100644 --- a/src/config.c +++ b/src/config.c @@ -47,16 +47,20 @@ split_name(const gchar *name, gchar **group, gchar **key) static void set_boolean(MqConfig *config, const gchar *name, gboolean value) { - gchar *group; - gchar *key; + gchar *group; + gchar *key; + ConfigItem *item; split_name(name, &group, &key); g_key_file_set_boolean(config->key_file, group, name, value); if (!config->types_and_cbs_set) { + item = g_malloc(sizeof(*item)); + item->type = TYPE_BOOLEAN; + item-callbacks = NULL; g_hash_table_insert(config->types_and_cbs, g_strdup(name), - TYPE_BOOLEAN); + item); } } -- cgit v0.9.1