mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Sync OpenBSD patchset 497:
Call event_init() before loading the config file, since potentially it could set up events.
This commit is contained in:
parent
cb0bf6a043
commit
70b2f1981e
6
server.c
6
server.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user