Changeset 6 in Main for trunk/Server/main.c
- Timestamp:
- Sep 13, 2024, 7:28:20 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/main.c
r4 r6 4 4 #include <stdbool.h> 5 5 #include <string.h> 6 7 #include <openssl/opensslv.h> 6 8 7 9 #include <cm_log.h> … … 20 22 if(!cm_do_log) { 21 23 cm_do_log = true; 22 cm_log("", "This is Tewi HTTPd, version %s ", tw_get_version());24 cm_log("", "This is Tewi HTTPd, version %s, using %s", tw_get_version(), OPENSSL_VERSION_TEXT); 23 25 } else { 24 26 cm_do_log = true; 25 27 } 26 } else if(strcmp(argv[i], "--config") == 0 || strcmp(argv[i], "-C") == 0) {28 } else if(strcmp(argv[i], "--config") == 0 || strcmp(argv[i], "-C") == 0) { 27 29 i++; 28 if(argv[i] == NULL) {30 if(argv[i] == NULL) { 29 31 fprintf(stderr, "Missing argument\n"); 30 32 return 1; … … 37 39 } 38 40 } 39 if(tw_config_read(config) != 0){ 41 tw_config_init(); 42 if(tw_config_read(config) != 0) { 40 43 fprintf(stderr, "Could not read the config\n"); 41 44 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.