]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
save condition for open
authorBastian Dehn <hhaalo@arcor.de>
Sat, 20 Jan 2024 17:58:40 +0000 (18:58 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 20 Jan 2024 17:58:40 +0000 (18:58 +0100)
src/kds_s2000w_net.c

index f57a59154b4f0d613dd519debe265d1213ba05a8..6130f89b1d91214b4ed48f28159540ece1fdc49c 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sane/sane.h>
 
 SANE_Option_Descriptor* optionDescripor = NULL;
@@ -38,7 +39,9 @@ SANE_Status _sane_kds_s2000w_net_get_devices(SANE_Device*** device_list,
 SANE_Status _sane_kds_s2000w_net_open(SANE_String_Const devicename,
        SANE_Handle handle)
 {
-       printf("kds_s2000w_net open\n");
+       if (strcmp(devicename, "kds_s2000w_net") != 0) {
+               return SANE_STATUS_INVAL;
+       }
 
        return SANE_STATUS_GOOD;
 }