summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Janetzek <hannes.janetzek@gmail.com>2011-09-03 15:02:34 +0000
committerHannes Janetzek <hannes.janetzek@gmail.com>2011-09-03 15:02:34 +0000
commitb743ec1ff7cc3c1925136a26b79cfa456d2d6d61 (patch)
tree58306d144be9c4d1e412b1c4b418aeec2360ab40
parent375f38aaf50638207f915f47019a8078283538f6 (diff)
e-modules: use GADCON_CLIENT_CONFIG_GET
SVN revision: 63126
-rw-r--r--src/e_mod_main.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index 001cd94..1ca5834 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -41,7 +41,6 @@ struct _Instance
41}; 41};
42 42
43/* Local Variables */ 43/* Local Variables */
44static int uuid = 0;
45static Eina_List *instances = NULL; 44static Eina_List *instances = NULL;
46static E_Config_DD *conf_edd = NULL; 45static E_Config_DD *conf_edd = NULL;
47static E_Config_DD *conf_item_edd = NULL; 46static E_Config_DD *conf_item_edd = NULL;
@@ -433,25 +432,10 @@ _diskio_conf_timer(void *data)
433static Config_Item * 432static Config_Item *
434_diskio_conf_item_get(const char *id) 433_diskio_conf_item_get(const char *id)
435{ 434{
436 Eina_List *l = NULL; 435 Config_Item *ci;
437 Config_Item *ci = NULL; 436
438 char buf[128]; 437 GADCON_CLIENT_CONFIG_GET(Config_Item, diskio_conf->conf_items, _gc_class, id);
439 438
440 if (!id)
441 {
442 /* nothing passed, return a new id */
443 snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name, ++uuid);
444 id = buf;
445 }
446 else
447 {
448 uuid++;
449 for (l = diskio_conf->conf_items; l; l = l->next)
450 {
451 if (!(ci = l->data)) continue;
452 if ((ci->id) && (!strcmp(ci->id, id))) return ci;
453 }
454 }
455 ci = E_NEW(Config_Item, 1); 439 ci = E_NEW(Config_Item, 1);
456 ci->id = eina_stringshare_add(id); 440 ci->id = eina_stringshare_add(id);
457 ci->disk = eina_stringshare_add("???"); 441 ci->disk = eina_stringshare_add("???");