aboutsummaryrefslogtreecommitdiffstats
path: root/test.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-24 17:34:31 +0200
committerMattias Andrée <maandree@kth.se>2017-10-24 17:44:26 +0200
commit9f9a554afa4c23284ee624e901e5841ab6636f0d (patch)
treeec2ab72871d1b7aaace9a7956df47f2d04107f7b /test.c
parentUpdate readme (diff)
downloadsbus-9f9a554afa4c23284ee624e901e5841ab6636f0d.tar.gz
sbus-9f9a554afa4c23284ee624e901e5841ab6636f0d.tar.bz2
sbus-9f9a554afa4c23284ee624e901e5841ab6636f0d.tar.xz
Use / instead of .
This is more like file path and allows inclusion of package names (and file paths too if you want that for some reason) in the routing key.
Diffstat (limited to 'test.c')
-rw-r--r--test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.c b/test.c
index 43864b8..c2ba2a8 100644
--- a/test.c
+++ b/test.c
@@ -258,17 +258,17 @@ check(int fd)
size_t i;
alarm(1);
- assert(!libsbus_subscribe(fd, "test.", 0, buf));
+ assert(!libsbus_subscribe(fd, "test/", 0, buf));
assert(!libsbus_subscribe(fd, "discard", 0, buf));
assert(!libsbus_unsubscribe(fd, "discard", 0, buf));
assert(!libsbus_publish(fd, "discard", "not caught", strlen("not caught"), 0, buf));
for (i = 0; i < 100; i++) {
- sprintf(key, "test.%zu", i);
+ sprintf(key, "test/%zu", i);
sprintf(msg, "%zu", i);
assert(!libsbus_publish(fd, key, msg, strlen(msg), 0, buf));
}
for (i = 0; i < 100; i++) {
- sprintf(key, "test.%zu", i);
+ sprintf(key, "test/%zu", i);
sprintf(msg, "%zu", i);
assert(!libsbus_receive(fd, 0, buf, &packet));
assert(packet.type == LIBSBUS_MESSAGE);