--- mqtt/src/dl.c 2011/11/23 08:50:03 1.1.2.4 +++ mqtt/src/dl.c 2011/11/24 15:14:08 1.1.2.8 @@ -4,7 +4,9 @@ static void *acc_rtlm, *pub_rtlm, *log_rtlm; +struct tagCallbacks call; + /* * mqttLog() Log message to syslog * @@ -73,18 +75,22 @@ mqttLoadRTLM(sl_config *cfg, int modtype) switch (modtype) { case 0: acc_rtlm = rtlm; - mqttOpenACC = mqttOpenRTLM; - mqttCloseACC = mqttCloseRTLM; + call.OpenACC = mqttOpenRTLM; + call.CloseACC = mqttCloseRTLM; + call.LoginACC = dlsym(rtlm, "mqtt_rtlm_login"); break; case 1: pub_rtlm = rtlm; - mqttOpenPUB = mqttOpenRTLM; - mqttClosePUB = mqttCloseRTLM; + call.OpenPUB = mqttOpenRTLM; + call.ClosePUB = mqttCloseRTLM; + call.InitSessPUB = dlsym(rtlm, "mqtt_rtlm_init_session"); + call.FiniSessPUB = dlsym(rtlm, "mqtt_rtlm_fini_session"); break; default: log_rtlm = rtlm; - mqttOpenLOG = mqttOpenRTLM; - mqttCloseLOG = mqttCloseRTLM; + call.OpenLOG = mqttOpenRTLM; + call.CloseLOG = mqttCloseRTLM; + call.LOG = dlsym(rtlm, "mqtt_rtlm_logger"); break; }