Changeset 385
- Timestamp:
- 09/01/06 18:55:12 (2 years ago)
- Files:
-
- cherokee/trunk/cherokee/access.c (modified) (4 diffs)
- cherokee/trunk/cherokee/admin_client.c (modified) (1 diff)
- cherokee/trunk/cherokee/config_node.c (modified) (1 diff)
- cherokee/trunk/cherokee/connection_info.c (modified) (2 diffs)
- cherokee/trunk/cherokee/ext_source.c (modified) (2 diffs)
- cherokee/trunk/cherokee/fcgi_dispatcher.c (modified) (3 diffs)
- cherokee/trunk/cherokee/handler_cgi_base.c (modified) (1 diff)
- cherokee/trunk/cherokee/handler_dirlist.c (modified) (5 diffs)
- cherokee/trunk/cherokee/handler_error_redir.c (modified) (1 diff)
- cherokee/trunk/cherokee/handler_redir.c (modified) (2 diffs)
- cherokee/trunk/cherokee/iocache.c (modified) (1 diff)
- cherokee/trunk/cherokee/list.c (modified) (5 diffs)
- cherokee/trunk/cherokee/list.h (modified) (5 diffs)
- cherokee/trunk/cherokee/matching_list.c (modified) (1 diff)
- cherokee/trunk/cherokee/mime.c (modified) (2 diffs)
- cherokee/trunk/cherokee/reqs_list.c (modified) (1 diff)
- cherokee/trunk/cherokee/server.c (modified) (2 diffs)
- cherokee/trunk/cherokee/thread.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/cherokee/access.c
r384 r385 160 160 */ 161 161 list_for_each_safe (i, tmp, LIST(&entry->list_ips)) { 162 list_del (i);162 cherokee_list_del (i); 163 163 free (i); 164 164 } … … 167 167 */ 168 168 list_for_each_safe (i, tmp, LIST(&entry->list_subnets)) { 169 list_del (i);169 cherokee_list_del (i); 170 170 free (i); 171 171 } … … 318 318 } 319 319 320 list_add (LIST(n), &entry->list_ips);320 cherokee_list_add (LIST(n), &entry->list_ips); 321 321 322 322 return ret; … … 363 363 if (n == NULL) return ret_error; 364 364 365 list_add (LIST(n), &entry->list_subnets);365 cherokee_list_add (LIST(n), &entry->list_subnets); 366 366 367 367 /* Parse the IP cherokee/trunk/cherokee/admin_client.c
r384 r385 439 439 } 440 440 441 list_add (LIST(conn_info), conns_list);441 cherokee_list_add (LIST(conn_info), conns_list); 442 442 cherokee_buffer_clean (&info_str); 443 443 } cherokee/trunk/cherokee/config_node.c
r384 r385 112 112 cherokee_buffer_add_buffer (&n->key, key); 113 113 114 list_add_tail (LIST(n), &entry->child);114 cherokee_list_add_tail (LIST(n), &entry->child); 115 115 return n; 116 116 } cherokee/trunk/cherokee/connection_info.c
r384 r385 252 252 253 253 cherokee_connection_info_fill_up (n, CONN(i)); 254 list_add (LIST(n), list);255 } 256 257 if ( list_empty(list))254 cherokee_list_add (LIST(n), list); 255 } 256 257 if (cherokee_list_empty (list)) 258 258 return ret_not_found; 259 259 … … 278 278 } 279 279 280 if ( list_empty(list))280 if (cherokee_list_empty (list)) 281 281 return ret_not_found; 282 282 cherokee/trunk/cherokee/ext_source.c
r384 r385 372 372 /* Instance a new entry 373 373 */ 374 if ( list_empty (ext_list)) {374 if (cherokee_list_empty (ext_list)) { 375 375 ret = cherokee_ext_source_head_new (&head); 376 376 if (ret != ret_ok) return ret; … … 384 384 /* Add the entry to the list 385 385 */ 386 list_add_tail (LIST(server_entry), ext_list);386 cherokee_list_add_tail (LIST(server_entry), ext_list); 387 387 388 388 /* Parse properties cherokee/trunk/cherokee/fcgi_dispatcher.c
r384 r385 80 80 cherokee_connection_t *conn = HANDLER_CONN(l); 81 81 82 list_del (LIST(conn));82 cherokee_list_del (LIST(conn)); 83 83 cherokee_thread_inject_active_connection (HANDLER_THREAD(l), conn); 84 84 } … … 177 177 cherokee_list_t *i; 178 178 179 if ( list_empty (&fcgi->queue))179 if (cherokee_list_empty (&fcgi->queue)) 180 180 return ret_ok; 181 181 182 182 i = fcgi->queue.next; 183 list_del (i);183 cherokee_list_del (i); 184 184 185 185 return cherokee_thread_inject_active_connection (CONN_THREAD(i), CONN(i)); … … 190 190 cherokee_fcgi_dispatcher_queue_conn (cherokee_fcgi_dispatcher_t *fcgi, cherokee_connection_t *conn) 191 191 { 192 list_add_tail (LIST(conn), &fcgi->queue);192 cherokee_list_add_tail (LIST(conn), &fcgi->queue); 193 193 return ret_ok; 194 194 } cherokee/trunk/cherokee/handler_cgi_base.c
r384 r385 180 180 if (env == NULL) return ret_error; 181 181 182 list_add_tail (LIST(env), &props->system_env);182 cherokee_list_add_tail (LIST(env), &props->system_env); 183 183 } 184 184 } else if (equal_buf_str (&subconf->key, "error_handler")) { cherokee/trunk/cherokee/handler_dirlist.c
r384 r385 410 410 411 411 list_for_each_safe (i, tmp, &dhdl->dirs) { 412 list_del (i);412 cherokee_list_del (i); 413 413 free (i); 414 414 } 415 415 416 416 list_for_each_safe (i, tmp, &dhdl->files) { 417 list_del (i);417 cherokee_list_del (i); 418 418 free (i); 419 419 } … … 559 559 560 560 if (S_ISDIR(item->stat.st_mode)) { 561 list_add (LIST(item), &dhdl->dirs);561 cherokee_list_add (LIST(item), &dhdl->dirs); 562 562 } else { 563 list_add (LIST(item), &dhdl->files);563 cherokee_list_add (LIST(item), &dhdl->files); 564 564 } 565 565 } … … 572 572 /* Sort the file list 573 573 */ 574 if (! list_empty(&dhdl->files)) {574 if (! cherokee_list_empty(&dhdl->files)) { 575 575 list_sort_by_type (&dhdl->files, dhdl->sort); 576 576 dhdl->file_ptr = dhdl->files.next; … … 580 580 * it doesn't make sense to look for the size 581 581 */ 582 if (! list_empty(&dhdl->dirs)) {582 if (! cherokee_list_empty (&dhdl->dirs)) { 583 583 cherokee_dirlist_sort_t sort = dhdl->sort; 584 584 … … 660 660 if (ret != ret_ok) return ret; 661 661 662 if (! list_empty (&HDL_DIRLIST_PROP(dhdl)->notice_files)) {662 if (! cherokee_list_empty (&HDL_DIRLIST_PROP(dhdl)->notice_files)) { 663 663 ret = read_notice_file (dhdl); 664 664 if (ret != ret_ok) return ret; cherokee/trunk/cherokee/handler_error_redir.c
r384 r385 94 94 cherokee_buffer_add_buffer (&entry->url, &subconf->val); 95 95 96 list_add (&entry->entry, &props->errors);96 cherokee_list_add (&entry->entry, &props->errors); 97 97 } 98 98 cherokee/trunk/cherokee/handler_redir.c
r384 r385 227 227 TRACE (ENTRIES, "Explicit redirection to '%s'\n", CONN(cnt)->redirect.buf); 228 228 } else { 229 if (! list_empty (&HDL_REDIR_PROPS(n)->regex_list)) {229 if (! cherokee_list_empty (&HDL_REDIR_PROPS(n)->regex_list)) { 230 230 231 231 /* Manage the regex rules … … 336 336 /* Add the list 337 337 */ 338 list_add_tail (LIST(n), &props->regex_list);338 cherokee_list_add_tail (LIST(n), &props->regex_list); 339 339 340 340 return ret_ok; cherokee/trunk/cherokee/iocache.c
r384 r385 182 182 delobj->filename = key; 183 183 184 list_add (LIST(delobj), ¶ms->to_delete);184 cherokee_list_add (LIST(delobj), ¶ms->to_delete); 185 185 } 186 186 cherokee/trunk/cherokee/list.c
r384 r385 36 36 37 37 list = head->next; 38 list_del(head);38 cherokee_list_del(head); 39 39 insize = 1; 40 40 for (;;) { … … 115 115 /* Init 116 116 */ 117 INIT_LIST_HEAD ((cherokee_list_t*)n);117 INIT_LIST_HEAD (LIST(n)); 118 118 n->info = item; 119 119 120 120 /* Add to list 121 121 */ 122 list_add ((cherokee_list_t *)n, head);122 cherokee_list_add (LIST(n), head); 123 123 124 124 return ret_ok; … … 133 133 /* Init 134 134 */ 135 INIT_LIST_HEAD ((cherokee_list_t*)n);135 INIT_LIST_HEAD (LIST(n)); 136 136 n->info = item; 137 137 138 138 /* Add to list 139 139 */ 140 list_add_tail ((cherokee_list_t *)n, head);140 cherokee_list_add_tail (LIST(n), head); 141 141 142 142 return ret_ok; … … 162 162 cherokee_list_content_free_item (cherokee_list_t *head, cherokee_list_free_func free_func) 163 163 { 164 list_del (head);164 cherokee_list_del (head); 165 165 166 166 if ((free_func != NULL) && (LIST_ITEM(head)->info)) { … … 176 176 cherokee_list_content_free_item_simple (cherokee_list_t *head) 177 177 { 178 list_del (head);178 cherokee_list_del (head); 179 179 180 180 if (LIST_ITEM(head)->info) { cherokee/trunk/cherokee/list.h
r384 r385 64 64 65 65 static inline int 66 list_empty (cherokee_list_t *list)66 cherokee_list_empty (cherokee_list_t *list) 67 67 { 68 68 return (list->next == list); … … 70 70 71 71 static inline void 72 list_add (cherokee_list_t *new_entry, cherokee_list_t *head)72 cherokee_list_add (cherokee_list_t *new_entry, cherokee_list_t *head) 73 73 { 74 74 new_entry->next = head->next; … … 79 79 80 80 static inline void 81 list_add_tail (cherokee_list_t *new_entry, cherokee_list_t *head)81 cherokee_list_add_tail (cherokee_list_t *new_entry, cherokee_list_t *head) 82 82 { 83 83 new_entry->next = head; … … 88 88 89 89 static inline void 90 list_del (cherokee_list_t *entry)90 cherokee_list_del (cherokee_list_t *entry) 91 91 { 92 92 entry->next->prev = entry->prev; … … 95 95 96 96 static inline void 97 list_reparent (cherokee_list_t *list, cherokee_list_t *new_entry)97 cherokee_list_reparent (cherokee_list_t *list, cherokee_list_t *new_entry) 98 98 { 99 if ( list_empty(list))99 if (cherokee_list_empty(list)) 100 100 return; 101 101 cherokee/trunk/cherokee/matching_list.c
r384 r385 77 77 n->string = strdup(item); 78 78 79 list_add (LIST(n), list);79 cherokee_list_add (LIST(n), list); 80 80 return ret_ok; 81 81 } cherokee/trunk/cherokee/mime.c
r384 r385 55 55 56 56 list_for_each_safe (i, tmp, &mime->mime_list) { 57 list_del (i);57 cherokee_list_del (i); 58 58 cherokee_mime_entry_free (MIME_ENTRY(i)); 59 59 } … … 102 102 cherokee_mime_add_entry (cherokee_mime_t *mime, cherokee_mime_entry_t *entry) 103 103 { 104 list_add (LIST(entry), &mime->mime_list);104 cherokee_list_add (LIST(entry), &mime->mime_list); 105 105 return ret_ok; 106 106 } cherokee/trunk/cherokee/reqs_list.c
r384 r385 132 132 /* Add the new connection 133 133 */ 134 list_add_tail (&plugin_entry->list_node, LIST(rl));134 cherokee_list_add_tail (&plugin_entry->list_node, LIST(rl)); 135 135 136 136 /* Compile the expression cherokee/trunk/cherokee/server.c
r384 r385 795 795 thread->thread_pref = (i % 2)? thread_normal_tls : thread_tls_normal; 796 796 797 list_add (LIST(thread), &srv->thread_list);797 cherokee_list_add (LIST(thread), &srv->thread_list); 798 798 } 799 799 #endif … … 1296 1296 if (ret != ret_ok) return ret; 1297 1297 1298 list_add (LIST(vsrv), &srv->vservers);1298 cherokee_list_add (LIST(vsrv), &srv->vservers); 1299 1299 1300 1300 param[0] = srv; cherokee/trunk/cherokee/thread.c
r384 r385 272 272 add_connection (cherokee_thread_t *thd, cherokee_connection_t *conn) 273 273 { 274 list_add_tail (LIST(conn), &thd->active_list);274 cherokee_list_add_tail (LIST(conn), &thd->active_list); 275 275 thd->active_list_num++; 276 276 } … … 279 279 add_connection_polling (cherokee_thread_t *thd, cherokee_connection_t *conn) 280 280 { 281 list_add_tail (LIST(conn), &thd->polling_list);281 cherokee_list_add_tail (LIST(conn), &thd->polling_list); 282 282 thd->polling_list_num++; 283 283 } … … 286 286 del_connection (cherokee_thread_t *thd, cherokee_connection_t *conn) 287 287 { 288 list_del (LIST(conn));288 cherokee_list_del (LIST(conn)); 289 289 thd->active_list_num--; 290 290 } … … 293 293 del_connection_polling (cherokee_thread_t *thd, cherokee_connection_t *conn) 294 294 { 295 list_del (LIST(conn));295 cherokee_list_del (LIST(conn)); 296 296 thd->polling_list_num--; 297 297 } … … 313 313 /* Add it to the reusable connection list 314 314 */ 315 list_add (LIST(conn), &thread->reuse_list);315 cherokee_list_add (LIST(conn), &thread->reuse_list); 316 316 thread->reuse_list_num++; 317 317 … … 857 857 */ 858 858 matched_req = false; 859 if (! list_empty (&ventry->reqs)) {859 if (! cherokee_list_empty (&ventry->reqs)) { 860 860 ret = cherokee_connection_get_req_entry (conn, &ventry->reqs, &entry); 861 861 switch (ret) { … … 1701 1701 server = SRV(thd->server); 1702 1702 1703 if ( list_empty (&thd->reuse_list)) {1703 if (cherokee_list_empty (&thd->reuse_list)) { 1704 1704 ret_t ret; 1705 1705 … … 1712 1712 */ 1713 1713 new_connection = CONN(thd->reuse_list.prev); 1714 list_del (LIST(new_connection));1714 cherokee_list_del (LIST(new_connection)); 1715 1715 thd->reuse_list_num--; 1716 1716