]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/ctdlproto/serv_messages.c
move FourHash into libcitadel.
[citadel.git] / citadel / modules / ctdlproto / serv_messages.c
index 31e48cb8c3077409ae9827f84b303e51208dd267..ef1d70a7a4ef27de66fbe868fd98294f9ef880cd 100644 (file)
@@ -156,10 +156,12 @@ void cmd_msgs(char *cmdbuf)
                        long tValueLen;
                        extract_token(tfield, buf, 0, '|', sizeof tfield);
                        tValueLen = extract_token(tvalue, buf, 1, '|', sizeof tvalue);
-                       for (i='A'; i<='Z'; ++i) if (msgkeys[i]!=NULL) {
-                               if (!strcasecmp(tfield, msgkeys[i])) {
-                                       CM_SetField(template, i, tvalue, tValueLen);
-                               }
+                       if (tValueLen >= 0) {
+                               for (i='A'; i<='Z'; ++i) if (msgkeys[i]!=NULL) {
+                                               if (!strcasecmp(tfield, msgkeys[i])) {
+                                                       CM_SetField(template, i, tvalue, tValueLen);
+                                               }
+                                       }
                        }
                }
                buffer_output();
@@ -598,7 +600,7 @@ void cmd_ent0(char *entargs)
        }
        free(all_recps);
 
-       if ((valid != NULL) && (valid->num_room == 1))
+       if ((valid != NULL) && (valid->num_room == 1) && !IsEmptyStr(valid->recp_orgroom))
        {
                /* posting into an ML room? set the envelope from 
                 * to the actual mail address so others get a valid