Diff for /mqtt/src/dl.c between versions 1.1.2.1 and 1.1.2.3

version 1.1.2.1, 2011/11/23 00:42:16 version 1.1.2.3, 2011/11/23 08:09:40
Line 25  mqttLog(const char *fmt, ...) Line 25  mqttLog(const char *fmt, ...)
 void *  void *
 mqttLoadRTLM(sl_config *cfg, int modtype)  mqttLoadRTLM(sl_config *cfg, int modtype)
 {  {
        char *str;        const char *str;
         void *rtlm = NULL;          void *rtlm = NULL;
   
         if (!cfg)          if (!cfg)
                 return NULL;                  return NULL;
   
        str = CFG(cfg_GetAttribute(cfg, CFG("mqttd"), CFG(modtype ? "pub_file" : "acc_file")));        str = (const char*) CFG(cfg_GetAttribute(cfg, CFG("mqttd"), CFG(modtype ? "pub_file" : "acc_file")));
         if (!str) {          if (!str) {
                 mqttLog("Error:: RTL module not found\n");                  mqttLog("Error:: RTL module not found\n");
                 return NULL;                  return NULL;
Line 69  void Line 69  void
 mqttUnloadRTLM(int modtype)  mqttUnloadRTLM(int modtype)
 {  {
         dlclose((modtype ? pub_rtlm : acc_rtlm));          dlclose((modtype ? pub_rtlm : acc_rtlm));
   }
   
   inline int
   mqttMkDir(sl_config *cfg)
   {
           const char *str;
   
           if (!cfg)
                   return -1;
   
           str = (const char*) cfg_GetAttribute(cfg, CFG("mqttd"), CFG("statedir"));
           if (!str)
                   return -1;
   
           if (mkdir(str, 0600) == -1 && errno != EEXIST)
                   return -1;
   
           return 0;
 }  }

Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>