iot_demo_mqtt.c : check identifier for v4_beta
@@ -427,7 +427,7 @@ static int _establishMqttConnection( bool awsIotMqttMode,
/* Use the parameter client identifier if provided. Otherwise, generate a
* unique client identifier. */
- if( pIdentifier != NULL )
+ if( ( pIdentifier != NULL ) && ( pIdentifier[ 0 ] != '\0' ) )
{
connectInfo.pClientIdentifier = pIdentifier;
connectInfo.clientIdentifierLength = ( uint16_t ) strlen( pIdentifier );
