1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 18:43:12 +02:00

- Move serv_fdlist accounting over to new server_list.

This commit is contained in:
William Pitcock
2012-11-24 19:56:10 +00:00
parent 3b1984cdd8
commit 024ef23ec6
3 changed files with 2 additions and 49 deletions
+1 -3
View File
@@ -761,9 +761,7 @@ int m_server_synch(aClient *cptr, long numeric, ConfigItem_link *aconf)
IRCstats.me_servers++;
IRCstats.servers++;
IRCstats.unknown--;
#ifndef NO_FDLIST
addto_fdlist(cptr->slot, &serv_fdlist);
#endif
list_add(&cptr->special_node, &server_list);
if ((Find_uline(cptr->name)))
cptr->flags |= FLAGS_ULINE;
(void)find_or_add(cptr->name);
+1 -43
View File
@@ -132,7 +132,6 @@ MODVAR TS last_allinuse = 0;
#ifndef NO_FDLIST
extern fdlist default_fdlist;
extern fdlist serv_fdlist;
extern fdlist oper_fdlist;
extern fdlist socks_fdlist;
#endif
@@ -1086,48 +1085,7 @@ void close_connection(aClient *cptr)
}
cptr->from = NULL; /* ...this should catch them! >:) --msa */
/*
* fd remap to keep local[i] filled at the bottom.
*/
#if 0
#ifdef DO_REMAPPING
if (empty > 0)
if ((j = LastSlot) > (i = empty) &&
(local[j]->status != STAT_LOG))
{
if (dup2(j, i) == -1)
return;
local[i] = local[j];
local[i]->fd = i;
#ifdef USE_SSL
/* I didn't know the code above existed, which
fucked up SSL -Stskeeps
*/
if ((local[i]->flags & FLAGS_SSL) && local[i]->ssl)
{
/* !! RISKY !! --Stskeeps */
SSL_change_fd((SSL *) local[i]->ssl, local[i]->fd);
}
#endif
local[j] = NULL;
#ifndef NO_FDLIST
/* update server list */
if (IsServer(local[i]))
{
delfrom_fdlist(j, &serv_fdlist);
addto_fdlist(i, &serv_fdlist);
}
if (IsAnOper(local[i]))
{
delfrom_fdlist(j, &oper_fdlist);
addto_fdlist(i, &oper_fdlist);
}
#endif
fd_close(j);
--OpenFiles;
}
#endif
#endif
return;
}
-3
View File
@@ -56,7 +56,6 @@ Computing Center and Jarkko Oikarinen";
#include <string.h>
#ifndef NO_FDLIST
extern fdlist serv_fdlist;
extern fdlist oper_fdlist;
#endif
extern ircstats IRCstats;
@@ -504,8 +503,6 @@ int exit_client(aClient *cptr, aClient *sptr, aClient *from, char *comment)
#endif
if (IsAnOper(sptr))
delfrom_fdlist(sptr->slot, &oper_fdlist);
if (IsServer(sptr))
delfrom_fdlist(sptr->slot, &serv_fdlist);
#endif
if (sptr->class)
{