It works as expected and looks good to me.
I found only few minor things.
On Monday 03 of December 2012 16:47:37 Jiri Moskovcak wrote:
+++ b/src/include/internal_libreport.h +GHashTable *load_workflow_config_data(const char* path);
^^^^ coding style violation
-void free_workflow_list(GHashTable *wl) +void free_workflow_list(GHashTable **wl) {
- g_hash_table_foreach(wl, (GHFunc)free_workflow_cb, NULL);
- g_hash_table_destroy(wl);
- if(*wl != NULL)
^^^^ coding style violation
- {
g_hash_table_foreach(*wl, (GHFunc)free_workflow_cb, NULL);
The workflow hash table is initialized by g_hash_table_new_full(): g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) free_workflow);
According to the GLib documentation [1] it is not necessary to free items before g_hash_table_destroy()
-g_hash_table_foreach(wl, (GHFunc)free_workflow_cb, NULL);
http://developer.gnome.org/glib/2.32/glib-Hash-Tables.html#g-hash-table-dest...
g_hash_table_destroy(*wl);
*wl = NULL;
- }
}
+GHashTable *load_workflow_config_data(const char* path)
^^^^ coding style violation