Skip to content

Commit

Permalink
Merge pull request #31 from pubnub/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vveljko authored Oct 5, 2017
2 parents 01ffaaf + c40a87a commit 3b3fa28
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 13 deletions.
10 changes: 9 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
name: c-core
version: 2.2.8
version: 2.2.10
scm: github.com/pubnub/c-core
changelog:
- version: v2.2.10
changes:
- type: bug
text: Fix build issues on Mac
- version: v2.2.9
changes:
- type: bug
text: Fix high CPU utilization when network out on Mac
- version: v2.2.8
changes:
- type: bug
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.8
2.2.10
2 changes: 1 addition & 1 deletion freertos/pubnub_version_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "pubnub_version.h"

#define PUBNUB_SDK_NAME "FreeRTOS"
#define PUBNUB_SDK_VERSION "2.2.8"
#define PUBNUB_SDK_VERSION "2.2.10"


char const *pubnub_sdk_name(void)
Expand Down
2 changes: 1 addition & 1 deletion microchip_harmony/pubnub_version_harmony.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "pubnub_version.h"

#define PUBNUB_SDK_NAME "Microchip.Harmony"
#define PUBNUB_SDK_VERSION "2.2.8"
#define PUBNUB_SDK_VERSION "2.2.10"


char const *pubnub_sdk_name(void)
Expand Down
5 changes: 2 additions & 3 deletions openssl/pbpal_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ enum pubnub_res pbpal_read_status(pubnub_t *pb)

if (pb->len == 0) {
pb->sock_state = STATE_NONE;
return true;
return PNR_OK;
}

if (pb->left == 0) {
Expand All @@ -353,10 +353,9 @@ enum pubnub_res pbpal_read_status(pubnub_t *pb)
}
else {
pb->sock_state = STATE_NEWDATA_EXHAUSTED;
return false;
}

return true;
return PNR_IN_PROGRESS;
}


Expand Down
2 changes: 1 addition & 1 deletion openssl/pubnub_version_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "pubnub_version.h"

#define PUBNUB_SDK_NAME "OpenSSL"
#define PUBNUB_SDK_VERSION "2.2.8"
#define PUBNUB_SDK_VERSION "2.2.10"


char const *pubnub_sdk_name(void)
Expand Down
14 changes: 14 additions & 0 deletions posix/pubnub_ntf_callback_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,14 @@ void* socket_watcher_thread(void *arg)
timspec.tv_nsec = (timspec.tv_nsec + 200*MILLI_IN_NANO) % UNIT_IN_NANO;

pthread_mutex_lock(&m_watcher.mutw);

#if defined(__APPLE__)
struct timespec relative_timspec = { .tv_sec=0, .tv_nsec=200*MILLI_IN_NANO };

pthread_cond_timedwait_relative_np(&m_watcher.condw, &m_watcher.mutw, &relative_timspec);
#else
pthread_cond_timedwait(&m_watcher.condw, &m_watcher.mutw, &timspec);
#endif

if (m_watcher.apoll_size > 0) {
int rslt = poll(m_watcher.apoll, m_watcher.apoll_size, 100);
Expand Down Expand Up @@ -258,7 +265,14 @@ int pbntf_init(void)
return -1;
}

#if defined(__APPLE__)
rslt = pthread_cond_init(&m_watcher.condw, NULL);
#else
pthread_condattr_t cond_attr;
pthread_condattr_init(&cond_attr);
pthread_condattr_setclock(&cond_attr, CLOCK_MONOTONIC);
rslt = pthread_cond_init(&m_watcher.condw, &cond_attr);
#endif
if (rslt != 0) {
PUBNUB_LOG_ERROR("Failed to initialize conditional variable, error code: %d", rslt);
pthread_mutexattr_destroy(&attr);
Expand Down
2 changes: 1 addition & 1 deletion posix/pubnub_version_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "pubnub_version.h"

#define PUBNUB_SDK_NAME "POSIX"
#define PUBNUB_SDK_VERSION "2.2.8"
#define PUBNUB_SDK_VERSION "2.2.10"


char const *pubnub_sdk_name(void)
Expand Down
9 changes: 6 additions & 3 deletions qt/pubnub_qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,12 @@ void pubnub_qt::sslErrors(QNetworkReply* reply,const QList<QSslError> &errors)
}


extern "C" char const *pubnub_sdk_name() { return "Qt5"; }
#define PUBNUB_SDK_NAME "Qt5"
#define PUBNUB_SDK_VERSION "2.2.10"

extern "C" char const *pubnub_uname() { return "Qt5%2F2.2.8"; }
extern "C" char const *pubnub_sdk_name() { return PUBNUB_SDK_NAME; }

extern "C" char const *pubnub_version() { return "2.2.8"; }
extern "C" char const *pubnub_uname() { return PUBNUB_SDK_NAME "%2F" PUBNUB_SDK_VERSION; }

extern "C" char const *pubnub_version() { return PUBNUB_SDK_VERSION; }

2 changes: 1 addition & 1 deletion windows/pubnub_version_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "pubnub_version.h"

#define PUBNUB_SDK_NAME "Windows"
#define PUBNUB_SDK_VERSION "2.2.8"
#define PUBNUB_SDK_VERSION "2.2.10"


char const *pubnub_sdk_name(void)
Expand Down

0 comments on commit 3b3fa28

Please sign in to comment.