server: proxy: cap plugin: fix var and func declaration
authorKubistika <kmizrachi18@gmail.com>
Wed, 3 Jun 2020 10:56:52 +0000 (13:56 +0300)
committerArmin Novak <armin.novak@thincast.com>
Mon, 22 Jun 2020 07:29:45 +0000 (09:29 +0200)
(cherry picked from commit 0cf764f170384b1f65aa4950f54c668f8212ac11)

server/proxy/modules/capture/cap_config.c
server/proxy/modules/capture/cap_main.c

index ae4b6a6..32e02ae 100644 (file)
@@ -29,7 +29,7 @@ BOOL capture_plugin_init_config(captureConfig* config)
        char* tmp = NULL;
        DWORD nSize = GetEnvironmentVariableA(name, NULL, 0);
 
-       if (nSize)
+       if (nSize > 0)
        {
                char* colon;
                int addrLen;
index 8780900..0f5d5bc 100644 (file)
@@ -38,7 +38,7 @@
 static proxyPluginsManager* g_plugins_manager = NULL;
 static captureConfig config = { 0 };
 
-static SOCKET capture_plugin_init_socket()
+static SOCKET capture_plugin_init_socket(void)
 {
        int status;
        int sockfd;
@@ -124,12 +124,13 @@ static BOOL capture_plugin_session_end(proxyData* pdata)
 {
        SOCKET socket;
        BOOL ret;
+       wStream* s;
 
        socket = capture_plugin_get_socket(pdata);
        if (socket == -1)
                return FALSE;
 
-       wStream* s = capture_plugin_packet_new(SESSION_END_PDU_BASE_SIZE, MESSAGE_TYPE_SESSION_END);
+       s = capture_plugin_packet_new(SESSION_END_PDU_BASE_SIZE, MESSAGE_TYPE_SESSION_END);
        if (!s)
                return FALSE;
 
@@ -248,7 +249,7 @@ static BOOL capture_plugin_server_post_connect(proxyData* pdata)
        return TRUE;
 }
 
-static BOOL capture_plugin_unload()
+static BOOL capture_plugin_unload(void)
 {
        capture_plugin_config_free_internal(&config);
        return TRUE;