Changeset 161 in Main for trunk/Server/config.c
- Timestamp:
- Sep 25, 2024, 10:35:04 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/config.c
r156 r161 103 103 config.defined[0] = NULL; 104 104 gethostname(config.hostname, 1024); 105 #ifdef HAS_CHROOT 106 tw_add_define("HAS_CHROOT"); 107 #endif 105 108 } 106 109 … … 274 277 } 275 278 #endif 279 #ifdef HAS_CHROOT 280 } else if(cm_strcaseequ(r[0], "ChrootDirectory")) { 281 if(r[1] == NULL) { 282 cm_log("Config", "Missing path at line %d", ln); 283 stop = 1; 284 } else { 285 if(current->chroot_path != NULL) free(current->chroot_path); 286 current->chroot_path = cm_strdup(r[1]); 287 } 288 #endif 276 289 } else if(cm_strcaseequ(r[0], "ForceLog")) { 277 290 if(r[1] == NULL) { … … 346 359 if(current->root != NULL) free(current->root); 347 360 current->root = cm_strdup(strcmp(r[1], "/") == 0 ? "" : r[1]); 348 }349 } else if(cm_strcaseequ(r[0], "ServerRoot")) {350 if(r[1] == NULL) {351 cm_log("Config", "Missing path at line %d", ln);352 stop = 1;353 } else {354 if(config.server_root != NULL) free(config.server_root);355 config.server_root = cm_strdup(r[1]);356 361 } 357 362 } else if(cm_strcaseequ(r[0], "MIMEType")) {
Note:
See TracChangeset
for help on using the changeset viewer.