From: Bastian Dehn Date: Sat, 4 Jan 2025 11:48:13 +0000 (+0100) Subject: change print errors with debug print X-Git-Tag: v1.0.23^2~3 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=354ab09edc3da225f83f42ab0bc0840313733130;p=sane-kds-s2000w-net.git change print errors with debug print --- diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 5443de6..cfd167e 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -34,7 +34,7 @@ void _kds_s2000w_client_print_error_status(CURL* curl) if (header == NULL) return; - fprintf(stderr, "%s\n", header->value); + debug_printf(ERROR, header->value); } void _kds_s2000w_client_print_error_result(CURLcode result) @@ -42,7 +42,7 @@ void _kds_s2000w_client_print_error_result(CURLcode result) if (result == CURLE_OK) return; - fprintf(stderr, "ERROR: curl_easy_perform: %s\n", curl_easy_strerror(result)); + debug_printf(ERROR, curl_easy_strerror(result)); } void _kds_s2000w_client_stream_to_response(char* mem, response* resp, size_t* size) diff --git a/src/kds_s2000w_image_converter.c b/src/kds_s2000w_image_converter.c index b77b135..d9f09f9 100644 --- a/src/kds_s2000w_image_converter.c +++ b/src/kds_s2000w_image_converter.c @@ -32,7 +32,7 @@ void kds_s2000w_convert_to_pnm_with_depth(blobdata* in, Image* input_image = BlobToImage(image_info, in->data, in->size , exception); if (exception->severity != UndefinedException) { - fprintf(stderr, "%s\n", GetExceptionMessage(exception->error_number)); + debug_printf(ERROR, GetExceptionMessage(exception->error_number)); CatchException(exception); } @@ -93,7 +93,7 @@ void kds_s2000w_metadata_from_image(blobdata* image, image_metadata* mdata) Image* input_image = BlobToImage(image_info, image->data, image->size , exception); if (exception->severity != UndefinedException) { - fprintf(stderr, "%s\n", GetExceptionMessage(exception->error_number)); + debug_printf(ERROR, GetExceptionMessage(exception->error_number)); CatchException(exception); }