Enlightenment CVS committal Author : devilhorns Project : e_modules Module : net
Dir : e_modules/net/src Modified Files: e_mod_config.c e_mod_config.h e_mod_configure.c Log Message: Some additional trapping and a config_updated hook to reset the timer. Remove the module.edj file as it shouldn't be in cvs. Some changes to Makefile.am for a better maintainer-clean. Big Thanks To KainX for his help :) =================================================================== RCS file: /cvs/e/e_modules/net/src/e_mod_config.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_config.c 11 Feb 2007 15:28:53 -0000 1.1 +++ e_mod_config.c 11 Feb 2007 15:47:42 -0000 1.2 @@ -1,6 +1,7 @@ #include <e.h> #include "e_mod_main.h" #include "e_mod_config.h" +#include "e_mod_net.h" EAPI Config_Item * _config_item_get(const char *id) @@ -53,4 +54,28 @@ fclose(f); if (devs) ecore_list_goto_first(devs); return devs; +} + +EAPI void +_config_updated(const char *id) +{ + Evas_List *l; + Config_Item *ci; + + if (!cfg) return; + ci = _config_item_get(id); + for (l = cfg->instances; l; l = l->next) + { + Instance *inst; + + inst = l->data; + if (!inst) continue; + if (!inst->gcc->id) continue; + if (strcmp(inst->gcc->id, id)) continue; + if (!inst->timer) + inst->timer = ecore_timer_add(ci->poll_time, _cb_poll, inst); + else + ecore_timer_interval_set(inst->timer, ci->poll_time); + break; + } } =================================================================== RCS file: /cvs/e/e_modules/net/src/e_mod_config.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_config.h 11 Feb 2007 15:28:53 -0000 1.1 +++ e_mod_config.h 11 Feb 2007 15:47:42 -0000 1.2 @@ -22,6 +22,7 @@ EAPI Config_Item *_config_item_get(const char *id); EAPI Ecore_List *_config_devices_get(void); +EAPI void _config_updated(const char *id); extern Config *cfg; =================================================================== RCS file: /cvs/e/e_modules/net/src/e_mod_configure.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_configure.c 11 Feb 2007 15:28:53 -0000 1.1 +++ e_mod_configure.c 11 Feb 2007 15:47:42 -0000 1.2 @@ -72,11 +72,16 @@ int i = 0; cfdata->poll_time = ci->poll_time; - if (ci->device) cfdata->device = strdup(ci->device); + if (ci->device) + cfdata->device = strdup(ci->device); + else + cfdata->device = NULL; + cfdata->devs = _config_devices_get(); if (!cfdata->devs) return; while ((tmp = ecore_list_next(cfdata->devs)) != NULL) { + if (!cfdata->device) continue; if (!strcmp(cfdata->device, tmp)) { cfdata->num = i; @@ -135,5 +140,6 @@ ci->poll_time = cfdata->poll_time; e_config_save_queue(); + _config_updated(ci->id); return 1; } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs