[riot-notifications] [RIOT-OS/RIOT] asymcute die because of dead lock? (#11811)

jhx2002 notifications at github.com
Sat Jul 6 11:10:09 CEST 2019


I copy and modify  asymcute_publish to asymcute_publish2.
The problem exist too. 

```
int asymcute_publish2(asymcute_con_t *con, asymcute_req_t *req,
                      const asymcute_topic_t *topic,
                      const void *data, size_t data_len, uint8_t flags)
{
    assert(con);
    assert(req);
    assert(topic);
    assert((data_len == 0) || data);

    int ret = ASYMCUTE_OK;

   /* assemble message */
    size_t pos = _len_set(req->data, data_len + 6);
    req->data[pos] = MQTTSN_PUBLISH;
    req->data[pos + 1] = (flags | topic->flags);
    byteorder_htobebufs(&req->data[pos + 2], topic->id);
    byteorder_htobebufs(&req->data[pos + 4], req->msg_id);
    memcpy(&req->data[pos + 6], data, data_len);
    req->data_len = (pos + 6 + data_len);

    sock_udp_send(&con->sock, req->data, req->data_len, &con->server_ep);

    return ret;
}


```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11811#issuecomment-508910306
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190706/93e7497d/attachment.html>


More information about the notifications mailing list