Permalink
Browse files

git-svn-id: svn://cherokee-project.com/cherokee/trunk@625 5dc97367-97…

…f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 34523f0 commit 0f3a68f6f41936b758e03d0a5d7c6dede16a9902 @alobbs alobbs committed Jan 18, 2007
View
@@ -1,3 +1,21 @@
+2007-01-18 Alvaro Lopez Ortega <alvaro@alobbs.com>
+
+ * cherokee/connection_info.c (cherokee_connection_info_fill_up),
+ cherokee/dirs_table.c (relink_func),
+ cherokee/encoder_gzip.c (do_encode),
+ cherokee/virtual_server.c (cherokee_virtual_server_set_documentroot),
+ cherokee/logger_ncsa.c (cherokee_logger_ncsa_write_string),
+ cherokee/logger_w3c.c (cherokee_logger_w3c_write_string),
+ cherokee/header.c (cherokee_header_copy_version,
+ cherokee_header_copy_method),
+ cherokee/handler_redir.c (substitute_groups),
+ cherokee/handler_fastcgi.c (send_post): Removed (char *) casting
+ in the calls to cherokee_buffer_add()
+
+ * cherokee/config_node.c: Added config_reader.h inclusion. It also
+ removes casting to char pointer in the cherokee_buffer_add()
+ calls.
+
2007-01-18 A.D.F <adefacc@tin.it>
* cherokee/buffer.h:
View
@@ -25,6 +25,7 @@
#include "common-internal.h"
#include "config_node.h"
+#include "config_reader.h"
#include "util.h"
#define ENTRIES "config"
@@ -135,9 +136,9 @@ cherokee_config_node_add (cherokee_config_node_t *conf, const char *key, cheroke
*/
sep = strchr (begin, '!');
if (sep != NULL) {
- cherokee_buffer_add (&tmp, (char *)begin, sep - begin);
+ cherokee_buffer_add (&tmp, begin, sep - begin);
} else {
- cherokee_buffer_add (&tmp, (char *)begin, strlen(begin));
+ cherokee_buffer_add (&tmp, begin, strlen(begin));
final = true;
}
@@ -190,9 +191,9 @@ cherokee_config_node_get (cherokee_config_node_t *conf, const char *key, cheroke
*/
sep = strchr (begin, '!');
if (sep != NULL) {
- cherokee_buffer_add (&tmp, (char *)begin, sep - begin);
+ cherokee_buffer_add (&tmp, begin, sep - begin);
} else {
- cherokee_buffer_add (&tmp, (char *)begin, strlen(begin));
+ cherokee_buffer_add (&tmp, begin, strlen(begin));
final = true;
}
@@ -166,7 +166,7 @@ cherokee_connection_info_fill_up (cherokee_connection_info_t *info, cherokee_con
cherokee_module_get_name (MODULE(conn->handler), &handler_name);
if (handler_name)
- cherokee_buffer_add (&info->handler, (char *)handler_name, strlen(handler_name));
+ cherokee_buffer_add (&info->handler, handler_name, strlen(handler_name));
}
/* Total size
View
@@ -154,7 +154,7 @@ relink_func (const char *key_, void *value, void *param)
/* It has to look the the parent of this directory
*/
- cherokee_buffer_add (&key, (char *)key_, strlen(key_));
+ cherokee_buffer_add (&key, key_, strlen(key_));
do {
void *parent = NULL;
View
@@ -224,7 +224,7 @@ do_encode (cherokee_encoder_gzip_t *encoder,
* +---+---+---+---+---+---+---+---+---+---+
*/
if (encoder->add_header) {
- cherokee_buffer_add (out, (char *)gzip_header, gzip_header_len);
+ cherokee_buffer_add (out, (const char *)gzip_header, gzip_header_len);
encoder->add_header = false;
}
@@ -510,7 +510,7 @@ send_post (cherokee_handler_fastcgi_t *hdl, cherokee_buffer_t *buf)
TRACE (ENTRIES, "id=%d gen=%d, Post phase = read\n", hdl->id, hdl->generation);
if (cherokee_buffer_is_empty (buf)) {
- cherokee_buffer_add (buf, (char *)&empty_header, sizeof (FCGI_Header));
+ cherokee_buffer_add (buf, (const char *)&empty_header, sizeof (FCGI_Header));
}
ret = cherokee_post_walk_read (&conn->post, buf, POST_PACKAGE_LEN);
View
@@ -616,7 +616,7 @@ send_post (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *buf)
/* Add space for the header, it'll filled out later on..
*/
if (cherokee_buffer_is_empty (buf)) {
- cherokee_buffer_add (buf, (char *)&empty_header, sizeof (FCGI_Header));
+ cherokee_buffer_add (buf, (const char *)&empty_header, sizeof (FCGI_Header));
}
/* Take a chunck of post
View
@@ -68,7 +68,7 @@ substitute_groups (cherokee_buffer_t *url, const char *subject,
if (*s == '$')
dollar = true;
else
- cherokee_buffer_add (url, (char *)s, 1);
+ cherokee_buffer_add (url, (const char *)s, 1);
continue;
}
@@ -79,14 +79,14 @@ substitute_groups (cherokee_buffer_t *url, const char *subject,
dollar = false;
continue;
}
- cherokee_buffer_add (url, (char *)substring, strlen(substring));
+ cherokee_buffer_add (url, substring, strlen(substring));
pcre_free_substring (substring);
} else {
/* If it is not a number, add both characters
*/
cherokee_buffer_add_str (url, "$");
- cherokee_buffer_add (url, (char *)s, 1);
+ cherokee_buffer_add (url, (const char *)s, 1);
}
dollar = false;
View
@@ -845,7 +845,7 @@ cherokee_header_copy_method (cherokee_header_t *hdr, cherokee_buffer_t *buf)
ret = cherokee_http_method_to_string (HDR_METHOD(hdr), &tmp, &len);
if (unlikely(ret != ret_ok)) return ret;
- return cherokee_buffer_add (buf, (char *)tmp, len);
+ return cherokee_buffer_add (buf, tmp, len);
}
@@ -859,7 +859,7 @@ cherokee_header_copy_version (cherokee_header_t *hdr, cherokee_buffer_t *buf)
ret = cherokee_http_version_to_string (HDR_VERSION(hdr), &tmp, &len);
if (unlikely(ret != ret_ok)) return ret;
- return cherokee_buffer_add (buf, (char *)tmp, len);
+ return cherokee_buffer_add (buf, tmp, len);
}
View
@@ -317,7 +317,7 @@ cherokee_logger_ncsa_write_string (cherokee_logger_ncsa_t *logger, const char *s
ret = cherokee_logger_writer_get_buf (&logger->writer_access, &log);
if (unlikely (ret != ret_ok)) return ret;
- ret = cherokee_buffer_add (log, (char *)string, strlen(string));
+ ret = cherokee_buffer_add (log, string, strlen(string));
return ret;
}
View
@@ -197,7 +197,7 @@ cherokee_logger_w3c_write_string (cherokee_logger_w3c_t *logger, const char *str
ret = cherokee_logger_writer_get_buf (&logger->writer, &log);
if (unlikely (ret != ret_ok)) return ret;
- cherokee_buffer_add (log, (char *)string, strlen(string));
+ cherokee_buffer_add (log, string, strlen(string));
return ret_ok;
}
View
@@ -887,7 +887,7 @@ cherokee_trace (const char *entry, const char *file, int line, const char *func,
return;
}
- cherokee_buffer_add (&entries, (char *)entry, strlen(entry));
+ cherokee_buffer_add (&entries, entry, strlen(entry));
for (lentry = entries.buf;;) {
lentry_end = strchr (lentry, ',');
@@ -340,7 +340,7 @@ ret_t
cherokee_virtual_server_set_documentroot (cherokee_virtual_server_t *vserver, const char *documentroot)
{
cherokee_buffer_clean (&vserver->root);
- cherokee_buffer_add (&vserver->root, (char *)documentroot, strlen(documentroot));
+ cherokee_buffer_add (&vserver->root, documentroot, strlen(documentroot));
return ret_ok;
}

0 comments on commit 0f3a68f

Please sign in to comment.