X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fimport-export.c;h=411a7a21ce0e3b4575dc5521fc8108158a8796d4;hb=79703f03cde61be1023813486ed3a9521b88f689;hp=f2229589ab5da907870561820df3fc5e8bff3814;hpb=e84f94c95b02f1ab18f0ab09e8cdc9427b00df14;p=meshlink diff --git a/test/import-export.c b/test/import-export.c index f2229589..411a7a21 100644 --- a/test/import-export.c +++ b/test/import-export.c @@ -15,18 +15,23 @@ void status_cb(meshlink_handle_t *mesh, meshlink_node_t *node, bool reachable) { int main(int argc, char *argv[]) { // Open two new meshlink instance. - meshlink_handle_t *mesh1 = meshlink_open("import_export_conf.1", "foo", "import-export"); + meshlink_handle_t *mesh1 = meshlink_open("import_export_conf.1", "foo", "import-export", DEV_CLASS_BACKBONE); if(!mesh1) { fprintf(stderr, "Could not initialize configuration for foo\n"); return 1; } - meshlink_handle_t *mesh2 = meshlink_open("import_export_conf.2", "bar", "import-export"); + meshlink_handle_t *mesh2 = meshlink_open("import_export_conf.2", "bar", "import-export", DEV_CLASS_BACKBONE); if(!mesh2) { fprintf(stderr, "Could not initialize configuration for bar\n"); return 1; } + // Disable local discovery + + meshlink_enable_discovery(mesh1, false); + meshlink_enable_discovery(mesh2, false); + // Import and export both side's data meshlink_add_address(mesh1, "localhost"); @@ -62,7 +67,7 @@ int main(int argc, char *argv[]) { // Start both instances meshlink_set_node_status_cb(mesh1, status_cb); - + if(!meshlink_start(mesh1)) { fprintf(stderr, "Foo could not start\n"); return 1;