]> git.meshlink.io Git - meshlink/blobdiff - src/net_setup.c
Fix __warn_unused_result__, add more of it and fix the resulting warnings.
[meshlink] / src / net_setup.c
index aeceb1f892d00fb58789fc25415674aea34b845c..559f0496579ba38540c01635416160ca60c2d2a8 100644 (file)
@@ -116,7 +116,6 @@ bool node_read_public_key(meshlink_handle_t *mesh, node_t *n) {
                n->recent[i + known_count] = packmsg_get_sockaddr(&in);
        }
 
-
        config_free(&config);
        return true;
 }
@@ -233,6 +232,7 @@ bool node_write_config(meshlink_handle_t *mesh, node_t *n) {
        }
 
        if(!packmsg_output_ok(&out)) {
+               meshlink_errno = MESHLINK_EINTERNAL;
                return false;
        }
 
@@ -402,7 +402,9 @@ bool setup_myself(meshlink_handle_t *mesh) {
 
        graph(mesh);
 
-       config_scan_all(mesh, "current", "hosts", load_node, NULL);
+       if(!config_scan_all(mesh, "current", "hosts", load_node, NULL)) {
+               logger(mesh, MESHLINK_WARNING, "Could not scan all host config files");
+       }
 
        /* Open sockets */