aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-11-11 23:03:03 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-11-11 23:03:03 +0000
commit42acb00c815f2cca5bd1e3653c9f3a47e9256572 (patch)
treee0b717d0b9732617e29de0b5aa967cc1f27440e8 /lib
parentca6e77083768858aa34207f8c5dce38b3c05336d (diff)
moved the bools in the connectdata struct into the substruct named
ConnectBits where the other bools already are
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c2
-rw-r--r--lib/http.c2
-rw-r--r--lib/multi.c2
-rw-r--r--lib/transfer.c12
-rw-r--r--lib/url.c4
-rw-r--r--lib/urldata.h15
6 files changed, 19 insertions, 18 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 270154f9f..387807942 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2089,7 +2089,7 @@ CURLcode Curl_ftp(struct connectdata *conn)
retcode = Curl_ftp_nextconnect(conn);
else
/* since we didn't connect now, we want do_more to get called */
- conn->do_more = TRUE;
+ conn->bits.do_more = TRUE;
}
return retcode;
diff --git a/lib/http.c b/lib/http.c
index 460ce0a86..903deb229 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -547,7 +547,7 @@ CURLcode Curl_http(struct connectdata *conn)
conn->allocptr.cookie = aprintf("Cookie: %s\015\012", data->set.cookie);
}
- if(conn->upload_chunky) {
+ if(conn->bits.upload_chunky) {
if(!checkheaders(data, "Transfer-Encoding:")) {
te = "Transfer-Encoding: chunked\r\n";
}
diff --git a/lib/multi.c b/lib/multi.c
index 98700742d..f901f3a0f 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -360,7 +360,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
if(CURLE_OK == easy->result) {
/* after do, go PERFORM... or DO_MORE */
- if(easy->easy_conn->do_more) {
+ if(easy->easy_conn->bits.do_more) {
/* we're supposed to do more, but we need to sit down, relax
and wait a little while first */
easy->state = CURLM_STATE_DO_MORE;
diff --git a/lib/transfer.c b/lib/transfer.c
index 58ae8c96a..cdb3f39e9 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -905,7 +905,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(!k->upload_done) {
- if(conn->upload_chunky) {
+ if(conn->bits.upload_chunky) {
/* if chunked Transfer-Encoding */
buffersize -= (8 + 2 + 2); /* 32bit hex + CRLF + CRLF */
conn->upload_fromhere += 10; /* 32bit hex + CRLF */
@@ -914,7 +914,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
nread = data->set.fread(conn->upload_fromhere, 1,
buffersize, data->set.in);
- if(conn->upload_chunky) {
+ if(conn->bits.upload_chunky) {
/* if chunked Transfer-Encoding */
char hexbuffer[9];
int hexlen = snprintf(hexbuffer, sizeof(hexbuffer),
@@ -1112,13 +1112,13 @@ CURLcode Curl_readwrite_init(struct connectdata *conn)
Curl_pgrsSetUploadCounter(data, 0);
Curl_pgrsSetDownloadCounter(data, 0);
- if (!conn->getheader) {
+ if (!conn->bits.getheader) {
k->header = FALSE;
if(conn->size > 0)
Curl_pgrsSetDownloadSize(data, conn->size);
}
/* we want header and/or body, if neither then don't do this! */
- if(conn->getheader || !data->set.no_body) {
+ if(conn->bits.getheader || !data->set.no_body) {
FD_ZERO (&k->readfd); /* clear it */
if(conn->sockfd != -1) {
@@ -1200,7 +1200,7 @@ Transfer(struct connectdata *conn)
return CURLE_OK;
/* we want header and/or body, if neither then don't do this! */
- if(!conn->getheader && data->set.no_body)
+ if(!conn->bits.getheader && data->set.no_body)
return CURLE_OK;
k->writefdp = &k->writefd; /* store the address of the set */
@@ -1649,7 +1649,7 @@ Curl_Transfer(struct connectdata *c_conn, /* connection data */
/* now copy all input parameters */
conn->sockfd = sockfd;
conn->size = size;
- conn->getheader = getheader;
+ conn->bits.getheader = getheader;
conn->bytecountp = bytecountp;
conn->writesockfd = writesockfd;
conn->writebytecountp = writebytecountp;
diff --git a/lib/url.c b/lib/url.c
index 50f83532e..7083490be 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1769,7 +1769,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
is later set "for real" using Curl_pgrsStartNow(). */
conn->data->progress.start = conn->created;
- conn->upload_chunky =
+ conn->bits.upload_chunky =
((conn->protocol&PROT_HTTP) &&
data->set.upload &&
(data->set.infilesize == -1) &&
@@ -2889,7 +2889,7 @@ CURLcode Curl_do(struct connectdata **connp)
struct connectdata *conn = *connp;
struct SessionHandle *data=conn->data;
- conn->do_more = FALSE; /* by default there's no curl_do_more() to use */
+ conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */
if(conn->curl_do) {
/* generic protocol-specific function pointer set in curl_connect() */
diff --git a/lib/urldata.h b/lib/urldata.h
index 523b58f2e..8d20a78f8 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -214,6 +214,14 @@ struct ConnectBits {
IP address */
bool use_range;
bool rangestringalloc; /* the range string is malloc()'ed */
+
+ bool do_more; /* this is set TRUE if the ->curl_do_more() function is
+ supposed to be called, after ->curl_do() */
+
+ bool upload_chunky; /* set TRUE if we are doing chunked transfer-encoding
+ on upload */
+
+ bool getheader; /* TRUE if header parsing is wanted */
};
/*
@@ -381,7 +389,6 @@ struct connectdata {
/* READ stuff */
int sockfd; /* socket to read from or -1 */
int size; /* -1 if unknown at this point */
- bool getheader; /* TRUE if header parsing is wanted */
long *bytecountp; /* return number of bytes read or NULL */
/* WRITE stuff */
@@ -449,12 +456,6 @@ struct connectdata {
and the 'upload_present' contains the number of bytes available at this
position */
char *upload_fromhere;
-
- bool do_more; /* this is set TRUE if the ->curl_do_more() function is
- supposed to be called, after ->curl_do() */
-
- bool upload_chunky; /* set TRUE if we are doing chunked transfer-encoding
- on upload */
};
/* The end of connectdata. 08/27/02 jhrg */