From b6a1268714671904e96a49b88680dc3ff07aaa1c Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Wed, 6 Oct 2010 16:43:14 +0400 Subject: project cleanup and prepare to release --- accel-pptpd/triton/CMakeLists.txt | 9 +++++++-- accel-pptpd/triton/loader.c | 2 +- accel-pptpd/triton/log.c | 2 ++ accel-pptpd/triton/mempool.c | 1 - 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'accel-pptpd/triton') diff --git a/accel-pptpd/triton/CMakeLists.txt b/accel-pptpd/triton/CMakeLists.txt index 95ab416..3e5e068 100644 --- a/accel-pptpd/triton/CMakeLists.txt +++ b/accel-pptpd/triton/CMakeLists.txt @@ -1,4 +1,3 @@ -SET(target triton) SET(sources_c md.c timer.c @@ -9,7 +8,13 @@ SET(sources_c mempool.c event.c ) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -ADD_LIBRARY(${target} SHARED ${sources_c}) +ADD_DEFINITIONS(-DMODULE_PATH="${CMAKE_INSTALL_PREFIX}/usr/lib/accel-pptp") + +ADD_LIBRARY(triton SHARED ${sources_c}) +INSTALL(TARGETS triton + LIBRARY DESTINATION usr/lib/accel-pptp +) diff --git a/accel-pptpd/triton/loader.c b/accel-pptpd/triton/loader.c index 0fef03d..b6c1914 100644 --- a/accel-pptpd/triton/loader.c +++ b/accel-pptpd/triton/loader.c @@ -15,7 +15,7 @@ int load_modules(const char *name) struct conf_sect_t *sect; struct conf_option_t *opt; char *fname; - char *path="."; + char *path = MODULE_PATH; sect = conf_get_section(name); if (!sect) { diff --git a/accel-pptpd/triton/log.c b/accel-pptpd/triton/log.c index 7bb5559..c7e6b7f 100644 --- a/accel-pptpd/triton/log.c +++ b/accel-pptpd/triton/log.c @@ -46,6 +46,8 @@ static void do_log(FILE *f, const char *fmt, va_list ap) fprintf(f, "[%s.%i]", date, (int)tv.tv_usec / 1000); vfprintf(f, fmt,ap); pthread_mutex_unlock(&lock); + + fflush(f); } void triton_log_error(const char *fmt,...) { diff --git a/accel-pptpd/triton/mempool.c b/accel-pptpd/triton/mempool.c index 16d6ab3..c96c3ba 100644 --- a/accel-pptpd/triton/mempool.c +++ b/accel-pptpd/triton/mempool.c @@ -177,4 +177,3 @@ static void __init init(void) { signal(35, sigclean); } - -- cgit v1.2.3