-
Notifications
You must be signed in to change notification settings - Fork 112
MQTTv5 Implementation #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -143,7 +134,9 @@ static int32_t sendBuffer( MQTTContext_t * pContext, | |||
static MQTTStatus_t sendConnectWithoutCopy( MQTTContext_t * pContext, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should audit the return values of all the functions in the doxygen documentation. Many of them are stale or non-exhaustive.
} | ||
else if( ( ( pIncomingPacket->remainingLength + variableLengthEncodedSize( pIncomingPacket->remainingLength ) + 1U ) > maxPacketSize ) && ( skipMaxPacketSizeCheck != true ) ) | ||
{ | ||
LogError( ( "Packet Size cannot be greater than max packet size. " ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a log statement for this bad parameter return type.
source/core_mqtt_serializer.c
Outdated
{ | ||
LogError( ( "pConnectProperties cannot be NULL for CONNACK packet." ) ); | ||
status = MQTTBadParameter; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to document why the pConnectProperties parameter cannot be NULL for receiving a CONNACK packet. The reason is that even if the user does not want to parse the properties in the connack the server may still send them. THe properties in the connack are ought to be followed by the user. For instance, the max packet size of the server cannot be ignored by the user. Hence the user should process the connack properties.
Upgrading MQTT Library to support v5 features
Description
Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.