Author: pjd
Date: Mon Aug 30 23:16:45 2010
New Revision: 212036
URL: http://svn.freebsd.org/changeset/base/212036

Log:
  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

Modified:
  head/sbin/hastd/proto_socketpair.c

Modified: head/sbin/hastd/proto_socketpair.c
==============================================================================
--- head/sbin/hastd/proto_socketpair.c  Mon Aug 30 22:45:32 2010        
(r212035)
+++ head/sbin/hastd/proto_socketpair.c  Mon Aug 30 23:16:45 2010        
(r212036)
@@ -140,6 +140,10 @@ sp_send(void *ctx, const unsigned char *
                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, 
                abort();
        }
 
+       /* Someone is just trying to decide about side. */
+       if (data == NULL)
+               return (0);
+
        return (proto_common_recv(fd, data, size));
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to