From: Bastian Dehn Date: Sat, 18 Jan 2025 10:15:09 +0000 (+0100) Subject: change response data null and curl all globals X-Git-Tag: v1.0.27^2~1 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=3c3d05babd9ba98eea9f6257ed07f2c3a8e89e58;p=sane-kds-s2000w-net.git change response data null and curl all globals --- diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index d10c10e..89f48c5 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -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;