summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/primary.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-04-02 09:25:13 +0000
committerpjd <pjd@FreeBSD.org>2011-04-02 09:25:13 +0000
commit52d273ec9959ccf9598a661f0a5a837ee5579642 (patch)
treeaa8444fa1d6e606bb8bcd8bbb619f18137d90429 /sbin/hastd/primary.c
parent0a787e13ebdc9ffd37cc7980f2ba4f69d85ecb1b (diff)
downloadFreeBSD-src-52d273ec9959ccf9598a661f0a5a837ee5579642.zip
FreeBSD-src-52d273ec9959ccf9598a661f0a5a837ee5579642.tar.gz
Declare directions for sockets between primary and secondary.
In HAST we use two sockets - one for only sending the data and one for only receiving the data. MFC after: 1 month
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r--sbin/hastd/primary.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 2c5aa0f..7c7c93b 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -701,6 +701,11 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
(void)hast_activemap_flush(res);
}
nv_free(nvin);
+ /* Setup directions. */
+ if (proto_send(out, NULL, 0) == -1)
+ pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
+ if (proto_recv(in, NULL, 0) == -1)
+ pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
pjdlog_info("Connected to %s.", res->hr_remoteaddr);
if (inp != NULL && outp != NULL) {
*inp = in;
OpenPOWER on IntegriCloud