NETWORKER: don't report an error if the rome site tells us we're already on their...
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Jul 2012 15:02:58 +0000 (17:02 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Jul 2012 15:02:58 +0000 (17:02 +0200)
citadel/modules/network/serv_networkclient.c

index d5cf394ea5b5035e62fc3d7e51377d5e1e6ab0c1..80713bfd9af6ad0e9e39ae89bb7aeb96914bcbbc 100644 (file)
@@ -227,14 +227,22 @@ eNextState NWC_ReadAuthReply(AsyncNetworker *NW)
        }
        else
        {
+               int Error = atol(ChrPtr(NW->IO.IOBuf));
                if (NW->IO.ErrMsg == NULL)
                        NW->IO.ErrMsg = NewStrBuf();
                StrBufPrintf(NW->IO.ErrMsg,
-                            "Connected to node \"%s\" but my secret wasn't accurate.",
-                            ChrPtr(NW->node));
-               EVN_syslog(LOG_ERR, "%s\n", ChrPtr(NW->IO.ErrMsg));
-               CtdlAideMessage(ChrPtr(NW->IO.ErrMsg), "Network error");
-               
+                            "Connected to node \"%s\" but my secret wasn't accurate.\nReason was:%s\n",
+                            ChrPtr(NW->node), ChrPtr(NW->IO.IOBuf) + 4);
+               if (Error == 552) {
+                       EVN_syslog(LOG_INFO,
+                                  "Already talking to %s; skipping this time.\n",
+                                  ChrPtr(NW->node));
+                       
+               }
+               else {
+                       EVN_syslog(LOG_ERR, "%s\n", ChrPtr(NW->IO.ErrMsg));
+                       CtdlAideMessage(ChrPtr(NW->IO.ErrMsg), "Network error");
+               }
                return eAbort;
        }
 }