Skip to content

Commit

Permalink
CGrenn test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
KGronek-Pubnub committed Jan 13, 2025
1 parent 694d5b0 commit 77bb092
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/pubnub_log.c
Original file line number Diff line number Diff line change
@@ -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 <stddef.h>
#include <stdarg.h>
#include <stdlib.h>

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;
}
Expand Down
2 changes: 1 addition & 1 deletion core/test/pubnub_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77bb092

Please sign in to comment.