Skip to content

Commit e2de0bd

Browse files
MQTTv5
1 parent 5d0ac4b commit e2de0bd

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

source/core_mqtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ static bool matchTopicFilter( const char * pTopicName,
819819
*
820820
* @param[in] pContext MQTT Connection context.
821821
* @param[in] pAckInfo Reason code and properties.
822-
* @param[in] remainingLength Remaining lenght of the packet.
822+
* @param[in] remainingLength Remaining length of the packet.
823823
* @param[in] sessionExpiry Session expiry interval.
824824
*
825825
*

source/core_mqtt_serializer.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
11781178
* @param[in] pFixedBuffer Buffer for packet serialization.
11791179
*
11801180
*/
1181-
static void seriailizePubAckPacketV5( const MQTTAckInfo_t * pAckInfo,
1181+
static void serializePubAckPacketV5( const MQTTAckInfo_t * pAckInfo,
11821182
uint8_t packetType,
11831183
uint16_t packetId,
11841184
size_t remainingLength,
@@ -1213,7 +1213,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
12131213
*
12141214
* @param[out] pAckInfo To store the decoded property.
12151215
* @param[out] pIndex Pointer to the current index of the buffer.
1216-
* @param[out] remainingLength Reamining length of the incoming packet.
1216+
* @param[out] remainingLength Remaining length of the incoming packet.
12171217
*
12181218
*
12191219
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
@@ -1260,7 +1260,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
12601260
* @param[in] sessionExpiry Session Expiry Interval.
12611261
*
12621262
*/
1263-
static void seriailizeDisconnectPacketV5( const MQTTAckInfo_t * pDisconnectInfo,
1263+
static void serializeDisconnectPacketV5( const MQTTAckInfo_t * pDisconnectInfo,
12641264
const MQTTFixedBuffer_t * pFixedBuffer,
12651265
size_t remainingLength,
12661266
uint32_t sessionExpiry );
@@ -2392,7 +2392,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
23922392
return status;
23932393
}
23942394

2395-
static void seriailizePubAckPacketV5( const MQTTAckInfo_t * pAckInfo,
2395+
static void serializePubAckPacketV5( const MQTTAckInfo_t * pAckInfo,
23962396
uint8_t packetType,
23972397
uint16_t packetId,
23982398
size_t remainingLength,
@@ -2556,7 +2556,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
25562556
{
25572557
while( ( propertyLength > 0U ) && ( status == MQTTSuccess ) )
25582558
{
2559-
/*Decode the poperty id.*/
2559+
/*Decode the property id.*/
25602560
uint8_t packetId = *pLocalIndex;
25612561
bool reasonString = false;
25622562
pLocalIndex = &pLocalIndex[ 1 ];
@@ -5186,7 +5186,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
51865186
pIndexLocal = &pIndexLocal[ 4 ];
51875187
}
51885188

5189-
/*Serialze the topic alias if provided*/
5189+
/*Serialize the topic alias if provided*/
51905190

51915191
if( pPublishInfo->topicAlias != 0U )
51925192
{
@@ -5441,7 +5441,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
54415441
}
54425442
else if( ( pPublishInfo->retain == true ) && ( retainAvailable == 0U ) )
54435443
{
5444-
LogError( ( "Retain is not avaialble." ) );
5444+
LogError( ( "Retain is not available." ) );
54455445
status = MQTTBadParameter;
54465446
}
54475447
else if( ( pPublishInfo->qos != MQTTQoS0 ) && ( maxQos == 0U ) )
@@ -5721,7 +5721,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
57215721
}
57225722
else
57235723
{
5724-
seriailizePubAckPacketV5( pAckInfo, packetType, packetId, remainingLength, pFixedBuffer );
5724+
serializePubAckPacketV5( pAckInfo, packetType, packetId, remainingLength, pFixedBuffer );
57255725
}
57265726
}
57275727

@@ -5868,7 +5868,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
58685868
return pIndexLocal;
58695869
}
58705870

5871-
static void seriailizeDisconnectPacketV5( const MQTTAckInfo_t * pDisconnectInfo,
5871+
static void serializeDisconnectPacketV5( const MQTTAckInfo_t * pDisconnectInfo,
58725872
const MQTTFixedBuffer_t * pFixedBuffer,
58735873
size_t remainingLength,
58745874
uint32_t sessionExpiry )
@@ -5954,7 +5954,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
59545954
}
59555955
else
59565956
{
5957-
seriailizeDisconnectPacketV5( pDisconnectInfo, pFixedBuffer, remainingLength, sessionExpiry );
5957+
serializeDisconnectPacketV5( pDisconnectInfo, pFixedBuffer, remainingLength, sessionExpiry );
59585958
}
59595959
}
59605960

@@ -6034,7 +6034,7 @@ MQTTStatus_t MQTT_ProcessIncomingPacketTypeAndLength( const uint8_t * pBuffer,
60346034
{
60356035
while( ( propertyLength > 0U ) && ( status == MQTTSuccess ) )
60366036
{
6037-
/*Decode the poperty id.*/
6037+
/*Decode the property id.*/
60386038
uint8_t propertyId = *pIndex;
60396039
bool reasonString = false;
60406040
bool serverRef = false;

source/include/core_mqtt_serializer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ MQTTStatus_t MQTTV5_SerializeConnect(const MQTTConnectInfo_t* pConnectInfo,
18551855
* //Set the publish info parameters.
18561856
*
18571857
* //Validate the publish packet
1858-
* status = MQTTV5_ValidatePublishParams(&ublishInfo,topicAliasMax,retainAvailable,maxQos);
1858+
* status = MQTTV5_ValidatePublishParams(&publishInfo,topicAliasMax,retainAvailable,maxQos);
18591859
*
18601860
* if( status == MQTTSuccess )
18611861
* {
@@ -2007,9 +2007,9 @@ MQTTStatus_t MQTTV5_DeserializeAck( const MQTTPacketInfo_t * pIncomingPacket,
20072007
* }
20082008
* @endcode
20092009
*/
2010-
/* @[declare_mqttv5_getdackpacketsize] */
2010+
/* @[declare_mqttv5_getackpacketsize] */
20112011
MQTTStatus_t MQTTV5_GetAckPacketSize( MQTTAckInfo_t *pAckInfo, size_t* pRemainingLength,size_t * pPacketSize, uint32_t maxPacketSize);
2012-
/* @[declare_mqttv5_getdackpacketsize] */
2012+
/* @[declare_mqttv5_getackpacketsize] */
20132013

20142014
/**
20152015
* @fn uint8_t * MQTTV5_SerializeAckFixed(uint8_t * pIndex,
@@ -2272,7 +2272,7 @@ uint8_t * MQTTV5_SerializeDisconnectFixed(uint8_t * pIndex,
22722272
*
22732273
* // Serialize the disconnect into the fixed buffer.
22742274
* MQTTV5_SerializeDisconnectWithProperty( &disconnectInfo,
2275-
remainingLenght,
2275+
remainingLength,
22762276
&fixedBuffer,
22772277
sessionExpiry);
22782278
*

test/unit-test/MQTTv5/core_mqttv5_serializer_utest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,7 +2444,7 @@ void test_MQTTV5_SerializeConnect_Happy_Paths()
24442444
verifySerializedConnectPacket( &connectInfo, &publishInfo, &properties,
24452445
remainingLength, &networkBuffer );
24462446

2447-
/* Repeat with NULL ppublishInfo. */
2447+
/* Repeat with NULL publishInfo. */
24482448
mqttStatus = MQTTV5_GetConnectPacketSize( &connectInfo,
24492449
NULL,
24502450
&properties,
@@ -2753,7 +2753,7 @@ void test_MQTTV5_DeserializeAck_puback( void )
27532753
TEST_ASSERT_EQUAL_INT( MQTTProtocolError, status );
27542754

27552755
requestProblem = true;
2756-
/*User properties not initilaized.*/
2756+
/*User properties not initialized.*/
27572757
status = MQTTV5_DeserializeAck( &mqttPacketInfo, &packetIdentifier, &ackInfo, requestProblem, maxPacketSize );
27582758
TEST_ASSERT_EQUAL_INT( MQTTBadParameter, status );
27592759

0 commit comments

Comments
 (0)