From d1feaeb2820c7566c6d82a2e7dbb62d237eeb440 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Fri, 12 Nov 2010 11:18:30 +0200 Subject: server/red_channel: no opaque in red_channel_peer_on_*_error --- server/red_channel.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'server') diff --git a/server/red_channel.c b/server/red_channel.c index 18c7f355..0a36698c 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; } -- cgit