Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: c-core
schema: 1
version: "7.1.1"
version: "7.1.2"
scm: github.com/pubnub/c-core
changelog:
- date: 2026-03-18
version: v7.1.2
changes:
- type: bug
text: "Fix ABI mismatch where posix/windows sources picked the local `pubnub_internal.h` (wrong struct pubnub_pal size) on OpenSSL builds, so timeout fields were read as 0 and triggered an assertion. Use #include <pubnub_internal.h> so the include path selects the correct header per build."
- type: bug
text: "Add missing `pubnub_uagent()` function implementation for OpenSSL platform as declared in `pubnub_version.h`. Update `pubnub_uname()` format to match Windows and POSIX implementations and add `PUBNUB_SDK_VERSION_SUFFIX` support."
- date: 2026-03-12
version: v7.1.1
changes:
Expand Down Expand Up @@ -1162,7 +1169,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1221,7 +1228,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1280,7 +1287,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1335,7 +1342,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1389,7 +1396,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1438,7 +1445,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down Expand Up @@ -1484,7 +1491,7 @@ sdks:
- distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v7.1.1
location: https://github.com/pubnub/c-core/releases/tag/v7.1.2
requires:
- name: "miniz"
min-version: "2.0.8"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v7.1.2
March 18 2026

#### Fixed
- Fix ABI mismatch where posix/windows sources picked the local `pubnub_internal.h` (wrong struct pubnub_pal size) on OpenSSL builds, so timeout fields were read as 0 and triggered an assertion. Use #include <pubnub_internal.h> so the include path selects the correct header per build.
- Add missing `pubnub_uagent()` function implementation for OpenSSL platform as declared in `pubnub_version.h`. Update `pubnub_uname()` format to match Windows and POSIX implementations and add `PUBNUB_SDK_VERSION_SUFFIX` support.

## v7.1.1
March 12 2026

Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ if (UNIX)
${CMAKE_CURRENT_LIST_DIR}/posix/msstopwatch_monotonic_clock.c
${CMAKE_CURRENT_LIST_DIR}/posix/pbtimespec_elapsed_ms.c
${CMAKE_CURRENT_LIST_DIR}/posix/pb_sleep_ms.c)
if (NOT ${WITH_CPP})
if (NOT ${WITH_CPP} AND NOT ${OPENSSL})
set(OS_SOURCEFILES ${OS_SOURCEFILES} ${CMAKE_CURRENT_LIST_DIR}/posix/pubnub_version_posix.c)
endif ()

Expand All @@ -284,7 +284,7 @@ elseif (WIN32 OR WIN64 OR MSVC)
${CMAKE_CURRENT_LIST_DIR}/windows/pb_sleep_ms.c
${CMAKE_CURRENT_LIST_DIR}/windows/pbauto_heartbeat_init_windows.c)

if (NOT ${WITH_CPP})
if (NOT ${WITH_CPP} AND NOT ${OPENSSL})
set(OS_SOURCEFILES ${OS_SOURCEFILES} ${CMAKE_CURRENT_LIST_DIR}/windows/pubnub_version_windows.c)
endif ()
else ()
Expand Down Expand Up @@ -591,6 +591,12 @@ if (${OPENSSL})
${CMAKE_CURRENT_LIST_DIR}/openssl/pbpal_openssl_blocking_io.c
${FEATURE_SOURCEFILES})

if (NOT ${WITH_CPP})
set(FEATURE_SOURCEFILES
${CMAKE_CURRENT_LIST_DIR}/openssl/pubnub_version_openssl.c
${FEATURE_SOURCEFILES})
endif ()

