mqttclient version 1.0.2 released...

This commit is contained in:
jiejieTop
2020-04-25 19:11:29 +08:00
parent 8e38e24711
commit d58ef4e996
3 changed files with 25 additions and 18 deletions

View File

@@ -2,14 +2,14 @@
* @Author: jiejie
* @Github: https://github.com/jiejieTop
* @Date: 2020-01-10 23:45:59
* @LastEditTime : 2020-01-13 02:48:53
* @LastEditTime: 2020-04-25 18:59:28
* @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
*/
#include "platform_net_socket.h"
int platform_net_socket_connect(const char *host, const char *port, int proto)
{
int fd, ret = MQTT_SOCKET_UNKNOWN_HOST;
int fd, ret = MQTT_SOCKET_UNKNOWN_HOST_ERROR;
#ifdef MQTT_NETSOCKET_USE_AT
fd = tos_sal_module_connect(host, port, TOS_SAL_PROTO_TCP);
@@ -36,7 +36,7 @@ int platform_net_socket_connect(const char *host, const char *port, int proto)
for (cur = addr_list; cur != NULL; cur = cur->ai_next) {
fd = socket(cur->ai_family, cur->ai_socktype, cur->ai_protocol);
if (fd < 0) {
ret = MQTT_SOCKET_FAILED;
ret = MQTT_SOCKET_FAILED_ERROR;
continue;
}