diff options
author | Thomas Adam <thomas@xteddy.org> | 2012-11-22 13:24:14 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2012-11-22 13:24:14 +0000 |
commit | c04aa9020782fe0a944db2adf5a03e9f52618bea (patch) | |
tree | 37c0578ed65f027e2cbd95671fb3a6ccab4ce547 /server.c | |
parent | e4679172e3f4307b14f0e1715dc33ca640dc038b (diff) | |
parent | 0679eb6a6d6bab129264784009e70333b34ca6a8 (diff) | |
download | rtmux-c04aa9020782fe0a944db2adf5a03e9f52618bea.tar.gz rtmux-c04aa9020782fe0a944db2adf5a03e9f52618bea.tar.bz2 rtmux-c04aa9020782fe0a944db2adf5a03e9f52618bea.zip |
Merge branch 'obsd-master'
Sync from OpenBSD.
* obsd-master:
Add halfpage commands to mode command string table (missed by accident), from Thomas Adam.
Clarify some points about config files, notably that they are only read at server start. From Thomas Adam.
Use a utility function for common code to show errors in config file, from Thomas Adam.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -105,11 +105,8 @@ server_create_socket(void) int server_start(int lockfd, char *lockfile) { - struct window_pane *wp; - int pair[2]; - char *cause; - struct timeval tv; - u_int i; + int pair[2]; + struct timeval tv; /* The first client is special and gets a socketpair; create it. */ if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pair) != 0) @@ -179,17 +176,9 @@ server_start(int lockfd, char *lockfile) * If there is a session already, put the current window and pane into * more mode. */ - if (!RB_EMPTY(&sessions) && !ARRAY_EMPTY(&cfg_causes)) { - wp = RB_MIN(sessions, &sessions)->curw->window->active; - window_pane_set_mode(wp, &window_copy_mode); - window_copy_init_for_output(wp); - for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) { - cause = ARRAY_ITEM(&cfg_causes, i); - window_copy_add(wp, "%s", cause); - free(cause); - } - ARRAY_FREE(&cfg_causes); - } + if (!RB_EMPTY(&sessions) && !ARRAY_EMPTY(&cfg_causes)) + show_cfg_causes(RB_MIN(sessions, &sessions)); + cfg_finished = 1; server_add_accept(0); |