]> git.meshlink.io Git - meshlink/blobdiff - examples/chatpp.cc
Don't use assert() to check the results of pthread_*() calls.
[meshlink] / examples / chatpp.cc
index 10870ef55a85b635a725dfbecf2cca31fcf49f94..294ca866f602fb692eb6e37c39b8c817a07fd950 100644 (file)
@@ -49,7 +49,7 @@ static void parse_command(meshlink::mesh *mesh, char *buf) {
                        return;
                }
 
-               invitation = mesh->invite(arg);
+               invitation = mesh->invite(NULL, arg);
 
                if(!invitation) {
                        fprintf(stderr, "Could not invite '%s': %s\n", arg, meshlink::strerror());
@@ -99,7 +99,7 @@ static void parse_command(meshlink::mesh *mesh, char *buf) {
                        if(!nodes) {
                                fprintf(stderr, "Could not get list of nodes: %s\n", meshlink::strerror());
                        } else {
-                               printf("%zu known nodes:", nnodes);
+                               printf("%lu known nodes:", (unsigned long)nnodes);
 
                                for(size_t i = 0; i < nnodes; i++) {
                                        printf(" %s", nodes[i]->name);