]> git.meshlink.io Git - meshlink/commitdiff
Correctly update device class when receiving an ADD_EDGE message.
authorGuus Sliepen <guus@meshlink.io>
Sat, 3 Aug 2019 20:56:40 +0000 (22:56 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 4 Aug 2019 10:23:08 +0000 (12:23 +0200)
In some cases we didn't update the device class information when receiving
an ADD_EDGE message. This could cause autoconnect to fail to work as
expected.

src/protocol_edge.c

index 405961ed7f508791b179aae761e91c91ca695d37..12ab228f664e033dfa0f6c8480523de5d420c83f 100644 (file)
@@ -180,6 +180,8 @@ bool add_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
                node_add(mesh, to);
        }
 
+       to->devclass = to_devclass;
+
        /* Convert addresses */
 
        address = str2sockaddr(to_address, to_port);