void _kds_s2000w_client_load_config()
{
- const char* config_file = CONFIG_FILE;
- char* config_stream = read_config_file(config_file);
+ char* config_stream = read_config_file(CONFIG_FILE);
if (config_stream == NULL)
return;
load_config(&p_config, config_stream);
+
+ free(config_stream);
+ config_stream = NULL;
}
void _kds_s2000w_client_stream_to_response(FILE* stream, response* resp, size_t* size)
void __wrap_load_config(program_config* config, const char* config_stream)
{
- config->scanner_url = malloc(sizeof(char) * 28);
- config->username = malloc(sizeof(char) * 4);
-
- config->scanner_url = "https://scanner.example.com\0";
- config->username = "Max\0";
+ return;
}
void __wrap_wait_a_second()
assert_int_equal(result, SANE_STATUS_UNSUPPORTED);
}
-
void sane_kds_s2000w_net_start_cancel()
{
handler* h = init_handler();