Duane Wessels <wessels@nlanr.net> writes:
> http://squid.nlanr.net/Squid/1.2.beta/
>
> Not quite all of the kinks are worked out yet. I certainly don't
> recommend unleasing it on users yet, but have a look for yourselves...
A few minor problems (I'm trying to compile the USE_ASYNC_IO stuff against
linuxthreads-0.6).
Big one: aiops.h doesn't seem to exist??
Can't seem to find this anywhere. Found a version in squid-1.1.1, but
the function prototypes et al don't match.
structs.h:858 defines a variable called 'errno'. The problem here is
that linuxthreads want to '#define' errno to be a thread specific
variable, and needless to say, it breaks badly.
which doesn't look 100% correct... maybe s/) (/,/g ???
At the moment I'm held up by no aiops.h :)
Compiled, but untested patch to fix the 'errno' problem.
diff -u -r --new-file virgin/squid-1.2.beta1/src/errorpage.c squid-1.2.beta1/src/errorpage.c
--- virgin/squid-1.2.beta1/src/errorpage.c Wed Oct 22 01:21:32 1997
+++ squid-1.2.beta1/src/errorpage.c Fri Oct 24 16:56:10 1997
@@ -130,11 +130,11 @@
p = "UNKNOWN\n";
break;
case 'e':
- snprintf(buf, CVT_BUF_SZ, "%d", err->errno);
+ snprintf(buf, CVT_BUF_SZ, "%d", err->the_errno);
p = buf;
break;
case 'E':
- snprintf(buf, CVT_BUF_SZ, "(%d) %s", err->errno, strerror(err->errno));
+ snprintf(buf, CVT_BUF_SZ, "(%d) %s", err->the_errno, strerror(err->the_errno));
p = buf;
break;
case 'w':
diff -u -r --new-file virgin/squid-1.2.beta1/src/ftp.c squid-1.2.beta1/src/ftp.c
--- virgin/squid-1.2.beta1/src/ftp.c Fri Oct 24 11:14:37 1997
+++ squid-1.2.beta1/src/ftp.c Fri Oct 24 16:56:10 1997
@@ -649,7 +649,7 @@
if (entry->mem_obj->inmem_hi == 0) {
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_READ_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
@@ -660,7 +660,7 @@
} else if (len == 0 && entry->mem_obj->inmem_hi == 0) {
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_ZERO_SIZE_OBJECT;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
@@ -872,7 +872,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_SOCKET_FAILURE;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
storeAbort(entry, 0);
@@ -910,7 +910,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(request->host);
err->port = request->port;
err->request = requestLink(request);
@@ -963,7 +963,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_WRITE_ERROR;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
}
@@ -1042,7 +1042,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_READ_ERROR;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
}
@@ -1060,7 +1060,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_READ_ERROR;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(ftpState->request);
errorAppendEntry(entry, err);
}
@@ -1357,7 +1357,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(ftpState->data.host);
err->port = ftpState->data.port;
err->request = requestLink(request);
diff -u -r --new-file virgin/squid-1.2.beta1/src/gopher.c squid-1.2.beta1/src/gopher.c
--- virgin/squid-1.2.beta1/src/gopher.c Fri Oct 24 00:38:10 1997
+++ squid-1.2.beta1/src/gopher.c Fri Oct 24 16:56:10 1997
@@ -711,7 +711,7 @@
ErrorState *err;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_READ_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
err->url = entry->url;
errorAppendEntry(entry, err);
@@ -723,7 +723,7 @@
ErrorState *err;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_ZERO_SIZE_OBJECT;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
err->url = gopherState->request;
errorAppendEntry(entry, err);
@@ -767,7 +767,7 @@
ErrorState *err;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(gopherState->host);
err->port = gopherState->port;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
@@ -880,7 +880,7 @@
/* was assert */
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_SOCKET_FAILURE;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
if (entry && entry->url)
err->url = entry->url;
@@ -943,7 +943,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(gopherState->host);
err->port = gopherState->port;
err->url = entry->url;
diff -u -r --new-file virgin/squid-1.2.beta1/src/http.c squid-1.2.beta1/src/http.c
--- virgin/squid-1.2.beta1/src/http.c Fri Oct 24 07:27:19 1997
+++ squid-1.2.beta1/src/http.c Fri Oct 24 16:56:09 1997
@@ -637,7 +637,7 @@
if (clen == 0) {
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_READ_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
err->request = requestLink(httpState->request);
errorAppendEntry(entry, err);
@@ -654,7 +654,7 @@
httpState->eof = 1;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_ZERO_SIZE_OBJECT;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
err->request = requestLink(httpState->request);
errorAppendEntry(entry, err);
@@ -703,7 +703,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_WRITE_ERROR;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(httpState->request);
errorAppendEntry(entry, err);
storeAbort(entry, 0);
@@ -953,7 +953,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_SOCKET_FAILURE;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
if (request)
err->request = requestLink(request);
errorAppendEntry(entry, err);
@@ -1082,7 +1082,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(request->host);
err->port = request->port;
err->request = requestLink(request);
diff -u -r --new-file virgin/squid-1.2.beta1/src/pass.c squid-1.2.beta1/src/pass.c
--- virgin/squid-1.2.beta1/src/pass.c Sun Aug 10 12:42:43 1997
+++ squid-1.2.beta1/src/pass.c Fri Oct 24 16:56:08 1997
@@ -316,7 +316,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(passState->host);
err->port = passState->port;
err->request = requestLink(request);
@@ -378,7 +378,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_SOCKET_FAILURE;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(request);
errorSend(fd, err);
return;
diff -u -r --new-file virgin/squid-1.2.beta1/src/ssl.c squid-1.2.beta1/src/ssl.c
--- virgin/squid-1.2.beta1/src/ssl.c Tue Oct 21 03:25:22 1997
+++ squid-1.2.beta1/src/ssl.c Fri Oct 24 16:56:02 1997
@@ -334,7 +334,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(sslState->host);
err->port = sslState->port;
err->request = requestLink(request);
@@ -370,7 +370,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_SOCKET_FAILURE;
err->http_status = HTTP_INTERNAL_SERVER_ERROR;
- err->errno = errno;
+ err->the_errno = errno;
err->request = requestLink(request);
errorSend(fd, err);
return;
diff -u -r --new-file virgin/squid-1.2.beta1/src/structs.h squid-1.2.beta1/src/structs.h
--- virgin/squid-1.2.beta1/src/structs.h Fri Oct 24 07:26:44 1997
+++ squid-1.2.beta1/src/structs.h Fri Oct 24 16:55:44 1997
@@ -855,7 +855,7 @@
http_status http_status;
request_t *request;
char *url;
- int errno;
+ int the_errno;
char *host;
u_short port;
char *dnsserver_msg;
diff -u -r --new-file virgin/squid-1.2.beta1/src/wais.c squid-1.2.beta1/src/wais.c
--- virgin/squid-1.2.beta1/src/wais.c Fri Oct 24 00:38:16 1997
+++ squid-1.2.beta1/src/wais.c Fri Oct 24 16:55:31 1997
@@ -219,7 +219,7 @@
ErrorState *err;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_ZERO_SIZE_OBJECT;
- err->errno = errno;
+ err->the_errno = errno;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
err->request = urlParse(METHOD_CONNECT, waisState->request);
errorAppendEntry(entry, err);
@@ -253,7 +253,7 @@
ErrorState *err;
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(waisState->relayhost);
err->port = waisState->relayport;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
@@ -387,7 +387,7 @@
err = xcalloc(1, sizeof(ErrorState));
err->type = ERR_CONNECT_FAIL;
err->http_status = HTTP_SERVICE_UNAVAILABLE;
- err->errno = errno;
+ err->the_errno = errno;
err->host = xstrdup(waisState->relayhost);
err->port = waisState->relayport;
err->request = urlParse(METHOD_CONNECT, request);
Received on Tue Jul 29 2003 - 13:15:43 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:27 MST