[riot-notifications] [RIOT-OS/RIOT] tools/zep_dispatch: add support for advanced topologies (#15773)

Francisco notifications at github.com
Tue Jul 6 10:34:12 CEST 2021


@fjmolinas commented on this pull request.



> +                       int sock, struct sockaddr_in6 *src_addr)
+{
+    list_node_t *head = ctx;
+    char addr_str[INET6_ADDRSTRLEN];
+
+    /* send packet to all other clients */
+    bool known_node = false;
+    list_node_t *prev = head;
+    for (list_node_t* n = head->next; n; n = n->next) {
+        struct sockaddr_in6 *addr = &container_of(n, zep_client_t, node)->addr;
+
+        /* don't echo packet back to sender */
+        if (memcmp(src_addr, addr, sizeof(*addr)) == 0) {
+            known_node = true;
+        /* remove client if sending fails */
+        } else if (sendto(sock, buffer, len, 0, (struct sockaddr*)addr, sizeof(*addr)) < 0) {

Can you uncrustify?

-- 
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/15773#pullrequestreview-699681946
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210706/103ee48a/attachment.htm>


More information about the notifications mailing list