1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

Give file descriptor to callback of hook_fd

This commit is contained in:
Sebastien Helleu
2009-02-18 11:13:23 +01:00
parent e263a847da
commit 4d1fdfade0
23 changed files with 80 additions and 36 deletions
+5 -2
View File
@@ -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
}