comparison common-channel.c @ 1038:d3925ed45a85

Fix for old compilers, variable declarations at beginning of functions and /**/ comments
author Thorsten Horstmann <thorsten.horstmann@web.de>
date Tue, 24 Feb 2015 20:51:18 +0800
parents 0bb16232e7c4
children d0e6dd5af46e
comparison
equal deleted inserted replaced
1037:7c899f24a85b 1038:d3925ed45a85
400 400
401 401
402 /* Send the close message and set the channel as closed */ 402 /* Send the close message and set the channel as closed */
403 static void send_msg_channel_close(struct Channel *channel) { 403 static void send_msg_channel_close(struct Channel *channel) {
404 404
405 TRACE(("enter send_msg_channel_close %p", channel)) 405 TRACE(("enter send_msg_channel_close %p", (void*)channel))
406 if (channel->type->closehandler 406 if (channel->type->closehandler
407 && !channel->close_handler_done) { 407 && !channel->close_handler_done) {
408 channel->type->closehandler(channel); 408 channel->type->closehandler(channel);
409 channel->close_handler_done = 1; 409 channel->close_handler_done = 1;
410 } 410 }
614 614
615 struct Channel *channel; 615 struct Channel *channel;
616 616
617 channel = getchannel(); 617 channel = getchannel();
618 618
619 TRACE(("enter recv_msg_channel_request %p", channel)) 619 TRACE(("enter recv_msg_channel_request %p", (void*)channel))
620 620
621 if (channel->sent_close) { 621 if (channel->sent_close) {
622 TRACE(("leave recv_msg_channel_request: already closed channel")) 622 TRACE(("leave recv_msg_channel_request: already closed channel"))
623 return; 623 return;
624 } 624 }
1139 buf_putbyte(ses.writepayload, SSH_MSG_REQUEST_FAILURE); 1139 buf_putbyte(ses.writepayload, SSH_MSG_REQUEST_FAILURE);
1140 encrypt_packet(); 1140 encrypt_packet();
1141 } 1141 }
1142 1142
1143 struct Channel* get_any_ready_channel() { 1143 struct Channel* get_any_ready_channel() {
1144 size_t i;
1144 if (ses.chancount == 0) { 1145 if (ses.chancount == 0) {
1145 return NULL; 1146 return NULL;
1146 } 1147 }
1147 size_t i;
1148 for (i = 0; i < ses.chansize; i++) { 1148 for (i = 0; i < ses.chansize; i++) {
1149 struct Channel *chan = ses.channels[i]; 1149 struct Channel *chan = ses.channels[i];
1150 if (chan 1150 if (chan
1151 && !(chan->sent_eof || chan->recv_eof) 1151 && !(chan->sent_eof || chan->recv_eof)
1152 && !(chan->await_open || chan->initconn)) { 1152 && !(chan->await_open || chan->initconn)) {