X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fbasicpp.cpp;h=ed2815a1ce3a4857b79b9d9ffd8c4d2eb5dbb90d;hb=5f7b734ef1a6a22a537c3ee3b29c8095fa9a803e;hp=c52e2ddbb3014827108b302330ddbdcfc5a11aff;hpb=252c9cab3fea05aebb42a1751d5565748b869cb2;p=meshlink diff --git a/test/basicpp.cpp b/test/basicpp.cpp index c52e2ddb..ed2815a1 100644 --- a/test/basicpp.cpp +++ b/test/basicpp.cpp @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) { // Check that our own node exists. - meshlink::node *self = mesh.get_node("foo"); + meshlink::node *self = mesh.get_self(); if(!self) { cerr << "Foo does not know about itself\n"; return 1; @@ -25,6 +25,10 @@ int main(int argc, char *argv[]) { return 1; } + // Disable local discovery. + + mesh.enable_discovery(false); + // Start and stop the mesh. if(!mesh.start()) { @@ -54,7 +58,7 @@ int main(int argc, char *argv[]) { return 1; } - self = mesh.get_node("foo"); + self = mesh.get_self(); if(!self) { cerr << "Foo doesn't know about itself the second time\n"; return 1; @@ -66,6 +70,8 @@ int main(int argc, char *argv[]) { // Start and stop the mesh. + mesh.enable_discovery(false); + if(!mesh.start()) { cerr << "Foo could not start a third time\n"; return 1;