]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix free config with free method
authorBastian Dehn <hhaalo@arcor.de>
Wed, 1 Jan 2025 18:58:52 +0000 (19:58 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 1 Jan 2025 19:02:24 +0000 (20:02 +0100)
CMakeLists.txt
src/kds_s2000w_client.c
tests/kds_s2000w_client_mock.c
tests/kds_s2000w_net_tests.c

index aee880d4cb6ef8d93d3891e0916d1a5d3a8d5a08..cba60677860451f8fbf9cbe90f6e53cd4e82f485 100644 (file)
@@ -32,6 +32,8 @@ IF (RUN_TESTS)
 --wrap,kds_s2000w_convert_jpg_to_pnm_with_depth,\
 --wrap,kds_s2000w_client_delete_image,\
 --wrap,kds_s2000w_client_set_option,\
+--wrap,kds_s2000w_client_init,\
+--wrap,kds_s2000w_client_free,\
 --wrap,load_config,\
 --wrap,wait_a_second,\
 --wrap,usleep" CACHE STRING "test coverage compiler flags" FORCE)
index 011965505afe5f774a38d523a19cb5641a6f94e6..8ab2f82cf27b1a38e4aee474e0069dfd263ecdaa 100644 (file)
@@ -122,7 +122,7 @@ void kds_s2000w_client_free()
 {
        debug_printf(ALL, "kds_s2000w_client_free");
 
-       free(config);
+       free_config(config);
        config = NULL;
        curl_easy_cleanup(curl);
        curl = NULL;
index d9073275c6d11272d29853d8db84fc5c107894d4..e52a5b41d4a158237e4e7cdcae43c3b45d2676db 100644 (file)
@@ -22,6 +22,16 @@ void mock_response(response* resp)
        resp->size = mock_resp->size;
 }
 
+void __wrap_kds_s2000w_client_init()
+{
+       return;
+}
+
+void __wrap_kds_s2000w_client_free()
+{
+       return;
+}
+
 int __wrap_kds_s2000w_client_get_option(int64_t sessionid, response* response)
 {
        function_called();
index 83f2c7aaca8495ae4df74b17c0c4f6cf1cb68a6b..e0476f0beb0746c7772822ab9c7a517abbac8183 100644 (file)
@@ -577,7 +577,6 @@ void sane_kds_s2000w_net_open()
        assert_int_equal(status, SANE_STATUS_GOOD);
 
        kds_s2000w_option_descriptor_free_option_descriptors();
-       kds_s2000w_client_free();
        free_handler(h);
        h = NULL;
        kds_s2000w_client_response_free(resp);
@@ -603,7 +602,6 @@ void sane_kds_s2000w_net_open_busy_device()
        assert_int_equal(status, SANE_STATUS_DEVICE_BUSY);
 
        kds_s2000w_option_descriptor_free_option_descriptors();
-       kds_s2000w_client_free();
        free_handler(h);
        h = NULL;
        kds_s2000w_client_response_free(resp);