Hey Roger,
I'll upload a fix when I get a minute, but it seems that the C API
changed (for the better) and broke the C++ wrapper.
The clientID and serverURI parameters of
iclient_persistence::persistence_open() should now be "const char*"
instead of "char*"
Frank
------------
diff --git a/src/iclient_persistence.cpp
b/src/iclient_persistence.cpp
index 755c561..32f617e 100644
--- a/src/iclient_persistence.cpp
+++ b/src/iclient_persistence.cpp
@@ -70,8 +70,8 @@ public:
// C++ persistence object, which is reassigned to the 'handle'.
Subsequent
// calls have the object address as the handle.
-int iclient_persistence::persistence_open(void** handle, char*
clientID,
-
char* serverURI, void* context)
+int iclient_persistence::persistence_open(void** handle, const
char* clientID,
+
const char* serverURI, void* context)
{
try {
if (context) {
diff --git a/src/mqtt/iclient_persistence.h
b/src/mqtt/iclient_persistence.h
index 1fad4df..f44dd9a 100644
--- a/src/mqtt/iclient_persistence.h
+++ b/src/mqtt/iclient_persistence.h
@@ -61,7 +61,7 @@ class iclient_persistence
public:
/** C-callbacks */
- static int persistence_open(void** handle, char* clientID,
char* serverURI, void* context);
+ static int persistence_open(void** handle, const char*
clientID, const char* serverURI, void* context);
static int persistence_close(void* handle);
static int persistence_put(void* handle, char* key, int
bufcount, char* buffers[], int buflens[]);
static int persistence_get(void* handle, char* key, char**
buffer, int* buflen);
On 05/18/2015 05:46 PM, Roger Light
wrote:
Hi Frank,
Linux and g++ 4.6, 4.9 and 5.0.
Cheers,
Roger
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
|