Skip to content

Commit 9046907

Browse files
committed
Updates and buf fixes in WiFi and mqtt
1 parent c66b4c3 commit 9046907

File tree

12 files changed

+66
-57
lines changed

12 files changed

+66
-57
lines changed

firmware/MaixPy.bin

0 Bytes
Binary file not shown.

firmware/MaixPy.kfpkg

332 Bytes
Binary file not shown.

firmware/MaixPy_firmware.zip

867 Bytes
Binary file not shown.

firmware/MaixPy_sqlite.bin

0 Bytes
Binary file not shown.

firmware/MaixPy_sqlite.kfpkg

81 Bytes
Binary file not shown.

k210-freertos/mpy_support/mpconfigport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#define MICROPY_HW_BOARD_NAME "Sipeed_board"
4242
#define MICROPY_HW_MCU_NAME "Kendryte-K210"
4343
#define MICROPY_PY_SYS_PLATFORM "K210/FreeRTOS"
44-
#define MICROPY_PY_LOBO_VERSION "1.11.6"
45-
#define MICROPY_PY_LOBO_VERSION_NUM (0x011106)
44+
#define MICROPY_PY_LOBO_VERSION "1.11.7"
45+
#define MICROPY_PY_LOBO_VERSION_NUM (0x011107)
4646

4747
#define MICROPY_PY_USE_LOG_COLORS (1)
4848

k210-freertos/mpy_support/standard_lib/machine/machine_i2c.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,10 @@ static void _checkAddr(uint16_t addr)
410410
}
411411
}
412412

