From fb731cfe48754739440e0a6d8f549d20c620f34a Mon Sep 17 00:00:00 2001 From: CPunch Date: Thu, 17 Feb 2022 17:38:34 -0600 Subject: [PATCH] Moved vendor sources to lib/vendor --- cnc/src/main.c | 1 + lib/CMakeLists.txt | 2 +- lib/src/ltask.c | 2 +- lib/{src => vendor}/hashmap.c | 0 lib/{src => vendor}/ini.c | 0 5 files changed, 3 insertions(+), 2 deletions(-) rename lib/{src => vendor}/hashmap.c (100%) rename lib/{src => vendor}/ini.c (100%) diff --git a/cnc/src/main.c b/cnc/src/main.c index b991b29..777e4c4 100644 --- a/cnc/src/main.c +++ b/cnc/src/main.c @@ -30,6 +30,7 @@ int main(int argv, char **argc) { laikaT_pollTasks(&tService); } + laikaT_cleanTaskService(&tService); laikaC_freeCNC(cnc); LAIKA_DEBUG("cnc killed\n"); return 0; diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 25826ba..b2fd483 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,7 +27,7 @@ set(sodium_USE_STATIC_LIBS) find_package(Sodium) # compile LaikaLib library -file(GLOB_RECURSE LIBSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c) +file(GLOB_RECURSE LIBSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c ${CMAKE_CURRENT_SOURCE_DIR}/vendor/**.c) add_library(LaikaLib STATIC ${LIBSOURCE}) target_link_libraries(LaikaLib PRIVATE ${sodium_LIBRARY_RELEASE}) diff --git a/lib/src/ltask.c b/lib/src/ltask.c index dd15940..188c3b0 100644 --- a/lib/src/ltask.c +++ b/lib/src/ltask.c @@ -6,7 +6,7 @@ long getTime() { struct timespec ts; timespec_get(&ts, TIME_UTC); - return ts.tv_sec*1000 + ts.tv_nsec/1000000; /* convert nanoseconds to milliseconds */ + return ts.tv_sec*1000 + ts.tv_nsec/1000000; /* convert time (seconds & nanoseconds) to milliseconds */ } void laikaT_initTaskService(struct sLaika_taskService *service) { diff --git a/lib/src/hashmap.c b/lib/vendor/hashmap.c similarity index 100% rename from lib/src/hashmap.c rename to lib/vendor/hashmap.c diff --git a/lib/src/ini.c b/lib/vendor/ini.c similarity index 100% rename from lib/src/ini.c rename to lib/vendor/ini.c