svn: 1099
@@ -521,9 +521,11 @@ void real_killsock(register int sock, const char *file, int line)
{
register int i;
- /* Ignore invalid sockets. */
- if (sock < 0)
+ if (sock < 0) {
+ putlog(LOG_MISC, "*", "Attempt to kill socket -1 %s:%d", file, line);
return;
+ }
+
for (i = 0; i < MAXSOCKS; i++) {
if ((socklist[i].sock == sock) && !(socklist[i].flags & SOCK_UNUSED)) {
dropssl(sock);
@@ -1258,6 +1258,7 @@ void autolink_cycle(char *start)
}
putlog(LOG_DEBUG, "@", "Picking random hub from %d hubs", hlc);
+ /* This is mainly a sanity check if the userfile gets fucked :P */
if (!hlc)
fatal("userlist died!", 0);
hlc = randint(hlc);