Skip to content
Snippets Groups Projects
Commit 6366bcea authored by Dmitriy Gerasimov's avatar Dmitriy Gerasimov
Browse files

[*] Fixes build errors

[-] Removed libconfig usage
parent f4d20ce6
No related branches found
No related tags found
No related merge requests found
......@@ -5,13 +5,15 @@ set(DAP_CORE_SERVER_SRCS
dap_server.c
dap_client/dap_client.c
dap_client/dap_client_internal.c
dap_client/dap_client_remote.c)
dap_client/dap_client_remote.c
dap_client/sxmlc/sxmlc.c dap_client/sxmlc/sxmlsearch.c)
set(DAP_CORE_SERVER_HEADERS
dap_server.h
dap_client/dap_client.h
dap_client/dap_client_internal.h
dap_client/dap_client_remote.h)
dap_client/dap_client_remote.h
dap_client/sxmlc/sxmlc.h dap_client/sxmlc/sxmlsearch.h)
include_directories(dap_client)
......@@ -19,4 +21,4 @@ add_library(${PROJECT_NAME} STATIC ${DAP_CORE_SERVER_SRCS} ${DAP_CORE_SERVER_HEA
target_include_directories(dap_core_server INTERFACE . dap_client)
target_link_libraries(dap_core_server ev dap_core dap_crypto)
target_link_libraries(dap_core_server ev curl dap_core dap_crypto)
......@@ -57,7 +57,7 @@ typedef struct enc_http_delegate{
size_t response_size;
size_t response_size_max;
struct enc_key * key;
struct dap_enc_key * key;
struct dap_http_client *http;
} enc_http_delegate_t;
......
......@@ -22,9 +22,9 @@
#include <stdarg.h>
#include <stdbool.h>
#include <string.h>
#include "../../sources/config.h"
#include "dap_common.h"
#include "dap_config.h"
#include "dap_http.h"
#include "dap_http_client.h"
#include "dap_http_simple.h"
......@@ -62,6 +62,7 @@ static struct ev_loop* http_simple_loop;
static ev_async async_watcher_http_simple;
static pthread_mutex_t mutex_on_queue_http_response = PTHREAD_MUTEX_INITIALIZER;
uint64_t s_TTL_session_key=3600;
int dap_http_simple_module_init()
{
......@@ -132,7 +133,7 @@ void* dap_http_simple_proc(dap_http_simple_t * cl_sh)
dap_enc_key_t * key = dap_enc_ks_find_http(cl_sh->http);
if(key){
if( key->last_used_timestamp && ( (time(NULL) - key->last_used_timestamp )
> my_config.TTL_session_key ) ) {
> s_TTL_session_key ) ) {
enc_http_delegate_t * dg = enc_http_request_decode(cl_sh);
......
......@@ -52,8 +52,8 @@ typedef struct dap_http_simple{
#define DAP_HTTP_SIMPLE(a) ((dap_http_simple_t*) (a)->_inheritor )
extern void dap_http_simple_proc_add(dap_http_t *sh, const char * url_path, size_t reply_size_max, dap_http_simple_callback_t cb); // Add simple processor
extern int dap_http_simple_module_init();
extern size_t dap_http_simple_reply(dap_http_simple_t * shs, void * data, size_t data_size);
extern size_t dap_http_simple_reply_f(dap_http_simple_t * shs, const char * data, ...);
void dap_http_simple_proc_add(dap_http_t *sh, const char * url_path, size_t reply_size_max, dap_http_simple_callback_t cb); // Add simple processor
int dap_http_simple_module_init();
size_t dap_http_simple_reply(dap_http_simple_t * shs, void * data, size_t data_size);
size_t dap_http_simple_reply_f(dap_http_simple_t * shs, const char * data, ...);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment