Integrated the DKIM signer into serv_smtpclient, but disabled it
[citadel.git] / webcit / preferences.c
index 1155a182da6b846d68fccacde2646ec0207835f5..e438b03185571fde8ed216b88c7faec40581b446 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #include "webcit.h"
-#include "webserver.h"
+
 #include "dav.h"
 
 HashList *PreferenceHooks;
@@ -119,7 +119,7 @@ void GetPrefTypes(HashList *List)
                        Pref->Type = PrefType;
                        Pref->eFlatPrefType = Pref->Type->eType;
 
-                       syslog(1, "Loading [%s]with type [%d] [\"%s\"]\n",
+                       syslog(LOG_DEBUG, "Loading [%s]with type [%d] [\"%s\"]\n",
                                ChrPtr(Pref->Key),
                                Pref->Type->eType,
                                ChrPtr(Pref->Val));
@@ -147,7 +147,7 @@ void GetPrefTypes(HashList *List)
 
                        if (PrefType->OnLoad != NULL){
 
-                               syslog(1, "Loading with: -> %s(\"%s\", %ld)\n",
+                               syslog(LOG_DEBUG, "Loading with: -> %s(\"%s\", %ld)\n",
                                        ChrPtr(PrefType->OnLoadName),
                                        ChrPtr(Pref->Val),
                                        Pref->lval);
@@ -208,7 +208,7 @@ void ParsePref(HashList **List, StrBuf *ReadBuf)
                        else 
                        {
                                StrBufTrim(ReadBuf);
-                               syslog(1, "ignoring spurious preference line: [%s]\n", 
+                               syslog(LOG_INFO, "ignoring spurious preference line: [%s]\n", 
                                        ChrPtr(ReadBuf));
                                DestroyPreference(Data);
                                LastData = NULL;
@@ -571,7 +571,7 @@ void set_preference_backend(const char *key, size_t keylen,
                Pref->Type = PrefType;
                Pref->eFlatPrefType = PrefType->eType;
                if (Pref->Type->eType != lPrefType)
-                       syslog(1, "warning: saving preference with wrong type [%s] %d != %ld \n",
+                       syslog(LOG_WARNING, "warning: saving preference with wrong type [%s] %d != %ld \n",
                                key, Pref->Type->eType, lPrefType);
                switch (Pref->Type->eType)
                {
@@ -1055,9 +1055,9 @@ HashList *GetGVEAHash(StrBuf *Target, WCTemplputParams *TP)
                                i = snprintf(N, sizeof(N), "%d", n);
                                StrBufTrim(Rcp);
                                VEA->Address = Rcp;
-                               if (EnvelopeTo != NULL)
+                               if (StrLength(EnvelopeTo) > 0)
                                        VEA->IsDefault = strstr(ChrPtr(EnvelopeTo), ChrPtr(Rcp)) != NULL;
-                               else if (DefaultFrom != NULL)
+                               else if (StrLength(DefaultFrom) > 0)
                                        VEA->IsDefault = !strcmp(ChrPtr(Rcp), ChrPtr(DefaultFrom));
                                else
                                        VEA->IsDefault = 0;