Procházet zdrojové kódy

* Fixed a problem with accepting new telnet connections.

svn: 1962
Bryan Drewery před 21 roky
rodič
revize
363634fc13
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 1 0
      doc/UPDATES
  2. 2 1
      src/dcc.c

+ 1 - 0
doc/UPDATES

@@ -53,6 +53,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Setting -take now automatically sets +fastop as well (#13).
 * Setting -take now automatically sets +fastop as well (#13).
 * Added cmd_version (does same as .botversion)
 * Added cmd_version (does same as .botversion)
 * Fixed userfile becoming desynced during transfer; A bot downloading a userfile would miss changes made during the transfer. (#11)
 * Fixed userfile becoming desynced during transfer; A bot downloading a userfile would miss changes made during the transfer. (#11)
+* Fixed a problem with accepting new telnet connections.
 
 
 1.2.2
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 2 - 1
src/dcc.c

@@ -1232,10 +1232,11 @@ dcc_telnet(int idx, char *buf, int ii)
   int sock = answer(dcc[idx].sock, s, &ip, &port, 0);
   int sock = answer(dcc[idx].sock, s, &ip, &port, 0);
 
 
   while ((sock == -1) && (errno == EAGAIN))
   while ((sock == -1) && (errno == EAGAIN))
-    sock = answer(sock, s, &ip, &port, 0);
+    sock = answer(dcc[idx].sock, s, &ip, &port, 0);
 /*. ssl_link ACCEPT_SSL should go here!!!! */
 /*. ssl_link ACCEPT_SSL should go here!!!! */
   if (sock < 0) {
   if (sock < 0) {
     putlog(LOG_MISC, "*", DCC_FAILED, strerror(errno));
     putlog(LOG_MISC, "*", DCC_FAILED, strerror(errno));
+//    killsock(dcc[idx].sock);
     return;
     return;
   }
   }
   /* Buffer data received on this socket.  */
   /* Buffer data received on this socket.  */