kike: no more shooting ourselves in the foot
Just zero out the whole structure.
This commit is contained in:
parent
507d444e0d
commit
dff720b49b
13
kike.c
13
kike.c
@ -557,11 +557,7 @@ on_irc_quit_timeout (void *user_data)
|
||||
static void
|
||||
server_context_init (struct server_context *self)
|
||||
{
|
||||
self->listen_fds = NULL;
|
||||
self->listen_events = NULL;
|
||||
self->n_listen_fds = 0;
|
||||
self->clients = NULL;
|
||||
self->n_clients = 0;
|
||||
memset (self, 0, sizeof *self);
|
||||
|
||||
str_map_init (&self->users);
|
||||
self->users.key_xfrm = irc_strxfrm;
|
||||
@ -572,21 +568,14 @@ server_context_init (struct server_context *self)
|
||||
self->handlers.key_xfrm = irc_strxfrm;
|
||||
|
||||
poller_init (&self->poller);
|
||||
self->quitting = false;
|
||||
self->polling = false;
|
||||
poller_timer_init (&self->quit_timer, &self->poller);
|
||||
self->quit_timer.dispatcher = on_irc_quit_timeout;
|
||||
self->quit_timer.user_data = self;
|
||||
|
||||
memset (&self->signal_event, 0, sizeof self->signal_event);
|
||||
|
||||
str_map_init (&self->config);
|
||||
self->config.free = free;
|
||||
load_config_defaults (&self->config, g_config_table);
|
||||
|
||||
self->server_name = NULL;
|
||||
self->ping_interval = 0;
|
||||
self->max_connections = 0;
|
||||
str_vector_init (&self->motd);
|
||||
self->catalog = (nl_catd) -1;
|
||||
str_map_init (&self->operators);
|
||||
|
Loading…
Reference in New Issue
Block a user