svn commit: r210870 - head/sbin/hastd

[ Available lists | Index of svn-src-head | Month of Aug 2010 | Week of 5 Aug 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Pawel Jakub Dawidek <pjd@FreeBSD.org>
Date
5 Aug 2010 17:57:59
Subject
svn commit: r210870 - head/sbin/hastd
Message-ID
201008051757.o75Hvx0g062767@svn.freebsd.org


[ Hide this part ]
Author: pjd
Date: Thu Aug 5 17:57:59 2010
New Revision: 210870
URL: http://svn.freebsd.org/changeset/base/210870

Log:
Now that TCP will be checked last we don't need any knowledge about other
protocols.

MFC after: 1 month

Modified:
head/sbin/hastd/proto_tcp4.c

Modified: head/sbin/hastd/proto_tcp4.c
==============================================================================
--- head/sbin/hastd/proto_tcp4.c Thu Aug 5 17:56:41 2010 (r210869)
+++ head/sbin/hastd/proto_tcp4.c Thu Aug 5 17:57:59 2010 (r210870)
@@ -126,11 +126,12 @@ tcp4_addr(const char *addr, struct socka
addr += 7;
else if (strncasecmp(addr, "tcp://", 6) == 0)
addr += 6;
- else if (addr[0] != '/' && /* If this is not path... */
- strstr(addr, "://") == NULL)/* ...and has no prefix... */
- ; /* ...tcp4 is the default. */
- else
- return (-1);
+ else {
+ /*
+ * Because TCP4 is the default assume IP or host is given without
+ * prefix.
+ */
+ }

sinp->sin_family = AF_INET;
sinp->sin_len = sizeof(*sinp);


Elapsed time: 0.118 seconds