Some changes for libratbox.
This commit is contained in:
parent
780087dc8e
commit
527ec9116a
10
src/client.c
10
src/client.c
|
@ -2072,9 +2072,9 @@ close_connection(struct Client *client_p)
|
|||
{
|
||||
/* attempt to flush any pending dbufs. Evil, but .. -- adrian */
|
||||
if(!IsIOError(client_p))
|
||||
send_queued_write(client_p->localClient->F->fd, client_p);
|
||||
send_queued(client_p);
|
||||
|
||||
rb_close(client_p->localClient->F->fd);
|
||||
rb_close(client_p->localClient->F);
|
||||
client_p->localClient->F = NULL;
|
||||
}
|
||||
|
||||
|
@ -2084,8 +2084,8 @@ close_connection(struct Client *client_p)
|
|||
client_p->localClient->ctrlfd = -1;
|
||||
}
|
||||
|
||||
linebuf_donebuf(&client_p->localClient->buf_sendq);
|
||||
linebuf_donebuf(&client_p->localClient->buf_recvq);
|
||||
rb_linebuf_donebuf(&client_p->localClient->buf_sendq);
|
||||
rb_linebuf_donebuf(&client_p->localClient->buf_recvq);
|
||||
detach_conf(client_p);
|
||||
|
||||
/* XXX shouldnt really be done here. */
|
||||
|
@ -2111,7 +2111,7 @@ error_exit_client(struct Client *client_p, int error)
|
|||
* for reading even though it ends up being an EOF. -avalon
|
||||
*/
|
||||
char errmsg[255];
|
||||
int current_error = rb_get_sockerr(client_p->localClient->F->fd);
|
||||
int current_error = rb_get_sockerr(client_p->localClient->F);
|
||||
|
||||
SetIOError(client_p);
|
||||
|
||||
|
|
|
@ -541,7 +541,7 @@ inetpton_sock(const char *src, struct sockaddr *dst)
|
|||
{
|
||||
((struct sockaddr_in *) dst)->sin_port = 0;
|
||||
((struct sockaddr_in *) dst)->sin_family = AF_INET;
|
||||
SET_SS_LEN(*((struct irc_sockaddr_storage *) dst), sizeof(struct sockaddr_in));
|
||||
SET_SS_LEN((struct irc_sockaddr_storage *) dst, sizeof(struct sockaddr_in));
|
||||
return 1;
|
||||
}
|
||||
#ifdef IPV6
|
||||
|
@ -549,7 +549,7 @@ inetpton_sock(const char *src, struct sockaddr *dst)
|
|||
{
|
||||
((struct sockaddr_in6 *) dst)->sin6_port = 0;
|
||||
((struct sockaddr_in6 *) dst)->sin6_family = AF_INET6;
|
||||
SET_SS_LEN(*((struct irc_sockaddr_storage *) dst), sizeof(struct sockaddr_in6));
|
||||
SET_SS_LEN((struct irc_sockaddr_storage *) dst, sizeof(struct sockaddr_in6));
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
|
18
src/ircd.c
18
src/ircd.c
|
@ -63,7 +63,6 @@
|
|||
#include "ircd_getopt.h"
|
||||
#include "balloc.h"
|
||||
#include "newconf.h"
|
||||
#include "patricia.h"
|
||||
#include "reject.h"
|
||||
#include "s_conf.h"
|
||||
#include "s_newconf.h"
|
||||
|
@ -85,6 +84,8 @@ extern int ServerRunning;
|
|||
extern struct LocalUser meLocalUser;
|
||||
extern char **myargv;
|
||||
|
||||
extern int maxconnections; /* XXX */
|
||||
|
||||
/*
|
||||
* print_startup - print startup information
|
||||
*/
|
||||
|
@ -250,7 +251,7 @@ set_time(void)
|
|||
|
||||
#endif
|
||||
if(newtime.tv_sec < CurrentTime)
|
||||
set_back_events(CurrentTime - newtime.tv_sec);
|
||||
rb_set_back_events(CurrentTime - newtime.tv_sec);
|
||||
|
||||
SystemTime.tv_sec = newtime.tv_sec;
|
||||
SystemTime.tv_usec = newtime.tv_usec;
|
||||
|
@ -295,9 +296,9 @@ charybdis_io_loop(void)
|
|||
* event
|
||||
*/
|
||||
|
||||
delay = eventNextTime();
|
||||
delay = rb_event_next();
|
||||
if(delay <= CurrentTime)
|
||||
eventRun();
|
||||
rb_event_run();
|
||||
|
||||
|
||||
rb_select(250);
|
||||
|
@ -564,16 +565,9 @@ main(int argc, char *argv[])
|
|||
/* Init the event subsystem */
|
||||
init_sys();
|
||||
libcharybdis_init(ircd_log_cb, restart, ircd_die_cb);
|
||||
rb_lib_init(ircd_log_cb, restart, ircd_die_cb);
|
||||
|
||||
fdlist_init();
|
||||
if(!server_state_foreground)
|
||||
{
|
||||
rb_close_all();
|
||||
}
|
||||
rb_lib_init(ircd_log_cb, restart, ircd_die_cb, !server_state_foreground, maxconnections, DNODE_HEAP_SIZE, FD_HEAP_SIZE);
|
||||
|
||||
init_main_logfile();
|
||||
init_patricia();
|
||||
newconf_init();
|
||||
init_s_conf();
|
||||
init_s_newconf();
|
||||
|
|
Loading…
Reference in New Issue