diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-04-28 18:16:31 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-04-28 23:40:49 +0200 |
commit | dff720b49b581d1937cc0aab8256f9eb8cce207e (patch) | |
tree | 7e64e4560ce2d2ee8ad7ee73b48abcb926edc4b7 /kike.c | |
parent | 507d444e0d6f16f3d0f6fd0af3476b671db2e9cc (diff) | |
download | xK-dff720b49b581d1937cc0aab8256f9eb8cce207e.tar.gz xK-dff720b49b581d1937cc0aab8256f9eb8cce207e.tar.xz xK-dff720b49b581d1937cc0aab8256f9eb8cce207e.zip |
kike: no more shooting ourselves in the foot
Just zero out the whole structure.
Diffstat (limited to 'kike.c')
-rw-r--r-- | kike.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -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); |