mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-07 16:01:30 +00:00
Fix #1505: let mg_wakeup() return status
This commit is contained in:
1 parent
a65c3288d8
commit
4474ada291
5 files changed
+10
-12
No files matched your search
+3
-4
@@ -413,11 +413,10 @@ static bool mg_socketpair(SOCKET sp[2], union usa usa[2]) {
|
||||
return result;
|
||||
}
|
||||
|
||||
void mg_mgr_wakeup(struct mg_connection *c, const void *buf, size_t len) {
|
||||
bool mg_mgr_wakeup(struct mg_connection *c, const void *buf, size_t len) {
|
||||
if (buf == NULL || len == 0) buf = (void *) "", len = 1;
|
||||
if ((size_t) send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len,
|
||||
MSG_NONBLOCKING) != len)
|
||||
(void) 0;
|
||||
return (size_t) send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len,
|
||||
MSG_NONBLOCKING) == len;
|
||||
}
|
||||
|
||||
static void pf1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
|
||||
Reference in new issue
Block a user