summaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-08 20:49:19 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-08 20:49:19 -0700
commit89a00ee63ae61e707343432dd9f74702cf60ac3c (patch)
tree4d13e8e586878e33457e4bbaa7f6c431860795a0 /src/or/channel.c
parentee4e88e4d9891a24334870616067d21580f95704 (diff)
downloadtor-89a00ee63ae61e707343432dd9f74702cf60ac3c.tar.gz
tor-89a00ee63ae61e707343432dd9f74702cf60ac3c.zip
Use typedefs for function pointer return values and s/listener/listener_fn/ for distinctness
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index cdb0830c87..9fbfecb1d9 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -823,9 +823,8 @@ channel_force_free(channel_t *chan)
* @return Function pointer to an incoming channel handler
*/
-void
-(* channel_get_listener(channel_t *chan))
- (channel_t *, channel_t *)
+channel_listener_fn_ptr
+channel_get_listener_fn(channel_t *chan)
{
tor_assert(chan);
tor_assert(chan->is_listener);
@@ -847,8 +846,8 @@ void
*/
void
-channel_set_listener(channel_t *chan,
- void (*listener)(channel_t *, channel_t *) )
+channel_set_listener_fn(channel_t *chan,
+ channel_listener_fn_ptr listener)
{
tor_assert(chan);
tor_assert(chan->is_listener);
@@ -872,9 +871,8 @@ channel_set_listener(channel_t *chan,
* @return A function pointer to chan's fixed-length cell handler, if any.
*/
-void
-(* channel_get_cell_handler(channel_t *chan))
- (channel_t *, cell_t *)
+channel_cell_handler_fn_ptr
+channel_get_cell_handler(channel_t *chan)
{
tor_assert(chan);
tor_assert(!(chan->is_listener));
@@ -897,9 +895,8 @@ void
* @return A function pointer to chan's variable-length cell handler, if any.
*/
-void
-(* channel_get_var_cell_handler(channel_t *chan))
- (channel_t *, var_cell_t *)
+channel_var_cell_handler_fn_ptr
+channel_get_var_cell_handler(channel_t *chan)
{
tor_assert(chan);
tor_assert(!(chan->is_listener));
@@ -927,9 +924,9 @@ void
void
channel_set_cell_handlers(channel_t *chan,
- void (*cell_handler)(channel_t *, cell_t *),
- void (*var_cell_handler)(channel_t *,
- var_cell_t *))
+ channel_cell_handler_fn_ptr cell_handler,
+ channel_var_cell_handler_fn_ptr
+ var_cell_handler)
{
int try_again = 0;