From: Bastian Dehn Date: Tue, 21 May 2024 18:25:32 +0000 (+0200) Subject: remove client callback function X-Git-Tag: v1.0.3^2~1^2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=43b7595bde20b19e001dd89f8e67aaa2a001d4a3;p=sane-kds-s2000w-net.git remove client callback function --- diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 07fb624..4c30d78 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -30,27 +30,6 @@ void _kds_s2000w_client_load_config() load_config(&p_config, config_stream); } -size_t _kds_s2000w_client_callback(char *ptr, size_t size, size_t nmemb, void *userdata) -{ - debug_printf(ALL, "kds_s2000w_client_callback"); - response* data = NULL; - char* new_data_ptr = NULL; - size_t fullsize = 0; - - data = (response*) userdata; - fullsize = size * nmemb; - new_data_ptr = realloc(data->data, data->size + fullsize + sizeof(char)); - if (!new_data_ptr) - return 0; - - data->data = new_data_ptr; - memcpy(data->data + data->size, ptr, fullsize); - data->size += fullsize; - data->data[data->size] = 0; - - return fullsize; -} - void _kds_s2000w_client_stream_to_response(FILE* stream, response* resp, size_t* size) { debug_printf(ALL, "kds_s2000w_client_stream_to_response");