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

Diff for /src/usr.bin/tmux/cmd-load-buffer.c between version 1.13 and 1.14

version 1.13, 2010/07/24 20:11:59 version 1.14, 2010/12/20 00:03:55
Line 81 
Line 81 
   
                 cdata = xmalloc(sizeof *cdata);                  cdata = xmalloc(sizeof *cdata);
                 cdata->session = s;                  cdata->session = s;
                   cdata->session->references++;
                 cdata->buffer = data->buffer;                  cdata->buffer = data->buffer;
                 c->stdin_data = cdata;                  c->stdin_data = cdata;
                 c->stdin_callback = cmd_load_buffer_callback;                  c->stdin_callback = cmd_load_buffer_callback;
Line 144 
Line 145 
         char                            *pdata;          char                            *pdata;
         size_t                           psize;          size_t                           psize;
         u_int                            limit;          u_int                            limit;
         int                              idx;  
   
         /*          /*
          * Event callback has already checked client is not dead and reduced           * Event callback has already checked client is not dead and reduced
Line 153 
Line 153 
         c->flags |= CLIENT_EXIT;          c->flags |= CLIENT_EXIT;
   
         /* Does the target session still exist? */          /* Does the target session still exist? */
         if (session_index(s, &idx) != 0)          if (!session_alive(s))
                 goto out;                  goto out;
   
         psize = EVBUFFER_LENGTH(c->stdin_event->input);          psize = EVBUFFER_LENGTH(c->stdin_event->input);
Line 180 
Line 180 
         }          }
   
 out:  out:
           cdata->session->references--;
         xfree(cdata);          xfree(cdata);
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14