summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-09-01 10:01:57 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-09-01 10:01:57 +0000
commit3f731f511581db20a4b8b0d3091216360fb21229 (patch)
tree2cc06012c81075ce986e320677771764f99889e4 /usr.bin/tmux/server.c
parent139d1399389601b5d2f1a58a44198692bc417ad4 (diff)
Move initial conf load into cfg.c.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r--usr.bin/tmux/server.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 53df569c3e3..bd479dc07d4 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.138 2015/08/30 22:19:07 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.139 2015/09/01 10:01:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -160,8 +160,7 @@ server_create_socket(void)
int
server_start(struct event_base *base, int lockfd, char *lockfile)
{
- int pair[2];
- char *cause;
+ int pair[2];
/* The first client is special and gets a socketpair; create it. */
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pair) != 0)
@@ -217,24 +216,8 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
free(lockfile);
close(lockfd);
- cfg_cmd_q = cmdq_new(NULL);
- cfg_cmd_q->emptyfn = cfg_default_done;
- cfg_finished = 0;
- cfg_references = 1;
- cfg_client = TAILQ_FIRST(&clients);
- if (cfg_client != NULL)
- cfg_client->references++;
-
- if (access(TMUX_CONF, R_OK) == 0) {
- if (load_cfg(TMUX_CONF, cfg_cmd_q, &cause) == -1)
- cfg_add_cause("%s: %s", TMUX_CONF, cause);
- } else if (errno != ENOENT)
- cfg_add_cause("%s: %s", TMUX_CONF, strerror(errno));
- if (cfg_file != NULL) {
- if (load_cfg(cfg_file, cfg_cmd_q, &cause) == -1)
- cfg_add_cause("%s: %s", cfg_file, cause);
- }
- cmdq_continue(cfg_cmd_q);
+ start_cfg();
+
status_prompt_load_history();
server_add_accept(0);