From: Bastian Dehn Date: Thu, 25 Sep 2025 16:35:10 +0000 (+0200) Subject: add print version info log message X-Git-Tag: v1.1.8^2~15 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=518bdeb36f0b8d2eac47854f5ab6c9f6957e08a2;p=sane-kds-s2000w-net.git add print version info log message --- diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index 44d1bac..5745bff 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -10,6 +10,7 @@ #include "kds_s2000w_debug.h" #define SPACE 0x0a +#define DEVICE_NAME "kds_s2000w_net" uint32_t _kds_s2000w_handler_find_first_data_byte(imagedata* image) { @@ -131,13 +132,14 @@ void kds_s2000w_handler_open(const char* devicename, void** handle) { kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_open"); - if (strcmp(devicename, "kds_s2000w_net") != 0) + if (strcmp(devicename, DEVICE_NAME) != 0) return; handler* h = kds_s2000w_handler_init(); *handle = h; _kds_s2000w_handler_load_config(h); + kds_s2000w_debug_printf_version(INFO, DEVICE_NAME, MAJOR, MINOR, PATCH); // status code 408 waking up repeat open session response* resp = NULL; diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 856a198..ce6a1e1 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -63,10 +63,11 @@ SANE_Status sane_kds_s2000w_net_open(SANE_String_Const devicename, { kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_open"); - if (strcmp(devicename, "kds_s2000w_net") != 0) + if (strcmp(devicename, NAME) != 0) return SANE_STATUS_INVAL; kds_s2000w_handler_open(devicename, handle); + handler* h = (handler*) *handle; if (h->state == NOTCONNECTED) {