aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-02 21:39:34 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-02 21:39:34 +0000
commitee1cc9f415ff4345577b75c750f71ab4589f97c1 (patch)
treee0eebd578165d450b5ec3a95cf0dd160aeb0c348
parent053e40572c32d021ad8bd2922c97c5e6dcbe2c81 (diff)
downloadrtmux-ee1cc9f415ff4345577b75c750f71ab4589f97c1.tar.gz
rtmux-ee1cc9f415ff4345577b75c750f71ab4589f97c1.tar.bz2
rtmux-ee1cc9f415ff4345577b75c750f71ab4589f97c1.zip
Sync OpenBSD patchset 476:
Reorder slightly to tidy code.
-rw-r--r--server.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/server.c b/server.c
index faf9096b..bea6f5d7 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.214 2009-10-28 23:14:15 tcunha Exp $ */
+/* $Id: server.c,v 1.215 2009-11-02 21:39:34 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -275,14 +275,13 @@ server_start(char *path)
srv_fd = server_create_socket();
server_client_create(pair[1]);
- if (access(SYSTEM_CFG, R_OK) != 0) {
- if (errno != ENOENT) {
- xasprintf(
- &cause, "%s: %s", strerror(errno), SYSTEM_CFG);
+ if (access(SYSTEM_CFG, R_OK) == 0) {
+ if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0)
goto error;
- }
- } else if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0)
+ } else if (errno != ENOENT) {
+ xasprintf(&cause, "%s: %s", strerror(errno), SYSTEM_CFG);
goto error;
+ }
if (cfg_file != NULL && load_cfg(cfg_file, NULL, &cause) != 0)
goto error;