[riot-notifications] [RIOT-OS/RIOT] examples/cord_epsim: change default RD server addr handling (#10464)

Hauke Petersen notifications at github.com
Tue Mar 26 15:47:28 CET 2019


haukepetersen commented on this pull request.



> @@ -33,18 +34,23 @@
 static coap_pkt_t pkt;
 static uint8_t buf[BUFSIZE];
 
-int cord_epsim_register(void)
+/* keep state of the latest registration attempt */
+static int _state = CORD_EPSIM_ERROR;
+
+static void _req_handler(unsigned req_state, coap_pkt_t* pdu,
+                         sock_udp_ep_t *remote)
+{
+    (void)remote;
+    (void)pdu;
+    _state = (req_state == GCOAP_MEMO_RESP) ? CORD_EPSIM_OK : CORD_EPSIM_ERROR;
+}
+
+int cord_epsim_register(const sock_udp_ep_t *rd_ep)

fixed

-- 
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/10464#discussion_r269142113
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190326/5cca555b/attachment.html>


More information about the notifications mailing list