413-
//----------------------------------------------------
414-
static uint8_t getMemAdrLen(int memlen, uint32_t addr)
413+
//-----------------------------------------------------------------
414+
static uint8_t getMemAdrLen(int memlen, int membits, uint32_t addr)
415415
{
416+
if (membits > 0) memlen = membits / 8;
416417
if ((memlen < 1) || (memlen > 4)) {
417418
mp_raise_ValueError("Memory address length error, 1 - 4 allowed");
418419
}
@@ -1119,12 +1120,13 @@ STATIC const mp_arg_t mp_machine_i2c_mem_allowed_args[] = {
11191120
{ MP_QSTR_memaddr, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = mp_const_none} },
11201121
{ MP_QSTR_arg, MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
11211122
{ MP_QSTR_adrlen, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
1123+
{ MP_QSTR_addr_size, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
11221124
};
11231125

11241126
//-----------------------------------------------------------------------------------------------------
11251127
STATIC mp_obj_t mp_machine_i2c_readfrom_mem(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
11261128
{
1127-
enum { ARG_addr, ARG_memaddr, ARG_n, ARG_memlen };
1129+
enum { ARG_addr, ARG_memaddr, ARG_n, ARG_memlen, ARG_membits };
11281130
mp_machine_i2c_obj_t *self = pos_args[0];
11291131
_checkMaster(self);
11301132

@@ -1138,7 +1140,7 @@ STATIC mp_obj_t mp_machine_i2c_readfrom_mem(size_t n_args, const mp_obj_t *pos_a
11381140
int n = mp_obj_get_int(args[ARG_n].u_obj);
11391141
if (n > 0) {
11401142
uint32_t addr = (uint32_t)mp_obj_get_int(args[ARG_memaddr].u_obj);
1141-
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, addr);
1143+
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, args[ARG_membits].u_int, addr);
11421144

11431145
uint8_t *buf = pvPortMalloc(n);
11441146
if (buf == NULL) {
@@ -1164,7 +1166,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mp_machine_i2c_readfrom_mem_obj, 1, mp_machine
11641166
//----------------------------------------------------------------------------------------------------------
11651167
STATIC mp_obj_t mp_machine_i2c_readfrom_mem_into(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
11661168
{
1167-
enum { ARG_addr, ARG_memaddr, ARG_buf, ARG_memlen };
1169+
enum { ARG_addr, ARG_memaddr, ARG_buf, ARG_memlen, ARG_membits };
11681170
mp_machine_i2c_obj_t *self = pos_args[0];
11691171
_checkMaster(self);
11701172

@@ -1175,7 +1177,7 @@ STATIC mp_obj_t mp_machine_i2c_readfrom_mem_into(size_t n_args, const mp_obj_t *
11751177
_checkAddr(args[ARG_addr].u_int);
11761178

11771179
uint32_t addr = (uint32_t)mp_obj_get_int(args[ARG_memaddr].u_obj);
1178-
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, addr);
1180+
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, args[ARG_membits].u_int, addr);
11791181

11801182
// Get the output data buffer
11811183
mp_buffer_info_t bufinfo;
@@ -1196,7 +1198,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mp_machine_i2c_readfrom_mem_into_obj, 1, mp_ma
11961198
//----------------------------------------------------------------------------------------------------
11971199
STATIC mp_obj_t mp_machine_i2c_writeto_mem(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
11981200
{
1199-
enum { ARG_addr, ARG_memaddr, ARG_buf, ARG_memlen };
1201+
enum { ARG_addr, ARG_memaddr, ARG_buf, ARG_memlen, ARG_membits };
12001202
mp_machine_i2c_obj_t *self = pos_args[0];
12011203
_checkMaster(self);
12021204

@@ -1207,7 +1209,7 @@ STATIC mp_obj_t mp_machine_i2c_writeto_mem(size_t n_args, const mp_obj_t *pos_ar
12071209
_checkAddr(args[ARG_addr].u_int);
12081210

12091211
uint32_t addr = (uint32_t)mp_obj_get_int(args[ARG_memaddr].u_obj);
1210-
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, addr);
1212+
uint8_t memlen = getMemAdrLen(args[ARG_memlen].u_int, args[ARG_membits].u_int, addr);
12111213
uint16_t len = 0;
12121214
uint8_t *data = NULL;
12131215

k210-freertos/mpy_support/standard_lib/mqtt/mqtt_client.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ static void esp_mqtt_task(void *pvParameters)
687687
switch ((int)client->state) {
688688
case MQTT_STATE_INIT:
689689
if (client->transport == NULL) {
690-
if (transport_debug) LOGE(MQTT_TAG, "There are no transport");
690+
if (transport_debug) LOGE(MQTT_TAG, "There is no transport");
691691
client->run = false;
692692
}
693693

@@ -700,6 +700,7 @@ static void esp_mqtt_task(void *pvParameters)
700700
esp_mqtt_abort_connection(client);
701701
break;
702702
}
703+
vTaskDelay(50);
703704
if (transport_debug) LOGD(MQTT_TAG, "Transport connected to %s://%s:%d", client->config->scheme, client->config->host, client->config->port);
704705
if (esp_mqtt_connect(client, client->config->network_timeout_ms) != 0) {
705706
if (transport_debug) LOGI(MQTT_TAG, "MQTT Connect error");

k210-freertos/mpy_support/standard_lib/mqtt/transport_ssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static int ssl_connect(transport_handle_t t, const char *host, int port, int tim
8888
goto exit;
8989
}
9090
if (transport_debug) LOGD(TAG, "Connected to %s:%d", host, port);
91+
ssl->sock->peer_closed = false;
9192
return ssl->sock->fd;
9293
exit:
9394
ssl_close(t);
@@ -155,6 +156,7 @@ static int ssl_close(transport_handle_t t)
155156
int ret = -1;
156157
transport_ssl_t *ssl = transport_get_context_data(t);
157158
ret = wifi_close(ssl->sock);
159+
ssl->sock->fd = -1;
158160
return ret;
159161
}
160162

k210-freertos/mpy_support/standard_lib/mqtt/transport_tcp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static int mqtcp_connect(transport_handle_t t, const char *host, int port, int t
7070
return -1;
7171
}
7272
if (transport_debug) LOGD(TAG, "Connected to %s:%d", host, port);
73+
tcp->sock->peer_closed = false;
7374
return tcp->sock->fd;
7475
}
7576

@@ -215,8 +216,8 @@ static int mqtcp_close(transport_handle_t t)
215216
}
216217
else if (tcp->sock->fd >= 0) {
217218
ret = lwip_close(tcp->sock->fd);
218-
tcp->sock->fd = -1;
219219
}
220+
tcp->sock->fd = -1;
220221
return ret;
221222
}
222223

k210-freertos/mpy_support/standard_lib/network/modmqtt.c

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ STATIC void subscribed_cb(mqtt_obj_t *self, const char *topic)
117117
tuple[0] = MP_OBJ_FROM_PTR(self);
118118
tuple[1] = mp_obj_new_str(self->name, strlen(self->name));
119119
if (topic) tuple[2] = mp_obj_new_str(topic, strlen(topic));
120-
else tuple[2] = mp_obj_new_str("?", 2);
120+
else tuple[2] = mp_obj_new_str("??", 2);
121121

122122
mp_sched_schedule((mp_obj_t)self->mpy_subscribed_cb, mp_obj_new_tuple(3, tuple));
123123
}
@@ -131,7 +131,7 @@ STATIC void unsubscribed_cb(mqtt_obj_t *self, const char *topic)
131131
tuple[0] = MP_OBJ_FROM_PTR(self);
132132
tuple[1] = mp_obj_new_str(self->name, strlen(self->name));
133133
if (topic) tuple[2] = mp_obj_new_str(topic, strlen(topic));
134-
else tuple[2] = mp_obj_new_str("?", 2);
134+
else tuple[2] = mp_obj_new_str("??", 2);
135135

136136
mp_sched_schedule((mp_obj_t)self->mpy_unsubscribed_cb, mp_obj_new_tuple(3, tuple));
137137
}
@@ -141,13 +141,14 @@ STATIC void unsubscribed_cb(mqtt_obj_t *self, const char *topic)
141141
STATIC void published_cb(mqtt_obj_t *self, const char *topic, int type)
142142
{
143143
if (self->mpy_published_cb) {
144-
mp_obj_t tuple[3];
144+
mp_obj_t tuple[4];
145145
tuple[0] = MP_OBJ_FROM_PTR(self);
146146
tuple[1] = mp_obj_new_str(self->name, strlen(self->name));
147147
if (topic) tuple[2] = mp_obj_new_str(topic, strlen(topic));
148-
else tuple[2] = mp_obj_new_str("?", 2);
148+
else tuple[2] = mp_obj_new_str("??", 2);
149+
tuple[3] = mp_obj_new_int(type);
149150

150-
mp_sched_schedule((mp_obj_t)self->mpy_published_cb, mp_obj_new_tuple(3, tuple));
151+
mp_sched_schedule((mp_obj_t)self->mpy_published_cb, mp_obj_new_tuple(4, tuple));
151152
}
152153
}
153154

@@ -317,15 +318,15 @@ STATIC void mqtt_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_
317318
else if (self->client->config->host) server_uri = self->client->config->host;
318319

319320
mp_printf(print, "Mqtt[%s]\n (Server: %s:%u, Status: %s\n", self->name, server_uri, self->client->config->port, sstat);
320-
if ((self->client->state == MQTT_STATE_CONNECTED) || (self->client->state == MQTT_STATE_INIT)) {
321+
//if ((self->client->state == MQTT_STATE_CONNECTED) || (self->client->state == MQTT_STATE_INIT)) {
321322
mp_printf(print, " Client ID: %s, Clean session=%s, Keepalive=%ds\n LWT(",
322323
self->client->connect_info.client_id, (self->client->connect_info.clean_session ? "True" : "False"), self->client->connect_info.keepalive);
323324
if (self->client->connect_info.will_topic) {
324325
mp_printf(print, "QoS=%d, Retain=%s, Topic='%s', Msg='%s')\n",
325326
self->client->connect_info.will_qos, (self->client->connect_info.will_retain ? "True" : "False"), self->client->connect_info.will_topic, self->client->connect_info.will_message);
326327
}
327328
else mp_printf(print, "not set)\n");
328-
}
329+
//}
329330
/*
330331
if ((self->client->settings->xMqttTask) && (self->client->settings->xMqttSendingTask)) {
331332
mp_printf(print, " Used stack: %u/%u + %u/%u\n",
@@ -418,6 +419,9 @@ STATIC mp_obj_t mqtt_make_new(const mp_obj_type_t *type, size_t n_args, size_t n
418419
// Populate settings
419420
esp_mqtt_client_config_t mqtt_cfg = {0};
420421

422+
// Set mqtt task priority
423+
mqtt_cfg.task_prio = MICROPY_TASK_PRIORITY+1;
424+
421425
// Event handle
422426
mqtt_cfg.event_handle = mqtt_event_handler;
423427

@@ -584,9 +588,6 @@ STATIC mp_obj_t mqtt_op_config(mp_uint_t n_args, const mp_obj_t *pos_args, mp_ma
584588
if (!self->client) {
585589
mp_raise_ValueError("Destroyed");
586590
}
587-
if (self->client->state < MQTT_STATE_INIT) {
588-
mp_raise_ValueError("Not initialized");
589-
}
590591

591592
mp_arg_val_t args[MP_ARRAY_SIZE(mqtt_config_allowed_args)];
592593
mp_arg_parse_all(n_args-1, pos_args+1, kw_args, MP_ARRAY_SIZE(mqtt_config_allowed_args), mqtt_config_allowed_args, args);
@@ -709,7 +710,6 @@ STATIC mp_obj_t mqtt_op_subscribe(mp_uint_t n_args, const mp_obj_t *args)
709710
if (checkClient(self) != MQTT_STATE_CONNECTED) return mp_const_false;
710711

711712
const char *topic = mp_obj_str_get_str(args[1]);
712-
int wait = 2000;
713713
int qos = 0;
714714
if (n_args == 3) {
715715
qos = mp_obj_get_int(args[2]);
@@ -726,15 +726,9 @@ STATIC mp_obj_t mqtt_op_subscribe(mp_uint_t n_args, const mp_obj_t *args)
726726
self->client->config->user_context = NULL;
727727
return mp_const_false;
728728
}
729-
while ((wait > 0) && (self->subs_flag == 0)) {
730-
vTaskDelay(10 / portTICK_PERIOD_MS);
731-
wait -= 10;
732-
}
733-
self->client->config->user_context = NULL;
734-
if (wait) return mp_const_true;
735-
else return mp_const_false;
729+
return mp_const_true;
736730
}
737-
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mqtt_subscribe_obj, 2, 3, mqtt_op_subscribe);
731+
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mqtt_subscribe_obj, 2, 4, mqtt_op_subscribe);
738732

739733
//----------------------------------------------------------------------
740734
STATIC mp_obj_t mqtt_op_unsubscribe(mp_obj_t self_in, mp_obj_t topic_in)
@@ -743,7 +737,6 @@ STATIC mp_obj_t mqtt_op_unsubscribe(mp_obj_t self_in, mp_obj_t topic_in)
743737
if (checkClient(self) != MQTT_STATE_CONNECTED) return mp_const_false;
744738

745739
const char *topic = mp_obj_str_get_str(topic_in);
746-
int wait = 2000;
747740
self->unsubs_flag = 0;
748741
self->client->config->user_context = (void *)topic;
749742

@@ -752,13 +745,7 @@ STATIC mp_obj_t mqtt_op_unsubscribe(mp_obj_t self_in, mp_obj_t topic_in)
752745
self->client->config->user_context = NULL;
753746
return mp_const_false;
754747
}
755-
while ((wait > 0) && (self->unsubs_flag == 0)) {
756-
vTaskDelay(10 / portTICK_PERIOD_MS);
757-
wait -= 10;
758-
}
759-
self->client->config->user_context = NULL;
760-
if (wait) return mp_const_true;
761-
else return mp_const_false;
748+
return mp_const_true;
762749
}
763750
MP_DEFINE_CONST_FUN_OBJ_2(mqtt_unsubscribe_obj, mqtt_op_unsubscribe);
764751

@@ -772,15 +759,13 @@ STATIC mp_obj_t mqtt_op_publish(mp_uint_t n_args, const mp_obj_t *args)
772759
const char *topic = mp_obj_str_get_str(args[1]);
773760
const char *msg = mp_obj_str_get_data(args[2], &len);
774761

775-
int wait = 2000;
776762
int qos = 0;
777763
if (n_args == 4) {
778764
qos = mp_obj_get_int(args[3]);
779765
if ((qos < 0) || (qos > 2)) {
780766
mp_raise_ValueError("Wrong QoS value");
781767
}
782768
}
783-
if (qos == 0) wait = 0;
784769

785770
int retain = 0;
786771
if (n_args == 5) retain = mp_obj_is_true(args[4]);
@@ -793,12 +778,6 @@ STATIC mp_obj_t mqtt_op_publish(mp_uint_t n_args, const mp_obj_t *args)
793778
self->client->config->user_context = NULL;
794779
return mp_const_false;
795780
}
796-
while ((wait > 0) && (self->publish_flag == 0)) {
797-
vTaskDelay(10 / portTICK_PERIOD_MS);
798-
wait -= 10;
799-
}
800-
self->client->config->user_context = NULL;
801-
802781
return mp_const_true;
803782
}
804783
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mqtt_publish_obj, 3, 5, mqtt_op_publish);
@@ -845,12 +824,15 @@ STATIC mp_obj_t mqtt_op_stop(mp_obj_t self_in)
845824
}
846825
MP_DEFINE_CONST_FUN_OBJ_1(mqtt_stop_obj, mqtt_op_stop);
847826

848-
//--------------------------------------------
827+
//---------------------------------------------
849828
STATIC mp_obj_t mqtt_op_start(mp_obj_t self_in)
850829
{
851830
mqtt_obj_t *self = MP_OBJ_TO_PTR(self_in);
852831

853832
if ((self->client) && (self->client->state < MQTT_STATE_INIT)) {
833+
if (self->client->connect_info.clean_session) {
834+
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Client not in persistent session, free and create again"));
835+
}
854836
int res = esp_mqtt_client_start(self->client);
855837
if (res != 0) {
856838
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Error starting client"));
@@ -899,6 +881,15 @@ STATIC mp_obj_t mqtt_op_free(mp_obj_t self_in)
899881
}
900882
MP_DEFINE_CONST_FUN_OBJ_1(mqtt_free_obj, mqtt_op_free);
901883

884+
//-----------------------------------------------------------
885+
STATIC mp_obj_t mqtt_debug(mp_obj_t self_in, mp_obj_t enable)
886+
{
887+
//mqtt_obj_t *self = MP_OBJ_TO_PTR(self_in);
888+
transport_debug = mp_obj_is_true(enable);
889+
return mp_const_none;
890+
}
891+
MP_DEFINE_CONST_FUN_OBJ_2(mqtt_debug_obj, mqtt_debug);
892+
902893

903894
//=========================================================
904895
STATIC const mp_rom_map_elem_t mqtt_locals_dict_table[] = {
@@ -910,6 +901,7 @@ STATIC const mp_rom_map_elem_t mqtt_locals_dict_table[] = {
910901
{ MP_ROM_QSTR(MP_QSTR_stop), (mp_obj_t)&mqtt_stop_obj },
911902
{ MP_ROM_QSTR(MP_QSTR_start), (mp_obj_t)&mqtt_start_obj },
912903
{ MP_ROM_QSTR(MP_QSTR_free), (mp_obj_t)&mqtt_free_obj },
904+
{ MP_ROM_QSTR(MP_QSTR_debug), (mp_obj_t)&mqtt_debug_obj },
913905
};
914906
STATIC MP_DEFINE_CONST_DICT(mqtt_locals_dict, mqtt_locals_dict_table);
915907

k210-freertos/mpy_support/standard_lib/network/modwifi.c

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static void _check_wifi_response(char* data, size_t size)
637637
if (position < 2) {
638638
position = uart_buf_find(mpy_uarts[wifi_uart_num].uart_buf, buflen, ",TCPconnect:", 12, NULL);
639639
if (position >= 3) {
640-
// detected, get the full command
640+
// TCP Server connection detected, get the full command
641641
type = 1;
642642
int cmd_end = -1;
643643
while (cmd_end < 0) {
@@ -681,7 +681,8 @@ static void _check_wifi_response(char* data, size_t size)
681681

682682
if (type == 0) {
683683
// CIP Connect is not supported
684-
_close_socket(link_id, true);
684+
if (wifi_debug) LOGY(WIFI_TASK_TAG, "Unsupported connection type! (%s)", data);
685+
_close_socket(link_id, false);
685686
goto check_again;
686687
}
687688

@@ -1325,9 +1326,19 @@ int wifi_connect(socket_obj_t *sock, const char *host, int port, int localport)
13251326
int keep_alive = 0;
13261327
char cmd[256];
13271328
char type[8];
1328-
if (sock->proto == IPPROTO_UDP) sprintf(type, "UDP");
1329-
else if (sock->proto == WIFI_IPPROTO_SSL) sprintf(type, "SSL");
1330-
else sprintf(type, "TCP");
1329+
char response[16] = {'\0'};
1330+
if (sock->proto == IPPROTO_UDP) {
1331+
sprintf(type, "UDP");
1332+
sprintf(response, "\r\nOK\r\n");
1333+
}
1334+
else if (sock->proto == WIFI_IPPROTO_SSL) {
1335+
sprintf(type, "SSL");
1336+
sprintf(response, "%d,CONNECT\r\n", sock->link_id);
1337+
}
1338+
else {
1339+
sprintf(type, "TCP");
1340+
sprintf(response, "%d,CONNECT\r\n", sock->link_id);
1341+
}
13311342
if (sock->proto != IPPROTO_UDP) keep_alive = 3;
13321343

13331344
if (sock->proto != IPPROTO_UDP)
@@ -1338,10 +1349,10 @@ int wifi_connect(socket_obj_t *sock, const char *host, int port, int localport)
13381349
}
13391350
memset(&at_responses, 0, sizeof(at_responses_t));
13401351
memset(&at_command, 0, sizeof(at_command_t));
1341-
at_responses.nresp = 2;
1342-
at_responses.resp[0] = AT_OK_Str;
1352+
at_responses.nresp = 3;
1353+
at_responses.resp[0] = response;
13431354
at_responses.resp[1] = AT_Error_Str;
1344-
//at_responses.resp[2] = "CONNECTED";
1355+
at_responses.resp[2] = "\r\n+TCPSTART";
13451356
at_command.cmd = cmd;
13461357
at_command.cmdSize = -1;
13471358
at_command.responses = &at_responses;
@@ -1505,7 +1516,7 @@ int wifi_close(socket_obj_t *sock)
15051516
static int _wifi_send(socket_obj_t *sock, const char *data, size_t data_len, const char *host, int port)
15061517
{
15071518
if ((at_sockets[sock->fd] != sock) || (at_sockets[sock->fd]->peer_closed)) {
1508-
if (wifi_debug) LOGE(WIFI_TAG, "Send: Not a socket");
1519+
if (wifi_debug) LOGE(WIFI_TAG, "Send: Not a socket %d (%d, %d)", sock->fd, (at_sockets[sock->fd] != sock), (at_sockets[sock->fd]->peer_closed));
15091520
errno = ENOTSOCK;
15101521
return -1;
15111522
}

0 commit comments

Comments
 (0)