]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change response data null and curl all globals
authorBastian Dehn <hhaalo@arcor.de>
Sat, 18 Jan 2025 10:15:09 +0000 (11:15 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 18 Jan 2025 10:15:09 +0000 (11:15 +0100)
src/kds_s2000w_client.c

index d10c10e41d7621427d24d98dd645f843a4432477..89f48c503f7d9280fb5fa52e50b8bf6b0d075753 100644 (file)
@@ -76,8 +76,7 @@ response* kds_s2000w_client_response_init()
        debug_printf(ALL, "kds_s2000w_client_response_init");
 
        response* resp = malloc(sizeof(response));
-       resp->data = malloc(sizeof(char));
-       resp->data[0] = '\0';
+       resp->data = NULL;
        resp->size = 0;
        resp->code = 0L;
 
@@ -103,7 +102,7 @@ void kds_s2000w_client_init()
 
        char* config_stream = read_config_file(CONFIG_FILE);
        config = load_config(config_stream);
-       curl_global_init(CURL_GLOBAL_SSL);
+       curl_global_init(CURL_GLOBAL_ALL);
        curl = curl_easy_init();
        errbuf[0] = 0;