#include <stdlib.h>
#include <curl/curl.h>
#include "config.h"
+#include "kds_s2000w_config.h"
+#include "kds_s2000w_heartbeat.h"
#include "kds_s2000w_client.h"
#include "kds_s2000w_debug.h"
-#include "kds_s2000w_config.h"
-
-program_config p_config;
void _kds_s2000w_client_read_error_status(CURL* curl, response* resp)
{
int kds_s2000w_client_status_session(int64_t sessionid, response* response)
{
debug_printf(ALL, "kds_s2000w_client_status_session");
+ join_thread();
+ wait_a_second();
CURL* curl = NULL;
CURLU* url_handler = NULL;
struct curl_slist* headers = NULL;
#include <confuse.h>
#include "kds_s2000w_config.h"
+program_config p_config;
+
char* read_config_file(const char* filename)
{
FILE* config_file = NULL;
unsigned int heartbeat;
} program_config;
+extern program_config p_config;
+
char* read_config_file(const char* filename);
void load_config(program_config* config, const char* config_stream);
#endif
\ No newline at end of file
#include "kds_s2000w_client.h"
#include "kds_s2000w_image_converter.h"
#include "kds_s2000w_debug.h"
-#include "kds_s2000w_heartbeat.h"
void _get_current_metadata(handler* h)
{
if (h->current_scan_status->available_images > 1)
return;
- join_thread();
- wait_a_second();
resp = kds_s2000w_client_response_init();
kds_s2000w_client_status_session(h->sessionid, resp);
if (resp->error_size > 0)
void free_handler(handler* h)
{
debug_printf(ALL, "free handler");
- join_thread();
json_object_put(h->current_scanner_config);
h->current_scanner_config = NULL;
free(h->current_scan_status);
#include "kds_s2000w_config.h"
#include "kds_s2000w_heartbeat.h"
-extern program_config p_config;
pthread_t pwait;
void* _wait_thread(void *args)