Changeset 17 in Main for trunk/Server/config.c
- Timestamp:
- Sep 14, 2024, 2:41:07 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/config.c
r16 r17 4 4 5 5 #include "tw_config.h" 6 #include "tw_module.h" 6 7 7 8 #include <stdio.h> … … 38 39 config.root.sslcert = NULL; 39 40 config.vhost_count = 0; 41 config.server_root = cm_strdup(PREFIX); 40 42 gethostname(config.hostname, 1024); 41 43 } … … 126 128 current->sslcert = cm_strdup(r[1]); 127 129 } 130 } else if(cm_strcaseequ(r[0], "ServerRoot")) { 131 if(r[1] == NULL) { 132 cm_log("Config", "Missing path at line %d", ln); 133 stop = 1; 134 } else { 135 if(config.server_root != NULL) free(config.server_root); 136 config.server_root = cm_strdup(r[1]); 137 } 138 } else if(cm_strcaseequ(r[0], "LoadModule")) { 139 for(i = 1; r[i] != NULL; i++) { 140 void* mod = tw_module_load(r[i]); 141 if(mod != NULL) { 142 if(tw_module_init(mod) != 0) { 143 stop = 1; 144 break; 145 } 146 } else { 147 stop = 1; 148 break; 149 } 150 } 128 151 } else { 129 152 if(r[0] != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.