|
|
@@ -388,7 +388,7 @@ int luat_mqtt_connect(luat_mqtt_ctrl_t *mqtt_ctrl) {
|
|
|
LLOGD("host %s port %d keepalive %d", hostname, port, keepalive);
|
|
|
mqtt_set_alive(&(mqtt_ctrl->broker), keepalive);
|
|
|
#ifdef LUAT_USE_LWIP
|
|
|
- ret = network_connect(mqtt_ctrl->netc, hostname, strlen(hostname), (0xff == mqtt_ctrl->ip_addr.type)?NULL:&(mqtt_ctrl->ip_addr), port, 0) < 0;
|
|
|
+ ret = network_connect(mqtt_ctrl->netc, hostname, strlen(hostname), ip_addr_isany_val(mqtt_ctrl->ip_addr)?NULL:&(mqtt_ctrl->ip_addr), port, 0) < 0;
|
|
|
#else
|
|
|
ret = network_connect(mqtt_ctrl->netc, hostname, strlen(hostname), (0xff == mqtt_ctrl->ip_addr.is_ipv6)?NULL:&(mqtt_ctrl->ip_addr), port, 0) < 0;
|
|
|
#endif
|