#endif /* if IOT_MQTT_ENABLE_SERIALIZER_OVERRIDES == 1 */\r
\r
/* Log initialization status. */\r
- if( status != IOT_MQTT_SUCCESS )\r
+ if( status != IOT_MQTT_SUCCESS ) //_RB_ This will generate compiler warnings if IOT_MQTT_ENABLE_SERIALIZER_OVERRIDES != 0\r
{\r
IotLogError( "Failed to initialize MQTT library serializer. " );\r
}\r
_mqttConnection_t * pNewMqttConnection = NULL;\r
\r
/* Default CONNECT serializer function. */\r
- IotMqttError_t ( * serializeConnect )( const IotMqttConnectInfo_t *,\r
+ IotMqttError_t ( * serializeConnect )( const IotMqttConnectInfo_t *, //_RB_ Needs to be a typedef to make it easier to rease and more maintainable should the prototype change.\r
uint8_t **,\r
size_t * ) = _IotMqtt_SerializeConnect;\r
\r
}\r
\r
/* Validate network interface and connect info. */\r
- if( _IotMqtt_ValidateConnect( pConnectInfo ) == false )\r
+ if( _IotMqtt_ValidateConnect( pConnectInfo ) == false ) //_RB_ A lot of code in here that could be replaced by asserts().\r
{\r
IOT_SET_AND_GOTO_CLEANUP( IOT_MQTT_BAD_PARAMETER );\r
}\r
\r
IotLogInfo( "Establishing new MQTT connection." );\r
\r
- /* Initialize a new MQTT connection object. */\r
+ /* Initialize a new MQTT connection object. *///_RB_ Initialise, as per the comment, or create, as per the function name? I don't think this does create a connection as that happens below.\r
pNewMqttConnection = _createMqttConnection( pConnectInfo->awsIotMqttMode,\r
pNetworkInfo,\r
pConnectInfo->keepAliveSeconds );\r
IotMqtt_Assert( pOperation->u.operation.packetSize > 0 );\r
\r
/* Add the CONNECT operation to the send queue for network transmission. */\r
- status = _IotMqtt_ScheduleOperation( pOperation,\r
+ status = _IotMqtt_ScheduleOperation( pOperation, // Why schedule a job if going to wait for comletion?\r
_IotMqtt_ProcessSend,\r
0 );\r
\r