Subversion Repositories Tewi

Rev

Rev 178 | Rev 187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 178 Rev 182
Line 1... Line 1...
1
/* $Id: config.c 178 2024-09-26 21:31:03Z nishi $ */
1
/* $Id: config.c 182 2024-09-27 12:55:12Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "tw_config.h"
5
#include "tw_config.h"
6
#include "tw_module.h"
6
#include "tw_module.h"
Line 99... Line 99...
99
	config.module_count = 0;
99
	config.module_count = 0;
100
	config.extension = NULL;
100
	config.extension = NULL;
101
	config.server_root = cm_strdup(PREFIX);
101
	config.server_root = cm_strdup(PREFIX);
102
	config.server_admin = cm_strdup(SERVER_ADMIN);
102
	config.server_admin = cm_strdup(SERVER_ADMIN);
103
	config.defined[0] = NULL;
103
	config.defined[0] = NULL;
-
 
104
#ifdef _PSP
-
 
105
	strcpy(config.hostname, "psp");
-
 
106
#else
104
	gethostname(config.hostname, 1024);
107
	gethostname(config.hostname, 1024);
-
 
108
#endif
105
#ifdef HAS_CHROOT
109
#ifdef HAS_CHROOT
106
	tw_add_define("HAS_CHROOT");
110
	tw_add_define("HAS_CHROOT");
107
#endif
111
#endif
108
#ifndef NO_SSL
112
#ifndef NO_SSL
109
	tw_add_define("HAS_SSL");
113
	tw_add_define("HAS_SSL");
Line 408... Line 412...
408
					} else if(cm_strcaseequ(r[0], "DirectoryIndex")) {
412
					} else if(cm_strcaseequ(r[0], "DirectoryIndex")) {
409
						for(i = 1; r[i] != NULL; i++) {
413
						for(i = 1; r[i] != NULL; i++) {
410
							current->indexes[current->index_count++] = cm_strdup(r[i]);
414
							current->indexes[current->index_count++] = cm_strdup(r[i]);
411
						}
415
						}
412
					} else if(cm_strcaseequ(r[0], "ReadmeFile") || cm_strcaseequ(r[0], "Readme")) {
416
					} else if(cm_strcaseequ(r[0], "ReadmeFile") || cm_strcaseequ(r[0], "Readme")) {
413
						if(cm_strcaseequ(r[0], "Readme")){
417
						if(cm_strcaseequ(r[0], "Readme")) {
414
							cm_force_log("NOTE: Readme directive is deprecated.");
418
							cm_force_log("NOTE: Readme directive is deprecated.");
415
						}
419
						}
416
						for(i = 1; r[i] != NULL; i++) {
420
						for(i = 1; r[i] != NULL; i++) {
417
							current->readmes[current->readme_count++] = cm_strdup(r[i]);
421
							current->readmes[current->readme_count++] = cm_strdup(r[i]);
418
						}
422
						}