- Timestamp:
- Sep 14, 2024, 2:41:07 AM (2 months ago)
- Location:
- trunk
- Files:
-
- 5 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r6 r17 7 7 FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) PREFIX=$(PREFIX) 8 8 9 .PHONY: all format clean ./Server ./Common 9 .PHONY: all format clean ./Server ./Common ./Module 10 10 11 all: ./Server 11 all: ./Server ./Module 12 12 13 13 ./Server:: ./Common 14 $(MAKE) -C $@ $(FLAGS) 15 16 ./Module:: ./Common 14 17 $(MAKE) -C $@ $(FLAGS) 15 18 … … 18 21 19 22 format: 20 clang-format --verbose -i `find ./Server ./Common -name "*.c" -or -name "*.h"`23 clang-format --verbose -i `find ./Server ./Common ./Module -name "*.c" -or -name "*.h"` 21 24 22 25 clean: 23 26 $(MAKE) -C ./Server $(FLAGS) clean 27 $(MAKE) -C ./Module $(FLAGS) clean 24 28 $(MAKE) -C ./Common $(FLAGS) clean -
trunk/Platform/generic.mk
r6 r17 7 7 LIBS = 8 8 EXEC = 9 LIB = .so -
trunk/Platform/win64.mk
r8 r17 7 7 LIBS = -lws2_32 8 8 EXEC = .exe 9 LIB = .dll -
trunk/Server/Makefile
r16 r17 6 6 .SUFFIXES: .c .o 7 7 8 OBJS = version.o main.o config.o server.o ssl.o http.o 8 OBJS = version.o main.o config.o server.o ssl.o http.o module.o 9 9 10 10 all: tewi$(EXEC) -
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) { -
trunk/Server/http.c
r16 r17 12 12 #include <stdbool.h> 13 13 #include <stdlib.h> 14 #include <sys/socket.h> 14 #include <string.h> 15 16 #ifdef __MINGW32__ 17 #include <winsock2.h> 18 #else 19 #include <sys/select.h> 20 #endif 15 21 16 22 void tw_free_request(struct tw_http_request* req) { -
trunk/Server/server.c
r16 r17 161 161 struct tw_http_request req; 162 162 int ret = tw_http_parse(s, sock, &req); 163 if(ret == 0) { 164 } 163 165 cleanup: 164 166 if(sslworks) { -
trunk/Server/tw_config.h
r12 r17 23 23 struct tw_config_entry vhosts[MAX_VHOSTS]; 24 24 int vhost_count; 25 char* server_root; 25 26 }; 26 27 -
trunk/Server/tw_http.h
r16 r17 16 16 }; 17 17 18 struct tw_http_tool {};19 20 18 #ifdef SOURCE 21 19 #include <openssl/ssl.h> -
trunk/example.conf
r13 r17 1 1 # $Id$ 2 2 # This is an example config 3 4 LoadModule /home/nishi/SVN/tewi/trunk/Module/mod_example.so 3 5 4 6 Listen 8000 8001 8002 8003 8004
Note:
See TracChangeset
for help on using the changeset viewer.