diff options
author | Mattias Andrée <maandree@kth.se> | 2017-10-24 17:34:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-10-24 17:44:26 +0200 |
commit | 9f9a554afa4c23284ee624e901e5841ab6636f0d (patch) | |
tree | ec2ab72871d1b7aaace9a7956df47f2d04107f7b /test.c | |
parent | Update readme (diff) | |
download | sbus-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |