[riot-notifications] [RIOT-OS/RIOT] pkg/openwsn/sock: fix sock_udp_close handling (#15838)

Martine Lenders notifications at github.com
Fri Jan 22 17:02:44 CET 2021


@miri64 requested changes on this pull request.



>      if (_udp_socket_list == NULL) {
         return;
     }
     if (sock) {
+        /* drop messages in mbox if any */
+        while(mbox_try_get(&sock->mbox, &msg)) {

Vera++ is complaining here:

```suggestion
        while (mbox_try_get(&sock->mbox, &msg)) {
```

> +    expect(0 == sock_udp_create(&_sock, &local, &remote, SOCK_FLAGS_REUSE_EP));
+    expect(_inject_packet(&src_addr, &dst_addr, _TEST_PORT_REMOTE,
+                            _TEST_PORT_LOCAL, test_data, sizeof(test_data),
+                            _TEST_NETIF));
+    sock_udp_close(&_sock);
+    expect(_check_net());

How is this test checking that the queue is clean? Should we add it to `tests/{gnrc,lwip}_sock_udp` etc. as well?

-- 
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/15838#pullrequestreview-574389711
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210122/e768c80f/attachment-0001.htm>


More information about the notifications mailing list