]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add session id info logging
authorBastian Dehn <hhaalo@arcor.de>
Fri, 16 Feb 2024 19:18:21 +0000 (20:18 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 16 Feb 2024 19:18:21 +0000 (20:18 +0100)
src/kds_s2000w_debug.c
src/kds_s2000w_debug.h
src/kds_s2000w_handler.c
src/kds_s2000w_net.c

index c94466d74d0ff592f2c3334fe592cd2fc4c3b437..e5a5aeb00368b35ebc3f7eb4f39b351f31eefec9 100644 (file)
@@ -13,6 +13,12 @@ void debug_printf_int(int level, const char* message, int value)
                printf("%s: %i\n", message, value);
 }
 
+void debug_printf_long(int level, const char* message, long value)
+{
+       if (level <= LOGLEVEL)
+               printf("%s: %li\n", message, value);
+}
+
 void debug_printf_hex(int level, const char* message, char value)
 {
        if (level <= LOGLEVEL)
index 20e0594270892afe1cd2d4aa963fb0b9639e707c..03b00a69b549028a788f7b1a5d8f04130b5940d2 100644 (file)
@@ -13,5 +13,6 @@
 
 void debug_printf(int level, const char* message);
 void debug_printf_int(int level, const char* message, int value);
+void debug_printf_long(int level, const char* message, long value);
 void debug_printf_hex(int level, const char* message, char value);
 #endif
\ No newline at end of file
index 177806a92bc0cf50a920b0899c6b76b26850c8c4..0f53ddc7852d60c7a1842f4aaa23ab8917f9a328 100644 (file)
@@ -214,7 +214,6 @@ current_state* kds_s2000w_handler_open()
        kds_s2000w_client_response_free(resp);
        resp = NULL;
 
-       printf("sessionid: %li\n", state->sessionid);
        current_scan_status.current_image_number = 1;
        current_scan_status.available_images = 0;
        current_scan_status.downloaded_images = 0;
index 59621c3bb5f4b0f99f284a38e3e5ec97959c4d3d..c416b8775cd052e0e2425736ae53ccd9b8b044ad 100644 (file)
@@ -90,6 +90,7 @@ SANE_Status _sane_kds_s2000w_net_open(SANE_String_Const devicename,
        if (state->state == NOTCONNECTED)
                return SANE_STATUS_IO_ERROR;
 
+       debug_printf_long(INFO, "SessionId", state->sessionid);
        return SANE_STATUS_GOOD;
 }