Networker:
[citadel.git] / citadel / modules / network / serv_netspool.c
index fbd0eb0e5f6bf9b13e6028fe3c34b0637e9f261d..de98a3cf1ff68193193cd79f507f4a806ceb5a8a 100644 (file)
@@ -95,7 +95,8 @@
 /*
  * Learn topology from path fields
  */
-void network_learn_topology(char *node, char *path, NetMap **the_netmap, int *netmap_changed) {
+static void network_learn_topology(char *node, char *path, NetMap **the_netmap, int *netmap_changed)
+{
        char nexthop[256];
        NetMap *nmptr;
 
@@ -117,7 +118,7 @@ void network_learn_topology(char *node, char *path, NetMap **the_netmap, int *ne
        nmptr->lastcontact = time(NULL);
        extract_token(nmptr->nexthop, path, 0, '!', sizeof nmptr->nexthop);
        nmptr->next = *the_netmap;
-       the_netmap = &nmptr;
+       *the_netmap = nmptr;
        (*netmap_changed) ++;
 }
 
@@ -380,7 +381,7 @@ int is_recipient(SpoolControl *sc, const char *Name)
 /*
  * Batch up and send all outbound traffic from the current room
  */
-void network_spoolout_room(char *room_to_spool,                       
+void network_spoolout_room(RoomProcList *room_to_spool,                       
                           char *working_ignetcfg,
                           NetMap *the_netmap)
 {
@@ -394,8 +395,8 @@ void network_spoolout_room(char *room_to_spool,
         * Normally this should never happen, but once in a while maybe a room gets
         * queued for networking and then deleted before it can happen.
         */
-       if (CtdlGetRoom(&CC->room, room_to_spool) != 0) {
-               syslog(LOG_CRIT, "ERROR: cannot load <%s>\n", room_to_spool);
+       if (CtdlGetRoom(&CC->room, room_to_spool->name) != 0) {
+               syslog(LOG_CRIT, "ERROR: cannot load <%s>\n", room_to_spool->name);
                return;
        }
 
@@ -834,9 +835,7 @@ void network_consolidate_spoolout(char *working_ignetcfg, NetMap *the_netmap)
        while (d = readdir(dp), d != NULL) {
                if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
                        continue;
-               ptr = strchr(d->d_name, '@');
-               if (d != NULL)
-                       continue;
+
                snprintf(filename, 
                        sizeof filename,
                        "%s/%s",
@@ -893,7 +892,7 @@ CTDL_MODULE_INIT(network_spool)
        if (!threading)
        {
                create_spool_dirs();
-               CtdlRegisterCleanupHook(destroy_network_queue_room);
+//////todo             CtdlRegisterCleanupHook(destroy_network_queue_room);
        }
        return "network_spool";
 }