NETCFG: first free the configs, then the infrastructure needed to free them.
[citadel.git] / citadel / netconfig.c
index 682d4e05acb301b59eb54a3293862e508743cb38..f09c852fd32a3786ac5cc1f15c35c4e6fcbde087 100644 (file)
@@ -839,6 +839,7 @@ int is_recipient(OneRoomNetCfg *RNCfg, const char *Name)
                        }
                        nptr = nptr->next;
                }
+               i++;
        }
        return 0;
 }
@@ -927,6 +928,7 @@ void cmd_netp(char *cmdbuf)
                        err_buf,
                        "IGNet Networking.",
                        2, strs, (long*) &lens,
+                       CCC->cs_pid, 0,
                        time(NULL));
 
                DeleteHash(&working_ignetcfg);
@@ -954,6 +956,7 @@ void cmd_netp(char *cmdbuf)
                        "IGNet Networking.",
                        2, strs,
                        (long*) &lens,
+                       CCC->cs_pid, 0,
                        time(NULL));
 
                DeleteHash(&working_ignetcfg);
@@ -1171,11 +1174,11 @@ void destroy_network_cfgs(void)
        HashList *pCfgTypeHash = CfgTypeHash;
        HashList *pRoomConfigs = RoomConfigs;
 
-       CfgTypeHash = NULL;
        RoomConfigs = NULL;
-       
-       DeleteHash(&pCfgTypeHash);
        DeleteHash(&pRoomConfigs);
+
+       CfgTypeHash = NULL;
+       DeleteHash(&pCfgTypeHash);
 }
 
 /*