diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2010-08-05 17:57:59 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2010-08-05 17:57:59 +0000 |
commit | 9bf24e1a00633f5940774859469b5562009d8c8d (patch) | |
tree | 5b712e5b98ece925c33ce1003ac5d56dc1bcd6aa /sbin | |
parent | 50692f84c6f8b324e31b8e12620e9b8fd879c1e1 (diff) | |
download | src-9bf24e1a00633f5940774859469b5562009d8c8d.tar.gz src-9bf24e1a00633f5940774859469b5562009d8c8d.zip |
Now that TCP will be checked last we don't need any knowledge about other
protocols.
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=210870
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/proto_tcp4.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/hastd/proto_tcp4.c b/sbin/hastd/proto_tcp4.c index 09e9e653915d..6fe14717317a 100644 --- a/sbin/hastd/proto_tcp4.c +++ b/sbin/hastd/proto_tcp4.c @@ -126,11 +126,12 @@ tcp4_addr(const char *addr, struct sockaddr_in *sinp) 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); |