Skip to content

Commit

Permalink
Merge pull request #377 from embhorn/v1.17.1_prep
Browse files Browse the repository at this point in the history
wolfMQTT Release v1.17.1 preparation
  • Loading branch information
dgarske authored Nov 29, 2023
2 parents 85ddcd1 + eb616e7 commit 4326b16
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

cmake_minimum_required(VERSION 3.16)

project(wolfMQTT VERSION 1.17.0 LANGUAGES C)
project(wolfMQTT VERSION 1.17.1 LANGUAGES C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(MQTT_SOURCES
Expand Down
11 changes: 11 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
## Release Notes
### v1.17.1 (11/29/2023)
Release 1.17.1 has been developed according to wolfSSL's development and QA process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance

* Include stdint.h in userio_template.h by @lealem47 in #371
* Improvements to multithread locking and tests. by @dgarske in #369
* Cleanup executable status on src files. by @philljj in #372
* Close socket on error in NetConnect by @embhorn in #375
* Fixes for non-blocking with larger payload and improvements to the test and examples by @dgarske in #373
* Add MQTT-SN CI tests by @embhorn in #376
* Fix Wild read in MqttProps_Free by @embhorn in #377

### v1.17.0 (11/2/2023)
Release 1.17.0 has been developed according to wolfSSL's development and QA process (see link below) and successfully passed the quality criteria.
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# All right reserved.

AC_COPYRIGHT([Copyright (C) 2014-2023 wolfSSL Inc.])
AC_INIT([wolfmqtt],[1.17.0],[https://github.com/wolfssl/wolfMQTT/issues],[wolfmqtt],[http://www.wolfssl.com])
AC_INIT([wolfmqtt],[1.17.1],[https://github.com/wolfssl/wolfMQTT/issues],[wolfmqtt],[http://www.wolfssl.com])

AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux])
Expand All @@ -24,7 +24,7 @@ AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])

WOLFMQTT_LIBRARY_VERSION=16:0:0
WOLFMQTT_LIBRARY_VERSION=16:1:0
# | | |
# +------+ | +---+
# | | |
Expand Down
12 changes: 8 additions & 4 deletions src/mqtt_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ int MqttEncode_Props(MqttPacketType packet, MqttProp* props, byte* buf)
{
int rc = 0, tmp;
MqttProp* cur_prop = props;
int num_props = 0;

/* TODO: Check against max size. Sometimes all properties are not
expected to be added */
Expand Down Expand Up @@ -472,8 +471,6 @@ int MqttEncode_Props(MqttPacketType packet, MqttProp* props, byte* buf)
}
}

num_props++;

cur_prop = cur_prop->next;
}

Expand All @@ -491,7 +488,6 @@ int MqttDecode_Props(MqttPacketType packet, MqttProp** props, byte* pbuf,
MqttProp* cur_prop;
byte* buf = pbuf;

*props = NULL;
total = 0;

while (((int)prop_len > 0) && (rc >= 0))
Expand Down Expand Up @@ -827,6 +823,7 @@ int MqttDecode_ConnectAck(byte *rx_buf, int rx_buf_len,
connect_ack->return_code = *rx_payload++;

#ifdef WOLFMQTT_V5
connect_ack->props = 0;
if (connect_ack->protocol_level >= MQTT_CONNECT_PROTOCOL_LEVEL_5) {
word32 props_len = 0;
int tmp;
Expand Down Expand Up @@ -1007,6 +1004,7 @@ int MqttDecode_Publish(byte *rx_buf, int rx_buf_len, MqttPublish *publish)
}

#ifdef WOLFMQTT_V5
publish->props = 0;
if (publish->protocol_level >= MQTT_CONNECT_PROTOCOL_LEVEL_5) {
word32 props_len = 0;
int tmp;
Expand Down Expand Up @@ -1155,6 +1153,7 @@ int MqttDecode_PublishResp(byte* rx_buf, int rx_buf_len, byte type,
rx_payload += MqttDecode_Num(rx_payload, &publish_resp->packet_id);

#ifdef WOLFMQTT_V5
publish_resp->props = 0;
if (publish_resp->protocol_level >= MQTT_CONNECT_PROTOCOL_LEVEL_5) {
if (remain_len > MQTT_DATA_LEN_SIZE) {
/* Decode the Reason Code */
Expand Down Expand Up @@ -1306,6 +1305,7 @@ int MqttDecode_SubscribeAck(byte* rx_buf, int rx_buf_len,
rx_payload += MqttDecode_Num(rx_payload, &subscribe_ack->packet_id);

#ifdef WOLFMQTT_V5
subscribe_ack->props = 0;
if ((subscribe_ack->protocol_level >= MQTT_CONNECT_PROTOCOL_LEVEL_5) &&
(remain_len > MQTT_DATA_LEN_SIZE)) {
word32 props_len = 0;
Expand Down Expand Up @@ -1444,6 +1444,7 @@ int MqttDecode_UnsubscribeAck(byte *rx_buf, int rx_buf_len,
if (unsubscribe_ack) {
rx_payload += MqttDecode_Num(rx_payload, &unsubscribe_ack->packet_id);
#ifdef WOLFMQTT_V5
unsubscribe_ack->props = 0;
if (unsubscribe_ack->protocol_level >= MQTT_CONNECT_PROTOCOL_LEVEL_5) {
if (remain_len > MQTT_DATA_LEN_SIZE) {
word32 props_len = 0;
Expand Down Expand Up @@ -1626,6 +1627,7 @@ int MqttDecode_Disconnect(byte *rx_buf, int rx_buf_len, MqttDisconnect *disc)
}
rx_payload = &rx_buf[header_len];

disc->props = 0;
if (remain_len > 0) {
/* Decode variable header */
disc->reason_code = *rx_payload++;
Expand Down Expand Up @@ -1744,6 +1746,8 @@ int MqttDecode_Auth(byte *rx_buf, int rx_buf_len, MqttAuth *auth)
if ((auth->reason_code == MQTT_REASON_SUCCESS) ||
(auth->reason_code == MQTT_REASON_CONT_AUTH))
{
auth->props = 0;

/* Decode Length of Properties */
tmp = MqttDecode_Vbi(rx_payload, &props_len,
(word32)(rx_buf_len - (rx_payload - rx_buf)));
Expand Down
4 changes: 2 additions & 2 deletions wolfmqtt/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
extern "C" {
#endif

#define LIBWOLFMQTT_VERSION_STRING "1.17.0"
#define LIBWOLFMQTT_VERSION_HEX 0x01017000
#define LIBWOLFMQTT_VERSION_STRING "1.17.1"
#define LIBWOLFMQTT_VERSION_HEX 0x01017001

#ifdef __cplusplus
}
Expand Down

0 comments on commit 4326b16

Please sign in to comment.