Line 0
Link Here
|
|
|
1 |
--- pound.c Wed Mar 24 16:03:14 2004 |
2 |
+++ pound.c Tue Mar 30 19:13:51 2004 |
3 |
@@ -742,10 +742,11 @@ |
4 |
logmsg(LOG_WARNING, "HTTP arg: malloc"); |
5 |
close(clnt); |
6 |
} else { |
7 |
+ socklen_t namelen; |
8 |
arg->sock = clnt; |
9 |
arg->from_host = clnt_addr.sin_addr; |
10 |
- memset(&arg->to_host, 0, n = sizeof(arg->to_host)); |
11 |
- getsockname(http_sock[i], (struct sockaddr *)&arg->to_host, &n); |
12 |
+ memset(&arg->to_host, 0, namelen = sizeof(arg->to_host)); |
13 |
+ getsockname(http_sock[i], (struct sockaddr *)&arg->to_host, &namelen); |
14 |
arg->ctx = NULL; |
15 |
if(pthread_create(&thr, &attr, thr_http, (void *)arg)) { |
16 |
logmsg(LOG_WARNING, "HTTP pthread_create: %s", strerror(errno)); |
17 |
@@ -776,10 +777,11 @@ |
18 |
logmsg(LOG_WARNING, "HTTPS arg: malloc"); |
19 |
close(clnt); |
20 |
} else { |
21 |
+ socklen_t namelen; |
22 |
arg->sock = clnt; |
23 |
arg->from_host = clnt_addr.sin_addr; |
24 |
- memset(&arg->to_host, 0, n = sizeof(arg->to_host)); |
25 |
- getsockname(https_sock[i], (struct sockaddr *)&arg->to_host, &n); |
26 |
+ memset(&arg->to_host, 0, namelen = sizeof(arg->to_host)); |
27 |
+ getsockname(https_sock[i], (struct sockaddr *)&arg->to_host, &namelen); |
28 |
arg->ctx = ctx[i]; |
29 |
if(pthread_create(&thr, &attr, thr_http, (void *)arg)) { |
30 |
logmsg(LOG_WARNING, "HTTPS pthread_create: %s", strerror(errno)); |