]> git.meshlink.io Git - meshlink/blobdiff - src/net_setup.c
Add an error callback.
[meshlink] / src / net_setup.c
index 367ccd293857f98162b50ba4a8a4afda5f3be217..b4a16c7e17fd782341db34bd256c9754c1c7fd8b 100644 (file)
@@ -270,7 +270,13 @@ bool node_write_config(meshlink_handle_t *mesh, node_t *n) {
        }
 
        config_t config = {buf, packmsg_output_size(&out, buf)};
-       return config_write(mesh, "current", n->name, &config, mesh->config_key);
+
+       if(!config_write(mesh, "current", n->name, &config, mesh->config_key)) {
+               call_error_cb(mesh);
+               return false;
+       }
+
+       return true;
 }
 
 static bool load_node(meshlink_handle_t *mesh, const char *name, void *priv) {