]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Made some variables const
authorDan Fandrich <dan@coneharvesters.com>
Thu, 4 Sep 2008 19:43:35 +0000 (19:43 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 4 Sep 2008 19:43:35 +0000 (19:43 +0000)
lib/nss.c
lib/sendf.c
lib/urldata.h

index c82bbfac766c39098e80ba5c137a360566e3bb45..301bd3e9634c21b46aed6f7765e2aa913ea71eb4 100644 (file)
--- 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;
index 52edbc4cecccc9076f37d8be831954ff9e7c2063..bba1bc7265a31762c92da756e331b7278fea2fcf 100644 (file)
@@ -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,
index 1be126ef0ccca70fd44ed105e2b6e02a1f36cdc6..1f0f63b41c9763dc77168c3abacac3418778ffa8 100644 (file)
@@ -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 */
 };
 
 /*