version 1.1.2.7, 2011/11/24 13:57:11
|
version 1.2.2.1, 2012/02/01 15:04:24
|
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; |
call.OpenPUB = mqttOpenRTLM; |
call.OpenPUB = mqttOpenRTLM; |
call.ClosePUB = mqttCloseRTLM; |
call.ClosePUB = mqttCloseRTLM; |
call.InitSessPUB = dlsym(rtlm, "mqtt_rtlm_init_session"); |
call.InitSessPUB = dlsym(rtlm, "mqtt_rtlm_init_session"); |
|
call.FiniSessPUB = dlsym(rtlm, "mqtt_rtlm_fini_session"); |
|
call.ChkSessPUB = dlsym(rtlm, "mqtt_rtlm_chk_session"); |
|
call.WritePUB_topic = dlsym(rtlm, "mqtt_rtlm_write_topic"); |
|
call.ReadPUB_topic = dlsym(rtlm, "mqtt_rtlm_read_topic"); |
|
call.DeletePUB_topic = dlsym(rtlm, "mqtt_rtlm_delete_topic"); |
|
call.WritePUB_subscribe = dlsym(rtlm, "mqtt_rtlm_write_subscribe"); |
|
call.ReadPUB_subscribe = dlsym(rtlm, "mqtt_rtlm_read_subscribe"); |
|
call.DeletePUB_subscribe = dlsym(rtlm, "mqtt_rtlm_delete_subscribe"); |
|
if (!call.InitSessPUB || !call.FiniSessPUB || !call.ChkSessPUB || |
|
!call.WritePUB_topic || !call.ReadPUB_topic || |
|
!call.DeletePUB_topic) { |
|
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; |
} |
} |
|
|