if (UNIX)
set(FEATURE_SOURCEFILES
${CMAKE_CURRENT_LIST_DIR}/posix/pbauto_heartbeat_init_posix.c
Expand Down
2 changes: 1 addition & 1 deletion core/pubnub_version_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define INC_PUBNUB_VERSION_INTERNAL


#define PUBNUB_SDK_VERSION "7.1.1"
#define PUBNUB_SDK_VERSION "7.1.2"


#endif /* !defined INC_PUBNUB_VERSION_INTERNAL */
12 changes: 11 additions & 1 deletion openssl/pubnub_version_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#define PUBNUB_SDK_NAME "OpenSSL"

#ifndef PUBNUB_SDK_VERSION_SUFFIX
#define PUBNUB_SDK_VERSION_SUFFIX
#endif


char const *pubnub_sdk_name(void)
{
Expand All @@ -21,6 +25,12 @@ char const *pubnub_version(void)

char const *pubnub_uname(void)
{
return PUBNUB_SDK_NAME "/" PUBNUB_SDK_VERSION;
return PUBNUB_SDK_NAME "-PubNub-C-core/" PUBNUB_SDK_VERSION PUBNUB_SDK_VERSION_SUFFIX;
}


char const *pubnub_uagent(void)
{
return PUBNUB_SDK_NAME "-PubNub-C-core/" PUBNUB_SDK_VERSION PUBNUB_SDK_VERSION_SUFFIX;
}

2 changes: 1 addition & 1 deletion posix/pbauto_heartbeat_init_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#if PUBNUB_USE_AUTO_HEARTBEAT

#include "pubnub_internal.h"
#include <pubnub_internal.h>

#include <pthread.h>

Expand Down
2 changes: 1 addition & 1 deletion posix/pbpal_posix_blocking_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "lib/sockets/pbpal_socket_blocking_io.h"
#include "core/pubnub_assert.h"

#include "pubnub_internal.h"
#include <pubnub_internal.h>


int pbpal_set_blocking_io(pubnub_t* pb)
Expand Down
2 changes: 1 addition & 1 deletion posix/posix_socket_blocking_io.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "pubnub_get_native_socket.h"
#include "pubnub_internal.h"
#include <pubnub_internal.h>

#include <fcntl.h>

Expand Down
2 changes: 1 addition & 1 deletion posix/pubnub_dns_system_servers.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "pubnub_internal.h"
#include <pubnub_internal.h>
#include "core/pubnub_assert.h"
#include "core/pubnub_dns_servers.h"
#include "core/pubnub_logger_internal.h"
Expand Down
2 changes: 1 addition & 1 deletion posix/pubnub_get_native_socket.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */
#include "pubnub_internal.h"

#include <pubnub_internal.h>
#include "pubnub_get_native_socket.h"


Expand Down
2 changes: 1 addition & 1 deletion posix/pubnub_get_native_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#if !defined INC_PUBNUB_GET_NATIVE_SOCKET
#define INC_PUBNUB_GET_NATIVE_SOCKET

#include "pubnub_internal.h"
#include "core/pubnub_api_types.h"

typedef int pbpal_native_socket_t;

Expand Down
2 changes: 1 addition & 1 deletion posix/pubnub_ntf_callback_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "posix/monotonic_clock_get_time.h"
#include "posix/pbtimespec_elapsed_ms.h"

#include "pubnub_internal.h"
#include <pubnub_internal.h>
#include "core/pubnub_assert.h"
#include "core/pubnub_timer_list.h"
#include "core/pbpal.h"
Expand Down
2 changes: 1 addition & 1 deletion windows/pbauto_heartbeat_init_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#if PUBNUB_USE_AUTO_HEARTBEAT

#include "pubnub_internal.h"
#include <pubnub_internal.h>

#include <process.h>

Expand Down
6 changes: 1 addition & 5 deletions windows/pbpal_windows_blocking_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

#include "core/pubnub_assert.h"

#if PUBNUB_USE_SSL
#include "openssl/pubnub_internal.h"
#else
#include "pubnub_internal.h"
#endif
#include <pubnub_internal.h>

#include <windows.h>

Expand Down
6 changes: 1 addition & 5 deletions windows/pubnub_dns_system_servers.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
* Minimum Windows version: Windows 8 (NT 6.2)
*/

#if PUBNUB_USE_SSL
#include "openssl/pubnub_internal.h"
#else
#include "pubnub_internal.h"
#endif
#include <pubnub_internal.h>
#include "core/pubnub_dns_servers.h"
#include "core/pubnub_assert.h"
#if PUBNUB_USE_LOGGER
Expand Down
7 changes: 1 addition & 6 deletions windows/pubnub_get_native_socket.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */
#if PUBNUB_USE_SSL
#include "openssl/pubnub_internal.h"
#else
#include "pubnub_internal.h"
#endif

#include <pubnub_internal.h>
#include "pubnub_get_native_socket.h"

pbpal_native_socket_t pubnub_get_native_socket(pubnub_t* pb)
Expand Down
3 changes: 2 additions & 1 deletion windows/pubnub_get_native_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#if !defined INC_PUBNUB_GET_NATIVE_SOCKET
#define INC_PUBNUB_GET_NATIVE_SOCKET

#include "pubnub_internal.h"
#include "core/pubnub_api_types.h"

#include <winsock2.h>

typedef SOCKET pbpal_native_socket_t;

Expand Down
6 changes: 1 addition & 5 deletions windows/pubnub_ntf_callback_windows.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */
#if PUBNUB_USE_SSL
#include "openssl/pubnub_internal.h"
#else
#include "pubnub_internal.h"
#endif
#include <pubnub_internal.h>

#include "core/pubnub_ntf_callback.h"
#include "pbtimespec_elapsed_ms.h"
Expand Down
10 changes: 2 additions & 8 deletions windows/pubnub_set_proxy_from_system_windows.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */

/* When building with OpenSSL, we need the OpenSSL version of pubnub_internal.h
because it has a different struct pubnub_pal definition. The build system
should define PUBNUB_USE_SSL=1 for OpenSSL builds. */
#if PUBNUB_USE_SSL
#include "openssl/pubnub_internal.h"
#else
#include "pubnub_internal.h"
#endif
/* Use angle brackets so the include path (openssl/ or windows/) picks the correct pubnub_internal.h */
#include <pubnub_internal.h>
#include "core/pubnub_proxy.h"
#if PUBNUB_USE_LOGGER
#include "core/pubnub_logger.h"
Expand Down
Loading