Skip to content

Commit

Permalink
Merge pull request #355 from tbeu/update-paho.mqtt.c-1.3.10
Browse files Browse the repository at this point in the history
Update paho.mqtt.c to 1.3.10
  • Loading branch information
bernhard-thiele authored Apr 5, 2022
2 parents 7372731 + d89d003 commit b2fa5d7
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 18 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified Modelica_DeviceDrivers/Resources/Library/win32/ITI_MDDMQTT.dll
Binary file not shown.
Binary file modified Modelica_DeviceDrivers/Resources/Library/win32/paho-mqtt3cs.dll
Binary file not shown.
Binary file modified Modelica_DeviceDrivers/Resources/Library/win32/paho-mqtt3cs.lib
Binary file not shown.
Binary file modified Modelica_DeviceDrivers/Resources/Library/win64/ITI_MDDMQTT.dll
Binary file not shown.
Binary file not shown.
Binary file modified Modelica_DeviceDrivers/Resources/Library/win64/paho-mqtt3cs.lib
Binary file not shown.
28 changes: 18 additions & 10 deletions Modelica_DeviceDrivers/Resources/thirdParty/paho.mqtt.c/MQTTAsync.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2021 IBM Corp., Ian Craggs and others
* Copyright (c) 2009, 2022 IBM Corp., Ian Craggs and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down Expand Up @@ -29,7 +29,7 @@
* @cond MQTTAsync_main
* @mainpage Asynchronous MQTT client library for C
*
* © Copyright 2009, 2021 IBM Corp., Ian Craggs and others
* © Copyright 2009, 2022 IBM Corp., Ian Craggs and others
*
* @brief An Asynchronous MQTT client library for C.
*
Expand Down Expand Up @@ -193,6 +193,11 @@
* for the previous connect or disconnect command to be complete.
*/
#define MQTTASYNC_COMMAND_IGNORED -18
/*
* Return code: maxBufferedMessages in the connect options must be >= 0
*/
#define MQTTASYNC_MAX_BUFFERED -19

/**
* Default MQTT version to connect with. Use 3.1.1 then fall back to 3.1
*/
Expand Down Expand Up @@ -421,7 +426,7 @@ typedef void MQTTAsync_connected(void* context, char* cause);

/**
* This is a callback function, which will be called when the client
* library receives a disconnect packet.
* library receives a disconnect packet from the server. This applies to MQTT V5 and above only.
*
* <b>Note:</b> Neither MQTTAsync_create() nor MQTTAsync_destroy() should be
* called within this callback.
Expand Down Expand Up @@ -479,7 +484,7 @@ typedef struct
#define MQTTAsync_connectData_initializer {{'M', 'Q', 'C', 'D'}, 0, NULL, {0, NULL}}

/**
* This is a callback function which will allow the client application to update the
* This is a callback function which will allow the client application to update the
* connection data.
* @param data The connection data which can be modified by the application.
* @return Return a non-zero value to update the connect data, zero to keep the same data.
Expand Down Expand Up @@ -950,7 +955,9 @@ typedef struct
int struct_version;
/** Whether to allow messages to be sent when the client library is not connected. */
int sendWhileDisconnected;
/** The maximum number of messages allowed to be buffered while not connected. */
/** The maximum number of messages allowed to be buffered. This is intended to be used to
* limit the number of messages queued while the client is not connected. It also applies
* when the client is connected, however, so has to be greater than 0. */
int maxBufferedMessages;
/** Whether the MQTT version is 3.1, 3.1.1, or 5. To use V5, this must be set.
* MQTT V5 has to be chosen here, because during the create call the message persistence
Expand Down Expand Up @@ -1345,11 +1352,11 @@ typedef struct
*/
const MQTTAsync_nameValue* httpHeaders;
/**
* HTTP proxy for websockets
* HTTP proxy
*/
const char* httpProxy;
/**
* HTTPS proxy for websockets
* HTTPS proxy
*/
const char* httpsProxy;
} MQTTAsync_connectOptions;
Expand Down Expand Up @@ -1696,7 +1703,8 @@ LIBMQTT_API void MQTTAsync_setTraceLevel(enum MQTTASYNC_TRACE_LEVELS level);

