diff options
author | pjd <pjd@FreeBSD.org> | 2010-08-30 23:16:45 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-08-30 23:16:45 +0000 |
commit | 95ca781a2e1c74abfb34c20c7cae2f9a43119ab5 (patch) | |
tree | 0a4e4101a2db45c30e3f6ef585ceb0967a82bb5f /sbin/hastd | |
parent | 2c5cbe34168802f7bb5bb0946a2b520b2ce4123a (diff) | |
download | FreeBSD-src-95ca781a2e1c74abfb34c20c7cae2f9a43119ab5.zip FreeBSD-src-95ca781a2e1c74abfb34c20c7cae2f9a43119ab5.tar.gz |
When someone gives NULL as data, assume this is because he want to declare
connection side only.
MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin/hastd')
-rw-r--r-- | sbin/hastd/proto_socketpair.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sbin/hastd/proto_socketpair.c b/sbin/hastd/proto_socketpair.c index 0d040f3..c0b41a4 100644 --- a/sbin/hastd/proto_socketpair.c +++ b/sbin/hastd/proto_socketpair.c @@ -140,6 +140,10 @@ sp_send(void *ctx, const unsigned char *data, size_t size) abort(); } + /* Someone is just trying to decide about side. */ + if (data == NULL) + return (0); + return (proto_common_send(fd, data, size)); } @@ -174,6 +178,10 @@ sp_recv(void *ctx, unsigned char *data, size_t size) abort(); } + /* Someone is just trying to decide about side. */ + if (data == NULL) + return (0); + return (proto_common_recv(fd, data, size)); } |