debug("channel_free: channel %d: dettaching channel user", id);
debug("channel_free: channel %d: dettaching channel user", c->self);
channel_free(int id){	Channel *c = channel_lookup(id);	char *s = channel_open_message();	if (c == NULL)		packet_disconnect("channel free: bad local channel %d", id);	debug("channel_free: channel %d: status: %s", id, s);	xfree(s);	if (c->dettach_user != NULL) {		debug("channel_free: channel %d: dettaching channel user", id);		c->dettach_user(c->self, NULL);	}	if (c->sock != -1)		shutdown(c->sock, SHUT_RDWR);	channel_close_fds(c);	buffer_free(&c->input);	buffer_free(&c->output);	buffer_free(&c->extended);	c->type = SSH_CHANNEL_FREE;	if (c->remote_name) {		xfree(c->remote_name);		c->remote_name = NULL;	}}