version 1.224, 2005/09/07 08:53:53 |
version 1.225, 2005/10/10 10:23:08 |
|
|
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; |
|
|
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); |
|
|
|
|
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) |
|
|
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) |
|
|
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); |