@@ -444,7 +444,7 @@ static MQTTStatus_t handleUncleanSessionResumption( MQTTContext_t * pContext );
444
444
* @brief Clears existing state records for a clean session.
445
445
*
446
446
* @param[in] pContext Initialized MQTT context.
447
- *
447
+ *
448
448
* @return #MQTTPublishClearAllFailed if clearing all the copied publishes fails;
449
449
* #MQTTSuccess otherwise.
450
450
*/
@@ -1600,11 +1600,11 @@ static MQTTStatus_t handlePublishAcks( MQTTContext_t * pContext,
1600
1600
}
1601
1601
}
1602
1602
1603
- if ( ( ackType == MQTTPuback ) || ( ackType == MQTTPubrec ) )
1603
+ if ( ( ackType == MQTTPuback ) || ( ackType == MQTTPubrec ) )
1604
1604
{
1605
1605
if ( ( status == MQTTSuccess ) &&
1606
1606
( pContext -> clearFunction != NULL ) &&
1607
- ( pContext -> clearFunction ( pContext , packetIdentifier ) != true ) )
1607
+ ( pContext -> clearFunction ( pContext , packetIdentifier ) != true ) )
1608
1608
{
1609
1609
LogWarn ( ( "Clear callback function failed\n" ) );
1610
1610
}
@@ -2214,7 +2214,7 @@ static MQTTStatus_t sendPublishWithoutCopy( MQTTContext_t * pContext,
2214
2214
2215
2215
if ( ( pPublishInfo -> qos > MQTTQoS0 ) &&
2216
2216
( pContext -> storeFunction != NULL ) &&
2217
- ( pContext -> storeFunction (pContext , packetId , pIoVector , ioVectorLength ) != true ) )
2217
+ ( pContext -> storeFunction ( pContext , packetId , pIoVector , ioVectorLength ) != true ) )
2218
2218
{
2219
2219
status = MQTTPublishStoreFailed ;
2220
2220
}
@@ -2226,7 +2226,7 @@ static MQTTStatus_t sendPublishWithoutCopy( MQTTContext_t * pContext,
2226
2226
dupFlagChanged = false;
2227
2227
}
2228
2228
2229
- if ( ( status == MQTTSuccess ) &&
2229
+ if ( ( status == MQTTSuccess ) &&
2230
2230
( sendMessageVector ( pContext , pIoVector , ioVectorLength ) != ( int32_t ) totalMessageLength ) )
2231
2231
{
2232
2232
status = MQTTSendFailed ;
@@ -2514,7 +2514,7 @@ static MQTTStatus_t handleUncleanSessionResumption( MQTTContext_t * pContext )
2514
2514
MQTTStateCursor_t cursor = MQTT_STATE_CURSOR_INITIALIZER ;
2515
2515
uint16_t packetId = MQTT_PACKET_ID_INVALID ;
2516
2516
MQTTPublishState_t state = MQTTStateNull ;
2517
- TransportOutVector_t * pIoVec , * pIoVectIterator ;
2517
+ TransportOutVector_t * pIoVec , * pIoVectIterator ;
2518
2518
size_t ioVecCount ;
2519
2519
size_t totalMessageLength ;
2520
2520
@@ -2533,38 +2533,38 @@ static MQTTStatus_t handleUncleanSessionResumption( MQTTContext_t * pContext )
2533
2533
}
2534
2534
2535
2535
if ( ( status == MQTTSuccess ) &&
2536
- ( pContext -> retrieveFunction != NULL ))
2536
+ ( pContext -> retrieveFunction != NULL ) )
2537
2537
{
2538
2538
cursor = MQTT_STATE_CURSOR_INITIALIZER ;
2539
2539
2540
2540
packetId = MQTT_PublishToResend ( pContext , & cursor );
2541
2541
2542
2542
if ( ( packetId != MQTT_PACKET_ID_INVALID ) &&
2543
- ( pContext -> retrieveFunction (pContext , packetId , & pIoVec , & ioVecCount ) != true ) )
2543
+ ( pContext -> retrieveFunction ( pContext , packetId , & pIoVec , & ioVecCount ) != true ) )
2544
2544
{
2545
2545
status = MQTTPublishRetrieveFailed ;
2546
2546
}
2547
2547
2548
- /* Resend all the PUBLISH for which PUBCK/PUBREC is not received
2548
+ /* Resend all the PUBLISH for which PUBCK/PUBREC is not received
2549
2549
* after session is reestablished. */
2550
2550
while ( ( packetId != MQTT_PACKET_ID_INVALID ) &&
2551
- ( status == MQTTSuccess ) )
2551
+ ( status == MQTTSuccess ) )
2552
2552
{
2553
2553
totalMessageLength = 0 ;
2554
2554
2555
2555
for ( pIoVectIterator = pIoVec ; pIoVectIterator <= & ( pIoVec [ ioVecCount - 1U ] ); pIoVectIterator ++ )
2556
2556
{
2557
2557
totalMessageLength += pIoVectIterator -> iov_len ;
2558
2558
}
2559
-
2560
- MQTT_PRE_STATE_UPDATE_HOOK (pContext );
2559
+
2560
+ MQTT_PRE_STATE_UPDATE_HOOK ( pContext );
2561
2561
2562
2562
if ( sendMessageVector ( pContext , pIoVec , ioVecCount ) != ( int32_t ) totalMessageLength )
2563
2563
{
2564
2564
status = MQTTSendFailed ;
2565
2565
}
2566
2566
2567
- MQTT_POST_STATE_UPDATE_HOOK (pContext );
2567
+ MQTT_POST_STATE_UPDATE_HOOK ( pContext );
2568
2568
2569
2569
packetId = MQTT_PublishToResend ( pContext , & cursor );
2570
2570
@@ -2778,7 +2778,7 @@ MQTTStatus_t MQTT_InitRetransmits( MQTTContext_t * pContext,
2778
2778
MQTTRetransmitStorePacket storeFunction ,
2779
2779
MQTTRetransmitRetrievePacket retrieveFunction ,
2780
2780
MQTTRetransmitClearPacket clearFunction ,
2781
- MQTTRetransmitClearAllPackets clearAllFunction )
2781
+ MQTTRetransmitClearAllPackets clearAllFunction )
2782
2782
{
2783
2783
MQTTStatus_t status = MQTTSuccess ;
2784
2784
@@ -3699,15 +3699,15 @@ const char * MQTT_Status_strerror( MQTTStatus_t status )
3699
3699
case MQTTStatusDisconnectPending :
3700
3700
str = "MQTTStatusDisconnectPending" ;
3701
3701
break ;
3702
-
3702
+
3703
3703
case MQTTPublishStoreFailed :
3704
3704
str = "MQTTPublishStoreFailed" ;
3705
3705
break ;
3706
-
3706
+
3707
3707
case MQTTPublishRetrieveFailed :
3708
3708
str = "MQTTPublishRetrieveFailed" ;
3709
3709
break ;
3710
-
3710
+
3711
3711
case MQTTPublishClearAllFailed :
3712
3712
str = "MQTTPublishClearAllFailed" ;
3713
3713
break ;
0 commit comments