[riot-notifications] [RIOT-OS/RIOT] examples: add Wakaama/LwM2M example client (#8610)

Raul Fuentes notifications at github.com
Mon Feb 26 18:16:20 CET 2018

rfuentess commented on this pull request.

> @@ -130,12 +130,9 @@ char *security_get_key(lwm2m_object_t *obj, int keyType, int instanceId, int *le
 /********************* Security Obj Helpers Ends **********************/
 int send_data(dtls_connection_t *connP, uint8_t *buffer, size_t length) {
-   char addr_str[IPV6_ADDR_MAX_STR_LEN];
-   if (ipv6_addr_to_str(addr_str, &(connP->addr), sizeof(addr_str)) == NULL) {
-      return -1;
-   }
-   if (gnrc_sending(addr_str, (char *)buffer, length,
-                    connP->dtlsSession->port) != 1) {
+   length = sock_udp_send(&(connP->sock), buffer, length, NULL);

It's seems that the problem that you are having with sock is that you never creates the remote end point. Or at least you don't link it to  `sock_udp_create()` [[1](https://riot-os.org/api/group__net__sock__udp.html#ga20fa4b890dff1c97a63075090e6f9d7d)]  or `sock_udp_send()`  [[2](https://riot-os.org/api/group__net__sock__udp.html#ga89562920ad89fe0e098fc989e3b064ec)]. 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180226/093528ac/attachment.html>

More information about the notifications mailing list