Merge branch 'develop' of github.com:eclipse/paho.mqtt.c into develop

This commit is contained in:
Ian Craggs 2022-03-22 15:03:24 +00:00
commit 29ed338abc
2 changed files with 3 additions and 3 deletions

View File

@ -340,7 +340,7 @@ int MQTTAsync_createWithOptions(MQTTAsync* handle, const char* serverURI, const
}
}
if (options->maxBufferedMessages <= 0)
if (options && options->maxBufferedMessages <= 0)
{
rc = MQTTASYNC_MAX_BUFFERED;
goto exit;

View File

@ -1656,7 +1656,7 @@ int test5(struct Options options)
}
createOptions.sendWhileDisconnected = 0;
createOptions.maxBufferedMessages = 0;
createOptions.maxBufferedMessages = 1;
createOptions.MQTTVersion = MQTTVERSION_5;
rc = MQTTAsync_createWithOptions(&d, options.connection, clientidd, MQTTCLIENT_PERSISTENCE_DEFAULT,
NULL, &createOptions);
@ -1826,7 +1826,7 @@ int test6(struct Options options)
}
createOptions.sendWhileDisconnected = 0;
createOptions.maxBufferedMessages = 0;
createOptions.maxBufferedMessages = 1;
createOptions.MQTTVersion = MQTTVERSION_5;
rc = MQTTAsync_createWithOptions(&d, options.connection, clientidd, MQTTCLIENT_PERSISTENCE_DEFAULT,
NULL, &createOptions);