version 1.1.2.10, 2011/11/25 15:29:30
|
version 1.2, 2012/01/27 15:05:38
|
Line 55 mqttLoadRTLM(sl_config *cfg, int modtype)
|
Line 55 mqttLoadRTLM(sl_config *cfg, int modtype)
|
|
|
rtlm = dlopen(str, RTLD_LAZY); |
rtlm = dlopen(str, RTLD_LAZY); |
if (!rtlm) { |
if (!rtlm) { |
mqttLog("Error:: RTL module not found %s\n", dlerror()); | mqttLog("Error:: RTL module %s not found %s\n", str, dlerror()); |
return NULL; |
return NULL; |
} |
} |
|
|
Line 78 mqttLoadRTLM(sl_config *cfg, int modtype)
|
Line 78 mqttLoadRTLM(sl_config *cfg, int modtype)
|
call.OpenACC = mqttOpenRTLM; |
call.OpenACC = mqttOpenRTLM; |
call.CloseACC = mqttCloseRTLM; |
call.CloseACC = mqttCloseRTLM; |
call.LoginACC = dlsym(rtlm, "mqtt_rtlm_login"); |
call.LoginACC = dlsym(rtlm, "mqtt_rtlm_login"); |
|
if (!call.LoginACC) { |
|
mqttLog("Error:: incorrect module ...\n"); |
|
dlclose(rtlm); |
|
return NULL; |
|
} |
break; |
break; |
case 1: |
case 1: |
pub_rtlm = rtlm; |
pub_rtlm = rtlm; |
Line 89 mqttLoadRTLM(sl_config *cfg, int modtype)
|
Line 94 mqttLoadRTLM(sl_config *cfg, int modtype)
|
call.WritePUB = dlsym(rtlm, "mqtt_rtlm_write_topic"); |
call.WritePUB = dlsym(rtlm, "mqtt_rtlm_write_topic"); |
call.ReadPUB = dlsym(rtlm, "mqtt_rtlm_read_topic"); |
call.ReadPUB = dlsym(rtlm, "mqtt_rtlm_read_topic"); |
call.DeletePUB = dlsym(rtlm, "mqtt_rtlm_delete_topic"); |
call.DeletePUB = dlsym(rtlm, "mqtt_rtlm_delete_topic"); |
|
if (!call.InitSessPUB || !call.FiniSessPUB || !call.ChkSessPUB || |
|
!call.WritePUB || !call.ReadPUB || !call.DeletePUB) { |
|
mqttLog("Error:: incorrect module ...\n"); |
|
dlclose(rtlm); |
|
return NULL; |
|
} |
break; |
break; |
default: |
default: |
log_rtlm = rtlm; |
log_rtlm = rtlm; |
call.OpenLOG = mqttOpenRTLM; |
call.OpenLOG = mqttOpenRTLM; |
call.CloseLOG = mqttCloseRTLM; |
call.CloseLOG = mqttCloseRTLM; |
call.LOG = dlsym(rtlm, "mqtt_rtlm_logger"); |
call.LOG = dlsym(rtlm, "mqtt_rtlm_logger"); |
|
if (!call.LOG) { |
|
mqttLog("Error:: incorrect module ...\n"); |
|
dlclose(rtlm); |
|
return NULL; |
|
} |
break; |
break; |
} |
} |
|
|