summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/red_channel.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index 18c7f35..0a36698 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -203,17 +203,13 @@ void red_channel_default_peer_on_error(RedChannel *channel)
channel->disconnect(channel);
}
-static void red_channel_peer_on_incoming_error(void *opaque)
+static void red_channel_peer_on_incoming_error(RedChannel *channel)
{
- RedChannel *channel = (RedChannel *)opaque;
-
channel->on_incoming_error(channel);
}
-static void red_channel_peer_on_outgoing_error(void *opaque)
+static void red_channel_peer_on_outgoing_error(RedChannel *channel)
{
- RedChannel *channel = (RedChannel *)opaque;
-
channel->on_outgoing_error(channel);
}
@@ -430,8 +426,8 @@ RedChannel *red_channel_create_parser(int size, RedsStream *stream,
channel->incoming.parser = parser;
channel->on_incoming_error = incoming_error;
channel->on_outgoing_error = outgoing_error;
- channel->incoming.on_error = red_channel_peer_on_incoming_error;
- channel->outgoing.on_error = red_channel_peer_on_outgoing_error;
+ channel->incoming.on_error = (on_incoming_error_proc)red_channel_peer_on_incoming_error;
+ channel->outgoing.on_error = (on_outgoing_error_proc)red_channel_peer_on_outgoing_error;
return channel;
}