Skip to content

Commit

Permalink
Resolve formating issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Dakshit Babbar committed Oct 1, 2024
1 parent 43aed2a commit 80b5931
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions source/core_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2204,9 +2204,9 @@ static MQTTStatus_t sendPublishWithoutCopy( MQTTContext_t * pContext,
totalMessageLength += pPublishInfo->payloadLength;
}

/* if not already set, set the dup flag before storing a copy of the publish
* this is because on retrieving back this copy we will get it in the form of an
* array of TransportOutVector_t that holds the data in a const pointer which cannot be
/* if not already set, set the dup flag before storing a copy of the publish
* this is because on retrieving back this copy we will get it in the form of an
* array of TransportOutVector_t that holds the data in a const pointer which cannot be
* changed after retrieving.*/
if( pPublishInfo->dup != true )
{
Expand Down Expand Up @@ -2550,7 +2550,7 @@ static MQTTStatus_t handleUncleanSessionResumption( MQTTContext_t * pContext )
status = MQTTPublishRetrieveFailed;
}

/* Resend all the PUBLISH for which PUBACK/PUBREC is not received
/* Resend all the PUBLISH for which PUBACK/PUBREC is not received
* after session is reestablished. */
while( ( packetId != MQTT_PACKET_ID_INVALID ) &&
( status == MQTTSuccess ) )
Expand Down
38 changes: 19 additions & 19 deletions source/include/core_mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ typedef void (* MQTTEventCallback_t )( struct MQTTContext * pContext,
struct MQTTDeserializedInfo * pDeserializedInfo );

/**
* @brief User defined callback used to store outgoing publishes. Used to track any publish
* @brief User defined callback used to store outgoing publishes. Used to track any publish
* retransmit on an unclean session connection.
*
* @param[in] pContext Initialised MQTT Context.
Expand All @@ -114,13 +114,13 @@ typedef void (* MQTTEventCallback_t )( struct MQTTContext * pContext,
*/
/* @[define_mqtt_retransmitstorepacket] */
typedef bool ( * MQTTStorePacketForRetransmit)( struct MQTTContext * pContext,
uint16_t packetId,
TransportOutVector_t * pIoVec,
size_t ioVecCount );
uint16_t packetId,
TransportOutVector_t * pIoVec,
size_t ioVecCount );
/* @[define_mqtt_retransmitstorepacket] */

/**
* @brief User defined callback used to retreive a copied publish for resend operation. Used to
* @brief User defined callback used to retreive a copied publish for resend operation. Used to
* track any publish retransmit on an unclean session connection.
*
* @param[in] pContext Initialised MQTT Context.
Expand All @@ -132,13 +132,13 @@ typedef bool ( * MQTTStorePacketForRetransmit)( struct MQTTContext * pContext,
*/
/* @[define_mqtt_retransmitretrievepacket] */
typedef bool ( * MQTTRetrievePacketForRetransmit)( struct MQTTContext * pContext,
uint16_t packetId,
TransportOutVector_t ** pIoVec,
size_t * ioVecCount );
uint16_t packetId,
TransportOutVector_t ** pIoVec,
size_t * ioVecCount );
/* @[define_mqtt_retransmitretrievepacket] */

/**
* @brief User defined callback used to clear a particular copied publish packet. Used to
* @brief User defined callback used to clear a particular copied publish packet. Used to
* track any publish retransmit on an unclean session connection.
*
* @param[in] pContext Initialised MQTT Context.
Expand All @@ -147,20 +147,20 @@ typedef bool ( * MQTTRetrievePacketForRetransmit)( struct MQTTContext * pContext
* @return True if the clear is successful else false.
*/
/* @[define_mqtt_retransmitclearpacket] */
typedef bool (*MQTTClearPacketForRetransmit)( struct MQTTContext * pContext,
uint16_t packetId );
typedef bool (* MQTTClearPacketForRetransmit)( struct MQTTContext * pContext,
uint16_t packetId );
/* @[define_mqtt_retransmitclearpacket] */

/**
* @brief User defined callback used to clear all copied publish packets. Used to
* @brief User defined callback used to clear all copied publish packets. Used to
* when connecting with a clean session.
*
* @param[in] pContext Initialised MQTT Context.
*
* @return True if the clear all is successful else false.
*/
/* @[define_mqtt_retransmitclearallpackets] */
typedef bool (*MQTTClearAllPacketsForRetransmit)( struct MQTTContext * pContext );
typedef bool (* MQTTClearAllPacketsForRetransmit)( struct MQTTContext * pContext );
/* @[define_mqtt_retransmitclearallpackets] */

/**
Expand Down Expand Up @@ -323,7 +323,7 @@ typedef struct MQTTContext
/**
* @brief User defined API used to clear a particular copied publish packet.
*/
MQTTClearPacketForRetransmit clearFunction;
MQTTClearPacketForRetransmit clearFunction;

/**
* @brief User defined API used to clear all copied publish packets.
Expand Down Expand Up @@ -510,7 +510,7 @@ MQTTStatus_t MQTT_InitStatefulQoS( MQTTContext_t * pContext,
*
* @return #MQTTBadParameter if invalid parameters are passed;
* #MQTTSuccess otherwise.
*
*
* <b>Example</b>
* @code{c}
*
Expand Down Expand Up @@ -571,12 +571,12 @@ MQTTStatus_t MQTT_InitStatefulQoS( MQTTContext_t * pContext,
*
* // Now QoS1 and/or QoS2 publishes can be sent with this context.
* }
*
*
* if( status == MQTTSuccess )
* {
* status = MQTT_InitRetransmits( &mqttContext, publishStoreCallback,
* publishRetrieveCallback,
* publishClearCallback,
* status = MQTT_InitRetransmits( &mqttContext, publishStoreCallback,
* publishRetrieveCallback,
* publishClearCallback,
* publishClearAllCallback );
*
* // Now unacked Publishes can be resent on an unclean session resumption.
Expand Down

0 comments on commit 80b5931

Please sign in to comment.