NSYN: fix the NSYN command
[citadel.git] / citadel / modules / network / serv_netmail.c
index 733a6ae37db66ac141972ae6dd47b3b33a994af1..5713ea82ac00b1ee2f8feba851daa780a88a7ea9 100644 (file)
@@ -322,7 +322,6 @@ void network_process_list(SpoolControl *sc, struct CtdlMessage *omsg, long *dele
 
 
        CtdlMsgSetCM_Fields(msg, 'K', SKEY(sc->Users[roommailalias]));
-       CtdlMsgSetCM_Fields(msg, 'F', SKEY(sc->Users[roommailalias]));
 
        /* if there is no other recipient, Set the recipient
         * of the list message to the email address of the
@@ -527,7 +526,7 @@ void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long
                        }
                        
                        QN_syslog(LOG_INFO,
-                                 "%sSending to %s\n",
+                                 " %sSending to %s\n",
                                  (send)?"":"Not ",
                                  ChrPtr(Recipient));
                }
@@ -601,6 +600,7 @@ void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long
 void network_spool_msg(long msgnum,
                       void *userdata)
 {
+       struct CitContext *CCC = CC;
        struct CtdlMessage *msg = NULL;
        long delete_after_send = 0;     /* Set to 1 to delete after spooling */
        SpoolControl *sc;
@@ -609,6 +609,13 @@ void network_spool_msg(long msgnum,
 
        msg = CtdlFetchMessage(msgnum, 1);
 
+       if (msg == NULL)
+       {
+               QN_syslog(LOG_ERR,
+                         "failed to load Message <%ld> from disk\n",
+                         msgnum);
+               return;
+       }
        network_process_list(sc, msg, &delete_after_send);
        network_process_digest(sc, msg, &delete_after_send);
        network_process_participate(sc, msg, &delete_after_send);