]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change comments with asterisk
authorBastian Dehn <hhaalo@arcor.de>
Sat, 27 Sep 2025 07:37:43 +0000 (09:37 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 27 Sep 2025 07:37:43 +0000 (09:37 +0200)
src/kds_s2000w_config.h
src/kds_s2000w_handler.c

index 935dcfb163386307300d952f5f3a5b972d5e950b..2649a848f407b85df3a78a75b0836e66c5ca7ee3 100644 (file)
@@ -12,7 +12,7 @@ typedef struct {
        uint8_t profile;
 } program_config;
 
-// sanei use strdup it must be free static variable
+/* sanei use strdup it must be free static variable */
 extern char* sanei_config_get_paths(void);
 
 char* kds_s2000w_config_read(const char* filename);
index 5745bff95f2dc9d6c4e82e9a1906145bd36136c4..25f4fe45afaf053b8358ac63daf9838527d9ef20 100644 (file)
@@ -11,6 +11,7 @@
 
 #define SPACE 0x0a
 #define DEVICE_NAME "kds_s2000w_net"
+#define ATTEMPT 30
 
 uint32_t _kds_s2000w_handler_find_first_data_byte(imagedata* image)
 {
@@ -90,7 +91,7 @@ void kds_s2000w_handler_free(handler* h)
        if (h == NULL)
                return;
 
-       // sanei use strdup it must be free static variable
+       /* sanei use strdup it must be free static variable */
        char* config_dir = sanei_config_get_paths();
        free(config_dir);
        config_dir = NULL;
@@ -141,10 +142,10 @@ void kds_s2000w_handler_open(const char* devicename, void** handle)
        _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
+       /* status code 408 request timeout waking up repeat open session */
        response* resp = NULL;
        uint8_t result = 0;
-       for (uint32_t i = 0; i < 30; i++) {
+       for (uint32_t i = 0; i < ATTEMPT; i++) {
                kds_s2000w_client_response_free(resp);
                resp = NULL;
                resp = kds_s2000w_client_response_init();
@@ -228,7 +229,7 @@ void kds_s2000w_handler_recreate_session(handler* h)
        sessionJson = NULL;
        kds_s2000w_debug_printf_long(INFO, "SessionId", h->sessionid);
 
-       // set old config parameters
+       /* set old config parameters */
        kds_s2000w_client_response_free(resp);
        resp = NULL;
        const char* json_string = json_object_to_json_string_ext(h->current_scanner_config, JSON_C_TO_STRING_PLAIN);