12
This commit is contained in:
@@ -176,8 +176,8 @@ void qdx_port_sock_recv_notify(uint8_t sockid)
|
||||
total += len;
|
||||
if (err != WCHNET_ERR_SUCCESS) break;
|
||||
}
|
||||
DBG_PORT("recv_notify sock%d: %lu bytes, ring=%d\r\n",
|
||||
sockid, total, ring_available(&ctx->rx_ring));
|
||||
DBG_PORT("recv_notify sock%d: %u bytes, ring=%u\r\n",
|
||||
sockid, (unsigned)total, (unsigned)ring_available(&ctx->rx_ring));
|
||||
/* Wake blocking recv thread */
|
||||
xSemaphoreGive(ctx->rx_sem);
|
||||
}
|
||||
@@ -268,8 +268,8 @@ int8_t qdx_port_thread_create(const char *name, qdx_thread_entry_t entry,
|
||||
BaseType_t ret = xTaskCreate((TaskFunction_t)entry, name,
|
||||
(uint16_t)stack_words, arg,
|
||||
(UBaseType_t)priority, NULL);
|
||||
DBG_PORT("thread_create \"%s\" stack=%lu pri=%d -> %s\r\n",
|
||||
name, stack_words, priority, (ret == pdPASS) ? "OK" : "FAIL");
|
||||
DBG_PORT("thread_create \"%s\" stack=%d pri=%d -> %s\r\n",
|
||||
name, (int)stack_words, (int)priority, (ret == pdPASS) ? "OK" : "FAIL");
|
||||
return (ret == pdPASS) ? 0 : -1;
|
||||
}
|
||||
|
||||
@@ -343,14 +343,14 @@ qdx_socket_t qdx_port_tcp_connect(const char *ip, uint16_t port)
|
||||
uint32_t elapsed = (xTaskGetTickCount() - t0) * portTICK_PERIOD_MS;
|
||||
|
||||
if (sem_ret != pdTRUE) {
|
||||
DBG_PORT("connect_sem TIMEOUT after %lu ms -> %d.%d.%d.%d:%d\r\n",
|
||||
elapsed, dest_ip[0], dest_ip[1], dest_ip[2], dest_ip[3], port);
|
||||
DBG_PORT("connect_sem TIMEOUT after %d ms -> %d.%d.%d.%d:%d\r\n",
|
||||
(int)elapsed, dest_ip[0], dest_ip[1], dest_ip[2], dest_ip[3], port);
|
||||
DBG_PORT(" ctx->connected=%d wchnet_id=%d\r\n", ctx->connected, wchnet_id);
|
||||
WCHNET_SocketClose(wchnet_id, 0);
|
||||
free_sock_ctx(ctx);
|
||||
return NULL;
|
||||
}
|
||||
DBG_PORT("connect_sem got after %lu ms, connected=%d\r\n", elapsed, ctx->connected);
|
||||
DBG_PORT("connect_sem got after %d ms, connected=%d\r\n", (int)elapsed, ctx->connected);
|
||||
|
||||
if (!ctx->connected) {
|
||||
WCHNET_SocketClose(wchnet_id, 0);
|
||||
|
||||
@@ -141,7 +141,6 @@ static void tcp_send_handshake(TcpStreamCtx_t *ctx) {
|
||||
}
|
||||
|
||||
static void tcp_send_heartbeat(TcpStreamCtx_t *ctx) {
|
||||
DBG_LOGIC("[%s] heartbeat\r\n", ctx->label);
|
||||
uint8_t payload[6];
|
||||
qdx_write_u32_le(payload + 0, qdx_port_get_tick_ms());
|
||||
payload[4] = 10; /* Placeholder CpuLoad */
|
||||
|
||||
Reference in New Issue
Block a user