summaryrefslogtreecommitdiffhomepage
path: root/common-channel.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-28 09:06:40 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-28 09:06:40 +0800
commit31e379c300c69f1a628c74a3226346a48416e568 (patch)
tree629758aafe9ce42ce0061bebd7253ec7b49d65f2 /common-channel.c
parent843953379c1f6ce56e993c82d97c268e31a86e6e (diff)
parent59bb1777be18b8f1b263aaeabe54a32933fc871d (diff)
merge from default
--HG-- branch : fastopen
Diffstat (limited to 'common-channel.c')
-rw-r--r--common-channel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/common-channel.c b/common-channel.c
index 5e32cc3..3622729 100644
--- a/common-channel.c
+++ b/common-channel.c
@@ -395,7 +395,7 @@ void channel_connect_done(int result, int sock, void* user_data, const char* UNU
/* Send the close message and set the channel as closed */
static void send_msg_channel_close(struct Channel *channel) {
- TRACE(("enter send_msg_channel_close %p", channel))
+ TRACE(("enter send_msg_channel_close %p", (void*)channel))
if (channel->type->closehandler
&& !channel->close_handler_done) {
channel->type->closehandler(channel);
@@ -578,11 +578,11 @@ static void remove_channel(struct Channel * channel) {
/* close the FDs in case they haven't been done
* yet (they might have been shutdown etc) */
TRACE(("CLOSE writefd %d", channel->writefd))
- close(channel->writefd);
+ m_close(channel->writefd);
TRACE(("CLOSE readfd %d", channel->readfd))
- close(channel->readfd);
+ m_close(channel->readfd);
TRACE(("CLOSE errfd %d", channel->errfd))
- close(channel->errfd);
+ m_close(channel->errfd);
}
if (!channel->close_handler_done
@@ -612,7 +612,7 @@ void recv_msg_channel_request() {
channel = getchannel();
- TRACE(("enter recv_msg_channel_request %p", channel))
+ TRACE(("enter recv_msg_channel_request %p", (void*)channel))
if (channel->sent_close) {
TRACE(("leave recv_msg_channel_request: already closed channel"))
@@ -997,7 +997,7 @@ static void close_chan_fd(struct Channel *channel, int fd, int how) {
}
} else {
TRACE(("CLOSE some fd %d", fd))
- close(fd);
+ m_close(fd);
closein = closeout = 1;
}
@@ -1020,7 +1020,7 @@ static void close_chan_fd(struct Channel *channel, int fd, int how) {
if (channel->type->sepfds && channel->readfd == FD_CLOSED
&& channel->writefd == FD_CLOSED && channel->errfd == FD_CLOSED) {
TRACE(("CLOSE (finally) of %d", fd))
- close(fd);
+ m_close(fd);
}
}
@@ -1137,10 +1137,10 @@ void send_msg_request_failure() {
}
struct Channel* get_any_ready_channel() {
+ size_t i;
if (ses.chancount == 0) {
return NULL;
}
- size_t i;
for (i = 0; i < ses.chansize; i++) {
struct Channel *chan = ses.channels[i];
if (chan