Changeset 1975 for cherokee/trunk/cherokee/config_entry.c
- Timestamp:
- 09/11/08 20:00:53 (4 months ago)
- Files:
-
- cherokee/trunk/cherokee/config_entry.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/cherokee/config_entry.c
r1880 r1975 29 29 #include "http.h" 30 30 #include "util.h" 31 #include "encoder.h" 31 32 32 33 #define ENTRIES "config,rules" … … 37 38 table_validator 38 39 } prop_table_types_t; 39 40 40 41 41 42 /* Implements _new() and _free() … … 66 67 entry->expiration_time = 0; 67 68 69 entry->encoders = NULL; 70 68 71 return ret_ok; 69 72 } … … 102 105 entry->users = NULL; 103 106 } 104 105 return ret_ok; 106 } 107 108 109 ret_t 110 cherokee_config_entry_set_handler (cherokee_config_entry_t *entry, cherokee_plugin_info_handler_t *plugin_info) 107 108 if (entry->encoders) { 109 cherokee_avl_mrproper (entry->encoders, NULL); 110 entry->encoders = NULL; 111 } 112 113 return ret_ok; 114 } 115 116 ret_t 117 cherokee_config_entry_add_encoder (cherokee_config_entry_t *entry, 118 cherokee_buffer_t *name, 119 cherokee_plugin_info_t *plugin_info) 120 { 121 if (entry->encoders == NULL) { 122 cherokee_avl_new (&entry->encoders); 123 } 124 125 cherokee_avl_add (entry->encoders, name, (void*)plugin_info->instance); 126 return ret_ok; 127 } 128 129 130 ret_t 131 cherokee_config_entry_set_handler (cherokee_config_entry_t *entry, 132 cherokee_plugin_info_handler_t *plugin_info) 111 133 { 112 134 return_if_fail (plugin_info != NULL, ret_error); … … 169 191 entry->expiration_time = source->expiration_time; 170 192 } 193 194 if (! entry->encoders) 195 entry->encoders = source->encoders; 171 196 172 197 return ret_ok; … … 189 214 printf ("expiration type: %d\n", entry->expiration); 190 215 printf ("expiration_time %lu\n", entry->expiration_time); 191 192 return ret_ok; 193 } 216 printf ("encoders_accepted %p\n", entry->encoders); 217 218 return ret_ok; 219 }