- mesh = meshlink_open("basic_conf", "bar", "basic");
- if(!mesh) {
- fprintf(stderr, "Could not open configuration for foo a second time\n");
- return 1;
- }
-
- if(meshlink_get_node(mesh, "bar")) {
- fprintf(stderr, "Foo knows about bar, it shouldn't\n");
- return 1;
- }
-
- self = meshlink_get_node(mesh, "foo");
- if(!self) {
- fprintf(stderr, "Foo doesn't know about itself the second time\n");
- return 1;
- }
- if(strcmp(self->name, "foo")) {
- fprintf(stderr, "Foo thinks its name is %s the second time\n", self->name);
- return 1;
- }
+ assert(!meshlink_get_node(mesh, "bar"));
+ self = meshlink_get_self(mesh);
+ assert(self);
+ assert(!strcmp(self->name, "foo"));