[BACK]Return to channels.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/channels.c between version 1.224 and 1.225

version 1.224, 2005/09/07 08:53:53 version 1.225, 2005/10/10 10:23:08
Line 268 
Line 268 
         c->force_drain = 0;          c->force_drain = 0;
         c->single_connection = 0;          c->single_connection = 0;
         c->detach_user = NULL;          c->detach_user = NULL;
           c->detach_close = 0;
         c->confirm = NULL;          c->confirm = NULL;
         c->confirm_ctx = NULL;          c->confirm_ctx = NULL;
         c->input_filter = NULL;          c->input_filter = NULL;
Line 627 
Line 628 
         c->confirm_ctx = ctx;          c->confirm_ctx = ctx;
 }  }
 void  void
 channel_register_cleanup(int id, channel_callback_fn *fn)  channel_register_cleanup(int id, channel_callback_fn *fn, int do_close)
 {  {
         Channel *c = channel_lookup(id);          Channel *c = channel_lookup(id);
   
Line 636 
Line 637 
                 return;                  return;
         }          }
         c->detach_user = fn;          c->detach_user = fn;
           c->detach_close = do_close;
 }  }
 void  void
 channel_cancel_cleanup(int id)  channel_cancel_cleanup(int id)
Line 647 
Line 649 
                 return;                  return;
         }          }
         c->detach_user = NULL;          c->detach_user = NULL;
           c->detach_close = 0;
 }  }
 void  void
 channel_register_filter(int id, channel_filter_fn *fn)  channel_register_filter(int id, channel_filter_fn *fn)
Line 1660 
Line 1663 
         if (c == NULL)          if (c == NULL)
                 return;                  return;
         if (c->detach_user != NULL) {          if (c->detach_user != NULL) {
                 if (!chan_is_dead(c, 0))                  if (!chan_is_dead(c, c->detach_close))
                         return;                          return;
                 debug2("channel %d: gc: notify user", c->self);                  debug2("channel %d: gc: notify user", c->self);
                 c->detach_user(c->self, NULL);                  c->detach_user(c->self, NULL);

Legend:
Removed from v.1.224  
changed lines
  Added in v.1.225