X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fnetwork%2Fserv_networkclient.c;h=82b3920a03890f0d9af4461add425c0c6c49f022;hp=c62e3f3ca9f9d894d43b1f9115f4362564b3bcd5;hb=f98c848366431398b8389c9786f54f9c97e01417;hpb=97b832cd58a0799271687a9570b9e93588e4f879 diff --git a/citadel/modules/network/serv_networkclient.c b/citadel/modules/network/serv_networkclient.c index c62e3f3ca..82b3920a0 100644 --- a/citadel/modules/network/serv_networkclient.c +++ b/citadel/modules/network/serv_networkclient.c @@ -822,7 +822,6 @@ eNextState nwc_connect_ip(AsyncIO *IO) AsyncNetworker *NW = IO->Data; EVN_syslog(LOG_DEBUG, "%s\n", __FUNCTION__); - EVN_syslog(LOG_DEBUG, "network: polling <%s>\n", ChrPtr(NW->node)); EVN_syslog(LOG_NOTICE, "Connecting to <%s> at %s:%s\n", ChrPtr(NW->node), ChrPtr(NW->host), @@ -834,8 +833,14 @@ eNextState nwc_connect_ip(AsyncIO *IO) 1); } +static int NetworkerCount = 0; void RunNetworker(AsyncNetworker *NW) { + AsyncIO *IO = &NW->IO; + + NW->n = NetworkerCount++; + network_talking_to(SKEY(NW->node), NTT_ADD); + EVN_syslog(LOG_DEBUG, "network: polling <%s>\n", ChrPtr(NW->node)); ParseURL(&NW->IO.ConnectMe, NW->Url, 504); InitIOStruct(&NW->IO, @@ -938,7 +943,6 @@ void network_poll_other_citadel_nodes(int full_poll, char *working_ignetcfg) ChrPtr(NW->port)); if (!network_talking_to(SKEY(NW->node), NTT_CHECK)) { - network_talking_to(SKEY(NW->node), NTT_ADD); RunNetworker(NW); continue; }