mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-13 10:15:00 +00:00
minor tweaks
This commit is contained in:
1 parent
beb73a65a9
commit
c288ac1f38
4 files changed
+4
-6
No files matched your search
+2
-2
@@ -714,7 +714,7 @@ bool mg_wakeup(struct mg_mgr *mgr, unsigned long conn_id, const void *buf,
|
||||
if (mgr->pipe.q == NULL || conn_id == 0) return false;
|
||||
m = (struct wumsg *) calloc(1, sizeof(*m) + len);
|
||||
if (m == NULL) {
|
||||
MG_ERROR("OOM");
|
||||
MG_ERROR(("OOM"));
|
||||
return false;
|
||||
}
|
||||
m->id = conn_id;
|
||||
@@ -722,7 +722,7 @@ bool mg_wakeup(struct mg_mgr *mgr, unsigned long conn_id, const void *buf,
|
||||
memcpy(m->data, buf, len);
|
||||
if (xQueueSend((QueueHandle_t) mgr->pipe.q, &m, 0) != pdTRUE) {
|
||||
free(m);
|
||||
MG_ERROR("xQueueSend");
|
||||
MG_ERROR(("xQueueSend"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -4903,7 +4903,6 @@ struct mg_tcpip_spi {
|
||||
#else
|
||||
#include <errno.h>
|
||||
typedef unsigned int socklen_t;
|
||||
typedef int ssize_t;
|
||||
typedef uint32_t in_addr_t;
|
||||
struct in_addr { in_addr_t s_addr; };
|
||||
struct in6_addr { uint8_t s6_addr[16]; };
|
||||
|
||||
@@ -593,7 +593,7 @@ bool mg_wakeup(struct mg_mgr *mgr, unsigned long conn_id, const void *buf,
|
||||
if (mgr->pipe.q == NULL || conn_id == 0) return false;
|
||||
m = (struct wumsg *) calloc(1, sizeof(*m) + len);
|
||||
if (m == NULL) {
|
||||
MG_ERROR("OOM");
|
||||
MG_ERROR(("OOM"));
|
||||
return false;
|
||||
}
|
||||
m->id = conn_id;
|
||||
@@ -601,7 +601,7 @@ bool mg_wakeup(struct mg_mgr *mgr, unsigned long conn_id, const void *buf,
|
||||
memcpy(m->data, buf, len);
|
||||
if (xQueueSend((QueueHandle_t) mgr->pipe.q, &m, 0) != pdTRUE) {
|
||||
free(m);
|
||||
MG_ERROR("xQueueSend");
|
||||
MG_ERROR(("xQueueSend"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user