diff --git a/src/civetweb.c b/src/civetweb.c index 30b388f0..3b8f5e9d 100755 --- a/src/civetweb.c +++ b/src/civetweb.c @@ -137,7 +137,7 @@ int clock_gettime(int clk_id, struct timespec *t); int clock_gettime(int clk_id, struct timespec *t) { - memset(t, 0, sizeof(*t)); + memset(t, 0, sizeof(*t)); if (clk_id == CLOCK_REALTIME) { struct timeval now; int rv = gettimeofday(&now, NULL); @@ -10082,30 +10082,6 @@ initialize_ssl(struct mg_context *ctx) return 1; } -#if 0 /* TODO: check if this function is required at all */ -static int -verify_ssl_client(int preverify_ok, X509_STORE_CTX *x509_ctx) -{ - int ret = preverify_ok; - /* - TODO: store rejected connection attempts - char buf[256]; - struct X509 *err_cert; - int err, depth; - SSL *ssl; - */ - - /* Ignore pre-verification - only accept clients we know locally */ - (void)preverify_ok; - /* - err_cert = X509_STORE_CTX_get_current_cert(x509_st); - err = X509_STORE_CTX_get_error(x509_st); - depth = X509_STORE_CTX_get_error_depth(x509_st); - */ - return ret; -} -#endif - static int ssl_use_pem_file(struct mg_context *ctx, const char *pem) diff --git a/src/main.c b/src/main.c index 76024e0f..eefc7815 100644 --- a/src/main.c +++ b/src/main.c @@ -2067,9 +2067,7 @@ change_password_file() static int manage_service(int action) { - static const char *service_name = - "Civetweb"; /* TODO (mid): check using server_name instead of - * service_name */ + const char *service_name = g_server_name; SC_HANDLE hSCM = NULL, hService = NULL; SERVICE_DESCRIPTION descr; char path[PATH_MAX + 20] = ""; /* Path to executable plus magic argument */ @@ -2126,6 +2124,7 @@ manage_service(int action) return success; } + static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {