]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change loading config in client
authorBastian Dehn <hhaalo@arcor.de>
Thu, 2 Jan 2025 17:38:15 +0000 (18:38 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 2 Jan 2025 17:38:15 +0000 (18:38 +0100)
src/kds_s2000w_client.c

index e045c5c835a1f7eb7f64bbfa65c89b934dcf1d6a..4f2bddac686038532ab0a397c46f15759f15924a 100644 (file)
@@ -39,16 +39,6 @@ void _kds_s2000w_client_read_error_status(CURL* curl, response* resp)
        resp->error_size = size;
 }
 
-void _kds_s2000w_client_load_config()
-{
-       const char* config_stream = read_config_file(CONFIG_FILE);
-
-       if (config_stream == NULL)
-               return;
-
-       config = load_config(config_stream);
-}
-
 void _kds_s2000w_client_stream_to_response(FILE* stream, response* resp, size_t* size)
 {
        debug_printf(ALL, "kds_s2000w_client_stream_to_response");
@@ -110,7 +100,8 @@ void kds_s2000w_client_init()
 {
        debug_printf(ALL, "kds_s2000w_client_init");
 
-       _kds_s2000w_client_load_config();
+       const char* config_stream = read_config_file(CONFIG_FILE);
+       config = load_config(config_stream);
        curl = curl_easy_init();
 }