/**
* This is a callback function prototype which must be implemented if you want
* to receive trace information.
* to receive trace information. Do not invoke any other Paho API calls in this
* callback function - unpredictable behavior may result.
* @param level the trace level of the message returned
* @param message the trace message. This is a pointer to a static buffer which
* will be overwritten on each call. You must copy the data if you want to keep
Expand Down Expand Up @@ -1888,7 +1896,7 @@ LIBMQTT_API const char* MQTTAsync_strerror(int code);
#include <OsWrapper.h>
#endif
#define ADDRESS "tcp://mqtt.eclipse.org:1883"
#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883"
#define CLIENTID "ExampleClientPub"
#define TOPIC "MQTT Examples"
#define PAYLOAD "Hello World!"
Expand Down Expand Up @@ -2059,7 +2067,7 @@ int main(int argc, char* argv[])
#include <OsWrapper.h>
#endif
#define ADDRESS "tcp://mqtt.eclipse.org:1883"
#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883"
#define CLIENTID "ExampleClientSub"
#define TOPIC "MQTT Examples"
#define PAYLOAD "Hello World!"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2021 IBM Corp., Ian Craggs and others
* Copyright (c) 2009, 2022 IBM Corp., Ian Craggs and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down Expand Up @@ -41,7 +41,7 @@
* @endcond
* @cond MQTTClient_main
* @mainpage MQTT Client library for C
* &copy; Copyright 2009, 2021 IBM Corp., Ian Craggs and others
* &copy; Copyright 2009, 2022 IBM Corp., Ian Craggs and others
*
* @brief An MQTT client library in C.
*
Expand Down Expand Up @@ -951,11 +951,11 @@ typedef struct
*/
const MQTTClient_nameValue* httpHeaders;
/**
* HTTP proxy for websockets
* HTTP proxy
*/
const char* httpProxy;
/**
* HTTPS proxy for websockets
* HTTPS proxy
*/
const char* httpsProxy;
} MQTTClient_connectOptions;
Expand Down Expand Up @@ -1407,7 +1407,8 @@ LIBMQTT_API void MQTTClient_setTraceLevel(enum MQTTCLIENT_TRACE_LEVELS level);

/**
* This is a callback function prototype which must be implemented if you want
* to receive trace information.
* to receive trace information. Do not invoke any other Paho API calls in this
* callback function - unpredictable behavior may result.
* @param level the trace level of the message returned
* @param message the trace message. This is a pointer to a static buffer which
* will be overwritten on each call. You must copy the data if you want to keep
Expand Down Expand Up @@ -1581,7 +1582,7 @@ LIBMQTT_API const char* MQTTClient_strerror(int code);
#include <string.h>
#include "MQTTClient.h"
#define ADDRESS "tcp://mqtt.eclipse.org:1883"
#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883"
#define CLIENTID "ExampleClientPub"
#define TOPIC "MQTT Examples"
#define PAYLOAD "Hello World!"
Expand Down Expand Up @@ -1648,7 +1649,7 @@ int main(int argc, char* argv[])
#include <windows.h>
#endif
#define ADDRESS "tcp://mqtt.eclipse.org:1883"
#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883"
#define CLIENTID "ExampleClientPub"
#define TOPIC "MQTT Examples"
#define PAYLOAD "Hello World!"
Expand Down Expand Up @@ -1757,7 +1758,7 @@ int main(int argc, char* argv[])
#include <string.h>
#include "MQTTClient.h"
#define ADDRESS "tcp://mqtt.eclipse.org:1883"
#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883"
#define CLIENTID "ExampleClientSub"
#define TOPIC "MQTT Examples"
#define PAYLOAD "Hello World!"
Expand Down

0 comments on commit b2fa5d7

Please sign in to comment.