summaryrefslogtreecommitdiff
path: root/www/httptunnel
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-07-19 10:48:03 +0000
committerBrian Somers <brian@FreeBSD.org>2000-07-19 10:48:03 +0000
commitbcdd84a67f8411ed07890f9bfe7f6d8618f5e621 (patch)
tree4f0dfb944e64e5d7eef92273d3ca943b33babba5 /www/httptunnel
parent- Do not read a file more than once, where the sameness is judged by (diff)
Update to reflect what I've submitted to the httptunnel writers
No functional changes
Diffstat (limited to 'www/httptunnel')
-rw-r--r--www/httptunnel/files/patch-aa30
1 files changed, 11 insertions, 19 deletions
diff --git a/www/httptunnel/files/patch-aa b/www/httptunnel/files/patch-aa
index 43c47a9a45b6..a049626a3f73 100644
--- a/www/httptunnel/files/patch-aa
+++ b/www/httptunnel/files/patch-aa
@@ -1,5 +1,5 @@
--- common.c.orig Wed Dec 15 06:39:03 1999
-+++ common.c Thu Mar 16 02:48:06 2000
++++ common.c Wed Jul 19 10:09:32 2000
@@ -115,7 +115,7 @@
#endif
@@ -9,40 +9,32 @@
{
struct sockaddr_in address;
int i, s;
-@@ -131,10 +131,12 @@
+@@ -131,9 +131,13 @@
strerror (errno));
}
+ memset(&address, '\0', sizeof address);
++#if defined(__FreeBSD__) || defined(__OpenBSD__)
+ address.sin_len = sizeof address;
++#endif
address.sin_family = PF_INET;
address.sin_port = htons ((short)port);
- address.sin_addr.s_addr = INADDR_ANY;
--
+ address.sin_addr = addr;
-+
+
if (bind (s, (struct sockaddr *)&address, sizeof (address)) == -1)
{
- close (s);
-@@ -153,8 +155,10 @@
+@@ -153,8 +157,12 @@
int
set_address (struct sockaddr_in *address, const char *host, int port)
{
-- address->sin_family = PF_INET;
-- address->sin_port = htons ((short)port);
+ memset(address, '\0', sizeof *address);
++#if defined(__FreeBSD__) || defined(__OpenBSD__)
+ address->sin_len = sizeof *address;
-+ address->sin_family = AF_INET;
-+ address->sin_port = htons((u_short)port);
++#endif
+ address->sin_family = PF_INET;
+- address->sin_port = htons ((short)port);
++ address->sin_port = htons ((u_short)port);
address->sin_addr.s_addr = inet_addr (host);
if (address->sin_addr.s_addr == INADDR_NONE)
-@@ -334,7 +338,7 @@
- p = strchr (*name, ':');
- if (p != NULL)
- {
-- *port = atoi (p + 1);
-+ *port = atoi(p + 1);
- *p = '\0';
- }
- }