aboutsummaryrefslogtreecommitdiffstats
path: root/tests/server/sws.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/server/sws.c')
-rw-r--r--tests/server/sws.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 10a87746..ec11224f 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -555,7 +555,6 @@ static int ProcessRequest(struct httprequest *req)
if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
doc, &prot_major, &prot_minor) == 3) {
char *portp = NULL;
- unsigned long part = 0;
snprintf(logbuf, sizeof(logbuf),
"Received a CONNECT %s HTTP/%d.%d request",
@@ -569,6 +568,7 @@ static int ProcessRequest(struct httprequest *req)
if(doc[0] == '[') {
char *p = &doc[1];
+ unsigned long part = 0;
/* scan through the hexgroups and store the value of the last group
in the 'part' variable and use as test case number!! */
while(*p && (ISXDIGIT(*p) || (*p == ':') || (*p == '.'))) {
@@ -954,7 +954,6 @@ static void init_httprequest(struct httprequest *req)
is no data waiting, or < 0 if it should be closed */
static int get_request(curl_socket_t sock, struct httprequest *req)
{
- int error;
int fail = 0;
char *reqbuf = req->reqbuf;
ssize_t got = 0;
@@ -1000,7 +999,7 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
fail = 1;
}
else if(got < 0) {
- error = SOCKERRNO;
+ int error = SOCKERRNO;
if(EAGAIN == error || EWOULDBLOCK == error) {
/* nothing to read at the moment */
return 0;
@@ -1065,7 +1064,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
char *cmd = NULL;
size_t cmdsize = 0;
FILE *dump;
- bool persistant = TRUE;
+ bool persistent = TRUE;
bool sendfailure = FALSE;
size_t responsesize;
int error = 0;
@@ -1196,7 +1195,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
connection will be closed after the data has been sent to the requesting
client... */
if(strstr(buffer, "swsclose") || !count) {
- persistant = FALSE;
+ persistent = FALSE;
logmsg("connection close instruction \"swsclose\" found in response");
}
if(strstr(buffer, "swsbounce")) {
@@ -1313,7 +1312,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
} while(ptr && *ptr);
}
free(cmd);
- req->open = use_gopher?FALSE:persistant;
+ req->open = use_gopher?FALSE:persistent;
prevtestno = req->testno;
prevpartno = req->partno;
@@ -1968,7 +1967,7 @@ static int service_connection(curl_socket_t msgsock, struct httprequest *req,
/* if we got a CONNECT, loop and get another request as well! */
if(req->open) {
- logmsg("=> persistant connection request ended, awaits new request\n");
+ logmsg("=> persistent connection request ended, awaits new request\n");
return 1;
}