summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-26 15:26:11 +0200
committerMartin Mares <mj@ucw.cz>2000-04-26 15:26:11 +0200
commite1ddd9937759bc22b7241e48400d17840a101d9d (patch)
tree1d44afc5454a04e954613e7853edf38eade5c607 /sysdep/unix/main.c
parentdfa9a53a66e5747ddbeedfa0a47fa2ca9fc93b99 (diff)
downloadbird-e1ddd9937759bc22b7241e48400d17840a101d9d.tar
bird-e1ddd9937759bc22b7241e48400d17840a101d9d.zip
Changed handling of incoming connections, so that we can send data
from the send hook without worrying about existence of socket buffers. Also, don't forget to copy peer addresses.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 39ac352..621d85c 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -249,7 +249,6 @@ cli_connect(sock *s, int size)
s->rx_hook = cli_rx;
s->tx_hook = cli_tx;
s->err_hook = cli_err;
- s->rbsize = 1024;
s->data = c = cli_new(s);
s->pool = c->pool; /* We need to have all the socket buffers allocated in the cli pool */
c->rx_pos = c->rx_buf;
@@ -266,6 +265,7 @@ cli_init_unix(void)
s = cli_sk = sk_new(cli_pool);
s->type = SK_UNIX_PASSIVE;
s->rx_hook = cli_connect;
+ s->rbsize = 1024;
if (sk_open_unix(s, path_control_socket) < 0)
die("Unable to create control socket %s", path_control_socket);
}