Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…f1-0310-9951-d761b3857238
  • Loading branch information...
commit b13f4bf34fa02982369c437bf30bfe3479f14675 1 parent 1e7ba23
@alobbs alobbs authored
View
3  cherokee/access.c
@@ -505,7 +505,8 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
case ipv6:
re = (! IN6_ARE_ADDR_EQUAL (&SOCKET_ADDR_IPv6(sock)->sin6_addr, &IP_NODE(i)->ip.ip6));
- // re = memcmp (&SOCKET_ADDR_IPv6(sock)->sin6_addr, &IP_NODE(i)->ip, 16);
+ /* re = memcmp (&SOCKET_ADDR_IPv6(sock)->sin6_addr, &IP_NODE(i)->ip, 16); */
+
/*
printf ("6 family=%d, ipv6=%d\n", SOCKET_ADDR_IPv6(sock)->sin6_family, ipv6);
printf ("6 port=%d\n", SOCKET_ADDR_IPv6(sock)->sin6_port);
View
8 cherokee/admin_client.c
@@ -124,8 +124,8 @@ cherokee_admin_client_prepare (cherokee_admin_client_t *admin, cherokee_fdpoll_t
*/
#warning "Fix this!"
-// ret = cherokee_downloader_set_fdpoll (downloader, admin->poll_ref, true);
-// if (unlikely (ret != ret_ok)) return ret;
+/* ret = cherokee_downloader_set_fdpoll (downloader, admin->poll_ref, true); */
+/* if (unlikely (ret != ret_ok)) return ret; */
ret = cherokee_downloader_set_url (&admin->downloader, admin->url_ref);
if (unlikely (ret != ret_ok)) return ret;
@@ -133,8 +133,8 @@ cherokee_admin_client_prepare (cherokee_admin_client_t *admin, cherokee_fdpoll_t
ret = cherokee_downloader_set_keepalive (downloader, true);
if (unlikely (ret != ret_ok)) return ret;
-// ret = cherokee_downloader_connect_event (downloader, downloader_event_finish, on_downloader_finish, admin);
-// if (unlikely (ret != ret_ok)) return ret;
+/* ret = cherokee_downloader_connect_event (downloader, downloader_event_finish, on_downloader_finish, admin); */
+/* if (unlikely (ret != ret_ok)) return ret; */
return ret_ok;
}
View
4 cherokee/avl.c
@@ -808,7 +808,7 @@ avl_get_span_by_key (avl_tree *tree, void *key, unsigned int *low, unsigned int
/* search right */
right = avl_get_successor (node);
if (right == tree->root) {
- // special case, tree->size == 1
+ /* special case, tree->size == 1 */
*low = i;
*high = i + 1;
return 0;
@@ -868,7 +868,7 @@ avl_get_span_by_two_keys (avl_tree * tree,
/* search right */
right = avl_get_successor (high_node);
if (right == tree->root) {
- // special case, tree->size == 1
+ /* special case, tree->size == 1 */
j = i + 1;
} else {
while ((j <= tree->length) && (tree->compare_fun (tree->compare_arg, high_key, right->key) == 0)) {
View
2  cherokee/config_entry.c
@@ -148,7 +148,7 @@ cherokee_config_entry_complete (cherokee_config_entry_t *entry, cherokee_config_
overwrite = true;
}
-// printf ("same_type=%d, overwrite=%d, prio=%d\n", same_type, overwrite, main->priority);
+/* printf ("same_type=%d, overwrite=%d, prio=%d\n", same_type, overwrite, main->priority); */
/* If a temporary config_entry inherits from valid entry, it will
* get references than mustn't be free'd, like 'user'. Take care.
View
2  cherokee/downloader.c
@@ -427,7 +427,7 @@ cherokee_downloader_step (cherokee_downloader_t *downloader)
if (downloader->post != NULL) {
ret = cherokee_post_walk_to_fd (downloader->post, downloader->socket.socket, NULL, NULL);
-// ret = send_post (downloader);
+/* ret = send_post (downloader); */
/* ret = downloader_send_buffer (downloader, downloader->post_ref); */
if (unlikely(ret != ret_ok)) return ret;
}
View
10 cherokee/fcgi_manager.c
@@ -99,8 +99,8 @@ update_conn_list_lenght (cherokee_fcgi_manager_t *mgr, cuint_t id)
mgr->conn.len--;
}
-// printf ("mgr->conn.id2conn[id].conn %p, mgr->conn.id2conn[id].eof %d -- use=%d\n",
-// mgr->conn.id2conn[id].conn, mgr->conn.id2conn[id].eof, mgr->conn.len);
+/* printf ("mgr->conn.id2conn[id].conn %p, mgr->conn.id2conn[id].eof %d -- use=%d\n",
+ mgr->conn.id2conn[id].conn, mgr->conn.id2conn[id].eof, mgr->conn.len); */
}
@@ -294,7 +294,7 @@ process_package (cherokee_fcgi_manager_t *mgr, cherokee_buffer_t *inbuf)
break;
case FCGI_STDOUT:
-// printf ("READ:STDOUT id=%d gen=%d eof=%d (%s): %d", id, hdl->generation, CGI_BASE(hdl)->got_eof, conn->query_string.buf, len);
+/* printf ("READ:STDOUT id=%d gen=%d eof=%d (%s): %d", id, hdl->generation, CGI_BASE(hdl)->got_eof, conn->query_string.buf, len); */
cherokee_buffer_add (outbuf, data, len);
break;
@@ -311,7 +311,7 @@ process_package (cherokee_fcgi_manager_t *mgr, cherokee_buffer_t *inbuf)
update_conn_list_lenght (mgr, id);
-// printf ("READ:END id=%d gen=%d", id, hdl->generation);
+/* printf ("READ:END id=%d gen=%d", id, hdl->generation); */
break;
default:
@@ -320,7 +320,7 @@ process_package (cherokee_fcgi_manager_t *mgr, cherokee_buffer_t *inbuf)
go_out:
cherokee_buffer_move_to_begin (inbuf, len + FCGI_HEADER_LEN + padding);
-// printf ("- FCGI quedan %d\n", inbuf->len);
+/* printf ("- FCGI quedan %d\n", inbuf->len); */
return ret_eagain;
error:
View
2  cherokee/handler.h
@@ -51,7 +51,7 @@ typedef enum {
hsupport_maybe_length = 1 << 1, /* It might include content-length */
hsupport_range = 1 << 2, /* Can handle "Range: bytes=" requests */
hsupport_error = 1 << 3, /* It is an error handler */
- hsupport_dont_add_headers = 1 << 4, /* The server shouldn't add any headers */
+ hsupport_dont_add_headers = 1 << 4 /* The server shouldn't add any headers */
} cherokee_handler_support_t;
View
2  cherokee/handler_cgi.c
@@ -118,7 +118,7 @@ cherokee_handler_cgi_new (cherokee_handler_t **hdl, void *cnt, cherokee_module_
/* Virtual methods
*/
- MODULE(n)->init = (handler_func_init_t) cherokee_handler_cgi_init;
+ MODULE(n)->init = (module_func_init_t) cherokee_handler_cgi_init;
MODULE(n)->free = (module_func_free_t) cherokee_handler_cgi_free;
/* Virtual methods: implemented by handler_cgi_base
View
3  cherokee/handler_fastcgi.c
@@ -45,7 +45,8 @@ props_free (cherokee_handler_fastcgi_props_t *props)
if (props->balancer != NULL)
cherokee_balancer_free (props->balancer);
- // TODO: Free the structure content
+ /* TODO: Free the structure content
+ */
return cherokee_handler_cgi_base_props_free (PROP_CGI_BASE(props));
}
View
12 cherokee/handler_fcgi.c
@@ -90,12 +90,12 @@ process_package (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *inbuf, cheroke
len = (header->contentLengthB0 | (header->contentLengthB1 << 8));
data = inbuf->buf + FCGI_HEADER_LEN;
-// printf ("have %d, hdr=%d exp_len=%d pad=%d\n", inbuf->len, FCGI_HEADER_LEN, len, padding);
+/* printf ("have %d, hdr=%d exp_len=%d pad=%d\n", inbuf->len, FCGI_HEADER_LEN, len, padding); */
/* Is the package complete?
*/
if (len + padding > inbuf->len - FCGI_HEADER_LEN) {
-// printf ("Incomplete: %d < %d\n", len + padding, inbuf->len - FCGI_HEADER_LEN);
+/* printf ("Incomplete: %d < %d\n", len + padding, inbuf->len - FCGI_HEADER_LEN); */
return ret_ok;
}
@@ -103,7 +103,7 @@ process_package (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *inbuf, cheroke
*/
switch (type) {
case FCGI_STDERR:
-// printf ("READ:STDERR (%d): %s", len, data?data:"");
+/* printf ("READ:STDERR (%d): %s", len, data?data:""); */
if (CONN_VSRV(conn)->logger != NULL) {
cherokee_buffer_t tmp = CHEROKEE_BUF_INIT;
@@ -116,7 +116,7 @@ process_package (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *inbuf, cheroke
break;
case FCGI_STDOUT:
-// printf ("READ:STDOUT eof=%d: %d", CGI_BASE(hdl)->got_eof, len);
+/* printf ("READ:STDOUT eof=%d: %d", CGI_BASE(hdl)->got_eof, len); */
cherokee_buffer_add (outbuf, data, len);
break;
@@ -129,7 +129,7 @@ process_package (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *inbuf, cheroke
(ending->appStatusB0 << 24));
HDL_CGI_BASE(hdl)->got_eof = true;
-// printf ("READ:END");
+/* printf ("READ:END"); */
break;
default:
@@ -137,7 +137,7 @@ process_package (cherokee_handler_fcgi_t *hdl, cherokee_buffer_t *inbuf, cheroke
}
cherokee_buffer_move_to_begin (inbuf, len + FCGI_HEADER_LEN + padding);
-// printf ("- FCGI quedan %d\n", inbuf->len);
+/* printf ("- FCGI quedan %d\n", inbuf->len); */
return ret_eagain;
}
View
3  cherokee/handler_scgi.c
@@ -43,7 +43,8 @@ props_free (cherokee_handler_scgi_props_t *props)
if (props->balancer)
cherokee_balancer_free (props->balancer);
- // TODO: Free scgi_env_ref
+ /* TODO: Free scgi_env_ref
+ */
return cherokee_handler_cgi_base_props_free (PROP_CGI_BASE(props));
}
View
1  cherokee/module.h
@@ -50,6 +50,7 @@ typedef enum {
/* Callback function prototipes
*/
+typedef void * module_func_init_t;
typedef ret_t (* module_func_new_t) (void *);
typedef ret_t (* module_func_free_t) (void *);
typedef void (* module_func_get_name_t) (void *, const char **name);
View
1  cherokee/server-protected.h
@@ -170,7 +170,6 @@ struct cherokee_server {
/* Another config files
*/
cherokee_config_node_t config;
-// char *config_file;
char *icons_file;
/* Performance
View
14 cherokee/socket.c
@@ -213,7 +213,7 @@ db_retrieve (void *ptr, gnutls_datum key)
gnutls_datum new = { NULL, 0 };
cherokee_socket_t *socket = SOCKET(ptr);
- // printf ("db::retrieve\n");
+ /* printf ("db::retrieve\n"); */
if (unlikely (socket->vserver_ref == NULL)) {
PRINT_ERROR_S ("No virtual server reference\n");
@@ -238,7 +238,7 @@ db_remove (void *ptr, gnutls_datum key)
gnutls_datum *n = NULL;
cherokee_socket_t *socket = SOCKET(ptr);
- // printf ("db::remove\n");
+ /* printf ("db::remove\n"); */
if (unlikely (socket->vserver_ref == NULL)) {
PRINT_ERROR_S ("No virtual server reference\n");
@@ -246,7 +246,7 @@ db_remove (void *ptr, gnutls_datum key)
}
cache = &socket->vserver_ref->session_cache;
-// ret = cherokee_session_cache_del (cache, key.data, key.size);
+/* ret = cherokee_session_cache_del (cache, key.data, key.size); */
ret = cherokee_table_del (cache, (char *)key.data, NULL);
if (n != NULL)
@@ -262,7 +262,8 @@ db_store (void *ptr, gnutls_datum key, gnutls_datum data)
gnutls_datum *n;
cherokee_table_t *cache;
cherokee_socket_t *socket = SOCKET(ptr);
- // printf ("db::store\n");
+
+ /* printf ("db::store\n"); */
if (socket->vserver_ref == NULL) {
PRINT_ERROR_S ("No virtual server reference\n");
@@ -276,8 +277,9 @@ db_store (void *ptr, gnutls_datum key, gnutls_datum data)
memcpy (n, &data, sizeof (gnutls_datum));
-// ret = cherokee_session_cache_add (cache, key.data, key.size, data.data, data.size);
-// cherokee_session_cache_add (cache, key
+/* ret = cherokee_session_cache_add (cache, key.data, key.size, data.data, data.size);
+ cherokee_session_cache_add (cache, key */
+
ret = cherokee_table_add (cache, (char *)key.data, n);
return (ret == ret_ok) ? 0 : 1;
View
6 cherokee/table.c
@@ -33,7 +33,7 @@
static int
equal (void *avl_param, void *key, void *val)
{
-// printf ("equal (%s, %s) = %d\n", key, val, strcmp((const char *)key, (const char *)val));
+/* printf ("equal (%s, %s) = %d\n", key, val, strcmp((const char *)key, (const char *)val)); */
return strcmp((const char *)key, (const char *)val);
}
@@ -194,7 +194,9 @@ cherokee_table_len (cherokee_table_t *tab, size_t *len)
static int
foreach_wrapper (void *key, void *val, void *iter_arg)
{
- ((cherokee_table_foreach_func_t)iter_arg) (key, val);
+ cherokee_table_foreach_func_t func = (cherokee_table_foreach_func_t)iter_arg;
+
+ func (key, val);
return 0;
}
View
5 cherokee/thread.c
@@ -1593,7 +1593,6 @@ step_MULTI_THREAD_TLS_block (cherokee_thread_t *thd, int fdwatch_msecs,
{
int re;
ret_t ret;
-// int unlock2 = 0;
int socket1;
int socket2;
pthread_mutex_t *mutex1;
@@ -1895,7 +1894,7 @@ reactive_conn_from_polling (cherokee_thread_t *thd, cherokee_connection_t *conn)
if (del)
cherokee_fdpoll_del (thd->fdpoll, conn->polling_fd);
-// printf ("- reactive_conn_from_polling %p, multiple=%d del=%d\n", conn, conn->polling_multiple, del);
+/* printf ("- reactive_conn_from_polling %p, multiple=%d del=%d\n", conn, conn->polling_multiple, del); */
cherokee_fdpoll_add (thd->fdpoll, socket->socket, socket->status);
@@ -1919,7 +1918,7 @@ cherokee_thread_deactive_to_polling (cherokee_thread_t *thd, cherokee_connection
if (multiple)
add_fd = check_addition_multiple_fd (thd, fd);
-// printf ("+ move_connection_to_polling %p, multiple=%d add=%d fd=%d\n", conn, multiple, add_fd, fd);
+/* printf ("+ move_connection_to_polling %p, multiple=%d add=%d fd=%d\n", conn, multiple, add_fd, fd); */
/* Remove the connection file descriptor and add the new one
*/
View
3  cherokee/util.c
@@ -1214,7 +1214,8 @@ cherokee_getgrnam (const char *name, struct group *grbuf, char *buf, size_t bufl
ptr += gr_passwd_len + 1;
}
- // TODO: Duplicate char **tmp->gr_mem
+ /* TODO: Duplicate char **tmp->gr_mem
+ */
CHEROKEE_MUTEX_UNLOCK (&__global_getgrnam_mutex);
return ret_ok;
Please sign in to comment.
Something went wrong with that request. Please try again.