diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-hook.c | 3 | ||||
-rw-r--r-- | src/core/wee-hook.h | 2 | ||||
-rw-r--r-- | src/core/wee-network.c | 7 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index eab5ea6d1..cf07dd670 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -949,7 +949,8 @@ hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds) && (FD_ISSET(HOOK_FD(ptr_hook, fd), exception_fds))))) { ptr_hook->running = 1; - (void) (HOOK_FD(ptr_hook, callback)) (ptr_hook->callback_data); + (void) (HOOK_FD(ptr_hook, callback)) (ptr_hook->callback_data, + HOOK_FD(ptr_hook, fd)); ptr_hook->running = 0; } diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 11801bc56..397156abf 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -126,7 +126,7 @@ struct t_hook_timer struct timeval next_exec; /* next scheduled execution */ }; -typedef int (t_hook_callback_fd)(void *data); +typedef int (t_hook_callback_fd)(void *data, int fd); struct t_hook_fd { diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 3fb952095..10c8f12eb 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -752,7 +752,7 @@ network_connect_child (struct t_hook *hook_connect) */ int -network_connect_child_read_cb (void *arg_hook_connect) +network_connect_child_read_cb (void *arg_hook_connect, int fd) { struct t_hook *hook_connect; char buffer[1], buf_size_ip[6], *ip_address, *error; @@ -761,6 +761,9 @@ network_connect_child_read_cb (void *arg_hook_connect) #ifdef HAVE_GNUTLS int rc; #endif + + /* make C compiler happy */ + (void) fd; hook_connect = (struct t_hook *)arg_hook_connect; @@ -914,7 +917,7 @@ network_connect_with_fork (struct t_hook *hook_connect) HOOK_CONNECT(hook_connect, hook_fd) = hook_fd (NULL, HOOK_CONNECT(hook_connect, child_read), 1, 0, 0, - network_connect_child_read_cb, + &network_connect_child_read_cb, hook_connect); #endif } |