--- mqtt/src/dl.c 2012/02/01 15:44:40 1.2.2.2 +++ mqtt/src/dl.c 2012/04/24 08:06:08 1.2.2.4 @@ -25,11 +25,11 @@ mqttLog(const char *fmt, ...) } void * -mqttLoadRTLM(sl_config *cfg, int modtype) +mqttLoadRTLM(cfg_root_t *cfg, int modtype) { const char *str, *attr; void *rtlm = NULL; - void *(*mqttOpenRTLM)(sl_config *); + void *(*mqttOpenRTLM)(cfg_root_t *); void (*mqttCloseRTLM)(void *); if (!cfg) @@ -47,7 +47,7 @@ mqttLoadRTLM(sl_config *cfg, int modtype) break; } - str = (const char*) CFG(cfg_GetAttribute(cfg, CFG("mqttd"), CFG(attr))); + str = cfg_getAttribute(cfg, "mqttd", attr); if (!str) { mqttLog("Error:: RTL module not found\n"); return NULL; @@ -61,13 +61,13 @@ mqttLoadRTLM(sl_config *cfg, int modtype) mqttOpenRTLM = dlsym(rtlm, "mqtt_rtlm_open"); if (!mqttOpenRTLM) { - mqttLog("Error:: Can't found mqtt_db_open call\n"); + mqttLog("Error:: Can't found mqtt_rtlm_open call\n"); dlclose(rtlm); return NULL; } mqttCloseRTLM = dlsym(rtlm, "mqtt_rtlm_close"); if (!mqttCloseRTLM) { - mqttLog("Error:: Can't found mqtt_db_close call\n"); + mqttLog("Error:: Can't found mqtt_rtlm_close call\n"); dlclose(rtlm); return NULL; } @@ -139,14 +139,14 @@ mqttUnloadRTLM(int modtype) } inline int -mqttMkDir(sl_config *cfg) +mqttMkDir(cfg_root_t *cfg) { const char *str; if (!cfg) return -1; - str = (const char*) cfg_GetAttribute(cfg, CFG("mqttd"), CFG("statedir")); + str = (const char*) cfg_getAttribute(cfg, "mqttd", "statedir"); if (!str) return -1;