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

moenoel notifications at github.com
Thu Feb 22 14:07:12 CET 2018


moenoel commented on this pull request.



> +}
+
+dtls_connection_t *connection_new_incoming(dtls_connection_t *connList,
+                                           const ipv6_addr_t *addr,
+                                           unsigned short rem_port) {
+   dtls_connection_t *connP;
+
+   connP = (dtls_connection_t *)malloc(sizeof(dtls_connection_t));
+   if (connP != NULL) {
+      memset(connP, 0, sizeof(dtls_connection_t));
+      memcpy(&(connP->addr), addr, sizeof(ipv6_addr_t));
+      connP->addrLen = sizeof(ipv6_addr_t);
+      connP->next = connList;
+      connP->noSec = false;
+
+      connP->dtlsSession = (session_t *)malloc(sizeof(session_t));

The Wakaama package itself uses malloc/free as well, so it would probably be a relatively big undertaking to move all that to memarray. Not sure that falls under the scope of this pull request, especially since memarray isn't merged yet.

-- 
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/pull/8610#discussion_r169948909
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180222/f5017df7/attachment.html>


More information about the notifications mailing list