BugID:17646749:[mqtt]add port check in construct
@@ -3084,7 +3084,8 @@ void *IOT_MQTT_Construct(iotx_mqtt_param_t *pInitParams)
}
if (pInitParams->host == NULL || pInitParams->client_id == NULL ||
- pInitParams->username == NULL || pInitParams->password == NULL) {
+ pInitParams->username == NULL || pInitParams->password == NULL ||
+ pInitParams->port == 0) {
mqtt_err("init params is not complete");
if (mqtt_params != NULL) {
mqtt_free(mqtt_params);
