aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-09-04 19:43:35 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-09-04 19:43:35 +0000
commitbb67388bbea127222d41019dad393436a253fc77 (patch)
treeb0d51abfa60a66ea10c06209e5284dc6f478c1af /lib
parent3dcd2b82c4095e34342c8d0778d45d547c23b06d (diff)
Made some variables const
Diffstat (limited to 'lib')
-rw-r--r--lib/nss.c2
-rw-r--r--lib/sendf.c6
-rw-r--r--lib/urldata.h10
3 files changed, 11 insertions, 7 deletions
diff --git a/lib/nss.c b/lib/nss.c
index c82bbfac7..301bd3e96 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -367,7 +367,7 @@ done:
return 1;
}
-static int nss_load_crl(char* crlfilename, PRBool ascii)
+static int nss_load_crl(const char* crlfilename, PRBool ascii)
{
PRFileDesc *infile;
PRStatus prstat;
diff --git a/lib/sendf.c b/lib/sendf.c
index 52edbc4ce..bba1bc726 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -397,7 +397,7 @@ CURLcode Curl_write_plain(struct connectdata *conn,
static CURLcode pausewrite(struct SessionHandle *data,
int type, /* what type of data */
- char *ptr,
+ const char *ptr,
size_t len)
{
/* signalled to pause sending on this connection, but since we have data
@@ -429,6 +429,10 @@ static CURLcode pausewrite(struct SessionHandle *data,
The bit pattern defines to what "streams" to write to. Body and/or header.
The defines are in sendf.h of course.
+
+ If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the
+ local character encoding. This is a problem and should be changed in
+ the future to leave the original data alone.
*/
CURLcode Curl_client_write(struct connectdata *conn,
int type,
diff --git a/lib/urldata.h b/lib/urldata.h
index 1be126ef0..1f0f63b41 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -218,8 +218,8 @@ struct ssl_config_data {
2: CN must match hostname */
char *CApath; /* certificate dir (doesn't work on windows) */
char *CAfile; /* cerficate to verify peer against */
- char *CRLfile; /* CRL to check cerficate revocation */
- char *issuercert; /* optional issuer cerficate filename */
+ const char *CRLfile; /* CRL to check cerficate revocation */
+ const char *issuercert;/* optional issuer cerficate filename */
char *random_file; /* path to file containing "random" data */
char *egdsocket; /* path to file containing the EGD daemon socket */
char *cipher_list; /* list of ciphers to use */
@@ -308,7 +308,7 @@ struct negotiatedata {
struct HTTP {
struct FormData *sendit;
curl_off_t postsize; /* off_t to handle large file sizes */
- char *postdata;
+ const char *postdata;
const char *p_pragma; /* Pragma: string */
const char *p_accept; /* Accept: string */
@@ -321,7 +321,7 @@ struct HTTP {
struct back {
curl_read_callback fread_func; /* backup storage for fread pointer */
void *fread_in; /* backup storage for fread_in pointer */
- char *postdata;
+ const char *postdata;
curl_off_t postsize;
} backup;
@@ -629,7 +629,7 @@ struct hostname {
char *rawalloc; /* allocated "raw" version of the name */
char *encalloc; /* allocated IDN-encoded version of the name */
char *name; /* name to use internally, might be encoded, might be raw */
- char *dispname; /* name to display, as 'name' might be encoded */
+ const char *dispname; /* name to display, as 'name' might be encoded */
};
/*