diff --git a/core/Makefile b/core/Makefile index 08f32a6c..7f240798 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,4 +1,4 @@ -PROJECT_SOURCEFILES = pbcc_set_state.c pubnub_pubsubapi.c pubnub_coreapi.c pubnub_ccore_pubsub.c pubnub_ccore.c pubnub_netcore.c pubnub_alloc_static.c pubnub_assert_std.c pubnub_json_parse.c pubnub_keep_alive.c pubnub_helper.c pubnub_url_encode.c ../lib/pb_strnlen_s.c ../lib/pb_strncasecmp.c ../lib/base64/pbbase64.c pubnub_coreapi_ex.c +PROJECT_SOURCEFILES = pbcc_set_state.c pubnub_pubsubapi.c pubnub_coreapi.c pubnub_ccore_pubsub.c pubnub_ccore.c pubnub_netcore.c pubnub_alloc_static.c pubnub_assert_std.c pubnub_json_parse.c pubnub_keep_alive.c pubnub_helper.c pubnub_url_encode.c ../lib/pb_strnlen_s.c ../lib/pb_strncasecmp.c ../lib/base64/pbbase64.c pubnub_coreapi_ex.c pubnub_log.c # TODO: move coreapi_ex to new module all: pubnub_crypto_unittest pubnub_subscribe_v2_unittest pbcc_crypto_unittest pubnub_grant_token_api_unittest pubnub_proxy_unittest pubnub_timer_list_unittest unittest @@ -57,7 +57,7 @@ unittest: $(PROJECT_SOURCEFILES) pubnub_core_unit_test.c #$(GCOVR) -r . --html --html-details -o coverage.html -TIMER_LIST_SOURCEFILES = pubnub_alloc_static.c pubnub_assert_std.c pubnub_timers.c +TIMER_LIST_SOURCEFILES = pubnub_alloc_static.c pubnub_assert_std.c pubnub_timers.c pubnub_log.c pubnub_timer_list_unittest: pubnub_timer_list.c pubnub_timer_list_unit_test.c gcc -o pubnub_timer_list_unit_test.so -shared $(CFLAGS) $(LDFLAGS) -D PUBNUB_CALLBACK_API -D PUBNUB_ASSERT_LEVEL_NONE -Wall $(COVERAGE_FLAGS) -fPIC $(TIMER_LIST_SOURCEFILES) pubnub_timer_list.c pubnub_timer_list_unit_test.c -lcgreen -lm diff --git a/core/pubnub_log.c b/core/pubnub_log.c index 22fcdd72..fbd0d257 100644 --- a/core/pubnub_log.c +++ b/core/pubnub_log.c @@ -1,14 +1,14 @@ /* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ #include "pubnub_log.h" -void (*pubnub_log_callback)(enum pubnub_log_level log_level, const char* message) = NULL; - #if PUBNUB_USE_LOG_CALLBACK #include #include #include +void (*pubnub_log_callback)(enum pubnub_log_level log_level, const char* message) = NULL; + void pubnub_set_log_callback(void (*callback)(enum pubnub_log_level log_level, const char* message)) { pubnub_log_callback = callback; } diff --git a/core/test/pubnub_config.h b/core/test/pubnub_config.h index eeba5783..421adf92 100644 --- a/core/test/pubnub_config.h +++ b/core/test/pubnub_config.h @@ -119,7 +119,7 @@ #endif #if !defined(PUBNUB_USE_LOG_CALLBACK) -#define PUBNUB_USE_LOG_CALLBACK 1 +#define PUBNUB_USE_LOG_CALLBACK 0 #endif #define PUBNUB_DEFAULT_TRANSACTION_TIMER 310000