Преглед на файлове

* Port [3184] to 1.2.14
* Fix killsock() warning when removing hubs.



svn: 3185

Bryan Drewery преди 19 години
родител
ревизия
d75b612c84
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/userrec.c

+ 3 - 1
src/userrec.c

@@ -649,7 +649,9 @@ int deluser(char *handle)
         if (i != -1 && !egg_strcasecmp(dcc[i].nick, handle))
         if (i != -1 && !egg_strcasecmp(dcc[i].nick, handle))
           botunlink(-1, handle, "Bot removed.");
           botunlink(-1, handle, "Bot removed.");
         else { /* This will probably never be called -- but just in case */
         else { /* This will probably never be called -- but just in case */
-          killsock(dcc[fnd].sock);
+          /* Kill link in attempt/progress */
+          if (dcc[fnd].sock != -1)
+            killsock(dcc[fnd].sock);
           lostdcc(fnd);
           lostdcc(fnd);
         }
         }
       } else if (!u->bot) {
       } else if (!u->bot) {