From a936f3a52077fcfa00d7534dbda3f5d153c7bce9 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Fri, 25 May 2012 15:01:44 +0200 Subject: [PATCH] Networker: - network_learn_topology (): fix prepending of new netmap item to linked list - fix removal of spool files not associated anymore --- citadel/modules/network/serv_netspool.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/citadel/modules/network/serv_netspool.c b/citadel/modules/network/serv_netspool.c index 06fa3a82f..de98a3cf1 100644 --- a/citadel/modules/network/serv_netspool.c +++ b/citadel/modules/network/serv_netspool.c @@ -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) ++; } @@ -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", -- 2.30.2