Skip to content

Commit 344ca96

Browse files
[SDK 658] Pointer defaults values set to null (#41)
* pointers defult values set to nullptr * change log entery * Update CHANGELOG.md * Update countly.cpp Co-authored-by: ArtursKadikis <[email protected]>
1 parent 981c7ae commit 344ca96

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* ! Minor breaking change ! Default automatic session update duration changed to 60 seconds.
44
* Added a call to change the automatic session update duration.
55
* Fixed a bug where session duration was reported wrong.
6+
* Fixed an issue with the custom HTTP client function pointer by setting it's default value.
67
* Fixed a bug that caused GET requests to fail on Linux.
78
* Fixed bug when changing device id with server merge.
89
* Fixed bug when device id was changed without server merge. Previously the new session was started with the old device ID and not the new one.

src/countly.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ using json = nlohmann::json;
2929
#endif
3030

3131
Countly::Countly() : max_events(COUNTLY_MAX_EVENTS_DEFAULT), wait_milliseconds(COUNTLY_KEEPALIVE_INTERVAL) {
32+
//Setting the default values
33+
port = 0;
34+
running = false;
35+
use_https = false;
36+
stop_thread = false;
37+
began_session = false;
38+
always_use_post = false;
39+
remote_config_enabled = false;
40+
41+
//Petting to null values
42+
thread = nullptr;
43+
logger_function = nullptr;
44+
http_client_function = nullptr;
45+
3246
#if !defined(_WIN32) && !defined(COUNTLY_USE_CUSTOM_HTTP)
3347
curl_global_init(CURL_GLOBAL_ALL);
3448
#endif

0 commit comments

Comments
 (0)