[BACK]Return to server-fn.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/server-fn.c between version 1.18 and 1.19

version 1.18, 2009/09/05 17:42:16 version 1.19, 2009/09/12 13:01:19
Line 272 
Line 272 
 {  {
         struct session  *s;          struct session  *s;
         struct winlink  *wl;          struct winlink  *wl;
         struct client   *c;          u_int            i;
         u_int            i, j;  
         int              destroyed;  
   
   
         for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {          for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
                 s = ARRAY_ITEM(&sessions, i);                  s = ARRAY_ITEM(&sessions, i);
Line 284 
Line 281 
                 if ((wl = winlink_find_by_window(&s->windows, w)) == NULL)                  if ((wl = winlink_find_by_window(&s->windows, w)) == NULL)
                         continue;                          continue;
   
                 destroyed = session_detach(s, wl);                  if (session_detach(s, wl))
                 for (j = 0; j < ARRAY_LENGTH(&clients); j++) {                          server_destroy_session(s);
                         c = ARRAY_ITEM(&clients, j);                  else
                         if (c == NULL || c->session != s)                          server_redraw_session(s);
                                 continue;  
   
                         if (destroyed) {  
                                 c->session = NULL;  
                                 server_write_client(c, MSG_EXIT, NULL, 0);  
                         } else  
                                 server_redraw_client(c);  
                 }  
         }          }
         recalculate_sizes();          recalculate_sizes();
   }
   
   void
   server_destroy_session(struct session *s)
   {
           struct client   *c;
           u_int            i;
   
           for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                   c = ARRAY_ITEM(&clients, i);
                   if (c == NULL || c->session != s)
                           continue;
                   c->session = NULL;
                   server_write_client(c, MSG_EXIT, NULL, 0);
           }
 }  }
   
 void  void

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19