The branch, master has been updated
       via  412ac6bc3a690628f72101494ac88e91c7d3377c (commit)
      from  a6ad44f111a42553ad38a850a0e215914ea1f037 (commit)

- Log -----------------------------------------------------------------
commit 412ac6bc3a690628f72101494ac88e91c7d3377c
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>

    Use single stdout and stderr for control clients.
---
 server-client.c |    5 ++++-
 server-fn.c     |    4 ++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/server-client.c b/server-client.c
index b905a7c..77e6de7 100644
--- a/server-client.c
+++ b/server-client.c
@@ -153,7 +153,8 @@ server_client_lost(struct client *c)
 
        evbuffer_free (c->stdin_data);
        evbuffer_free (c->stdout_data);
-       evbuffer_free (c->stderr_data);
+       if (c->stderr_data != c->stdout_data)
+               evbuffer_free (c->stderr_data);
 
        status_free_jobs(&c->status_new);
        status_free_jobs(&c->status_old);
@@ -955,6 +956,8 @@ server_client_msg_identify(
 
        if (data->flags & IDENTIFY_CONTROL) {
                c->stdin_callback = control_callback;
+               evbuffer_free(c->stderr_data);
+               c->stderr_data = c->stdout_data;
                c->flags |= CLIENT_CONTROL;
                if (data->flags & IDENTIFY_TERMIOS)
                        evbuffer_add_printf(c->stdout_data, "\033P1000p");
diff --git a/server-fn.c b/server-fn.c
index 4d8a658..566925f 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -546,6 +546,10 @@ server_push_stderr(struct client *c)
        struct msg_stderr_data data;
        size_t                 size;
 
+       if (c->stderr_data == c->stdout_data) {
+               server_push_stdout(c);
+               return;
+       }
        size = EVBUFFER_LENGTH(c->stderr_data);
        if (size == 0)
                return;


-----------------------------------------------------------------------

Summary of changes:
 server-client.c |    5 ++++-
 server-fn.c     |    4 ++++
 2 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to