diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:00:44 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:00:44 +0000 |
commit | 70b2f1981e76794f0de84427df733fc2e5eb5242 (patch) | |
tree | 265a4e1728a3197a3e416414e66d20ca08f855e9 /server.c | |
parent | cb0bf6a043377974bb40ace3c9782822c63b7ded (diff) |
Sync OpenBSD patchset 497:
Call event_init() before loading the config file, since potentially it could
set up events.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.218 2009-11-08 22:56:04 tcunha Exp $ */ +/* $Id: server.c,v 1.219 2009-11-08 23:00:44 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -167,6 +167,8 @@ server_start(char *path) server_fd = server_create_socket(); server_client_create(pair[1]); + event_init(); + if (access(SYSTEM_CFG, R_OK) == 0) { if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0) goto error; @@ -177,8 +179,6 @@ server_start(char *path) if (cfg_file != NULL && load_cfg(cfg_file, NULL, &cause) != 0) goto error; - event_init(); - event_set(&server_ev_accept, server_fd, EV_READ|EV_PERSIST, server_accept_callback, NULL); event_add(&server_ev_accept, NULL); |