diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-03-29 21:02:34 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-03-29 21:02:34 +0000 |
commit | 621fa0a686cab46de5906b6a1c5ef2fac197a49e (patch) | |
tree | 3fecddd7a90649bcddd8fccf859be13ff2c9e7b2 /client.c | |
parent | 2e2c9bd623455038633d633a96ba4ca66624c25c (diff) | |
download | rtmux-621fa0a686cab46de5906b6a1c5ef2fac197a49e.tar.gz rtmux-621fa0a686cab46de5906b6a1c5ef2fac197a49e.tar.bz2 rtmux-621fa0a686cab46de5906b6a1c5ef2fac197a49e.zip |
Sync OpenBSD patchset 1071:
Move MSG_IDENTIFY to the last sent by the client, this will be needed by
control clients and irrelevant for others.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -252,11 +252,6 @@ client_send_identify(int flags) strlcpy(data.term, term, sizeof data.term) >= sizeof data.term) *data.term = '\0'; - if ((fd = dup(STDIN_FILENO)) == -1) - fatal("dup failed"); - imsg_compose(&client_ibuf, - MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data); - if ((fd = dup(STDOUT_FILENO)) == -1) fatal("dup failed"); imsg_compose(&client_ibuf, @@ -266,6 +261,11 @@ client_send_identify(int flags) fatal("dup failed"); imsg_compose(&client_ibuf, MSG_STDERR, PROTOCOL_VERSION, -1, fd, NULL, 0); + + if ((fd = dup(STDIN_FILENO)) == -1) + fatal("dup failed"); + imsg_compose(&client_ibuf, + MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data); } /* Forward entire environment to server. */ |