|
|
| version 1.1.2.1, 2011/11/23 00:42:16 | version 1.1.2.2, 2011/11/23 01:07:18 |
|---|---|
| Line 70 mqttUnloadRTLM(int modtype) | Line 70 mqttUnloadRTLM(int modtype) |
| { | { |
| dlclose((modtype ? pub_rtlm : acc_rtlm)); | dlclose((modtype ? pub_rtlm : acc_rtlm)); |
| } | } |
| inline int | |
| mqttMkDir(sl_config *cfg) | |
| { | |
| char *str; | |
| if (!cfg) | |
| return -1; | |
| str = CFG(cfg_GetAttribute(cfg, CFG("mqttd"), CFG("statedir"))); | |
| if (!str) | |
| return -1; | |
| if (mkdir(str, 0600) == -1 && errno != EEXIST) | |
| return -1; | |
| return 0; | |
| } |