NETCFG: save messages if changed.
[citadel.git] / citadel / modules / network / serv_netspool.c
index 659f8e25918dfd20ea8aad048041f043e8a97ca6..47e1f18082b9277c64e3a8308bb374a1e14e68d3 100644 (file)
@@ -157,6 +157,12 @@ void network_spoolout_room(RoomProcList *room_to_spool,
        SpoolControl sc;
        int i;
 
+       memset(&sc, 0, sizeof(SpoolControl));
+       sc.RNCfg = room_to_spool->OneRNCfg;
+       sc.lastsent = room_to_spool->OneRNCfg->lastsent;
+       sc.working_ignetcfg = working_ignetcfg;
+       sc.the_netmap = the_netmap;
+
        if ((sc.RNCfg->NetConfigs[listrecp] == NULL) && 
            (sc.RNCfg->NetConfigs[digestrecp] == NULL) && 
            (sc.RNCfg->NetConfigs[participate] == NULL) && 
@@ -178,10 +184,6 @@ void network_spoolout_room(RoomProcList *room_to_spool,
 
        
        syslog(LOG_INFO, "Networking started for <%s>\n", CCC->room.QRname);
-       sc.RNCfg = room_to_spool->OneRNCfg;
-       sc.lastsent = room_to_spool->OneRNCfg->lastsent;
-       sc.working_ignetcfg = working_ignetcfg;
-       sc.the_netmap = the_netmap;
 
        /* If there are digest recipients, we have to build a digest */
        if (sc.RNCfg->NetConfigs[digestrecp] != NULL) {