[BACK]Return to cmd-attach-session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-attach-session.c between version 1.42 and 1.43

version 1.42, 2015/09/16 22:29:30 version 1.43, 2015/10/27 13:23:24
Line 113 
Line 113 
   
         if (c->session != NULL) {          if (c->session != NULL) {
                 if (dflag) {                  if (dflag) {
                         /*  
                          * Can't use server_write_session in case attaching to  
                          * the same session as currently attached to.  
                          */  
                         TAILQ_FOREACH(c_loop, &clients, entry) {                          TAILQ_FOREACH(c_loop, &clients, entry) {
                                 if (c_loop->session != s || c == c_loop)                                  if (c_loop->session != s || c == c_loop)
                                         continue;                                          continue;
                                 server_write_client(c, MSG_DETACH,                                  proc_send_s(c->peer, MSG_DETACH, s->name);
                                     c_loop->session->name,  
                                     strlen(c_loop->session->name) + 1);  
                         }                          }
                 }                  }
   
Line 150 
Line 144 
                         c->flags |= CLIENT_READONLY;                          c->flags |= CLIENT_READONLY;
   
                 if (dflag) {                  if (dflag) {
                         server_write_session(s, MSG_DETACH, s->name,                          TAILQ_FOREACH(c_loop, &clients, entry) {
                             strlen(s->name) + 1);                                  if (c_loop->session != s || c == c_loop)
                                           continue;
                                   proc_send_s(c->peer, MSG_DETACH, s->name);
                           }
                 }                  }
   
                 if (!Eflag) {                  if (!Eflag) {
Line 168 
Line 165 
                 server_redraw_client(c);                  server_redraw_client(c);
                 s->curw->flags &= ~WINLINK_ALERTFLAGS;                  s->curw->flags &= ~WINLINK_ALERTFLAGS;
   
                 server_write_ready(c);                  if (~c->flags & CLIENT_CONTROL)
                           proc_send(c->peer, MSG_READY, -1, NULL, 0);
                 cmdq->client_exit = 0;                  cmdq->client_exit = 0;
         }          }
         recalculate_sizes();          recalculate_sizes();

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43