summaryrefslogtreecommitdiff
path: root/tests/device.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-18 12:46:31 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-18 12:46:31 -0700
commit8b979454d891b84da727a329906c4293fadc5f3c (patch)
treecb491c476080de11c7fc5b5868579f4ef86f4df4 /tests/device.c
parent3a2af394a7d94ac5f924aaea6cbad825a9b05d75 (diff)
downloadnng-8b979454d891b84da727a329906c4293fadc5f3c.tar.gz
nng-8b979454d891b84da727a329906c4293fadc5f3c.tar.bz2
nng-8b979454d891b84da727a329906c4293fadc5f3c.zip
fixes #295 boolean options should use C99 bool type
fixes #275 nng_pipe_getopt_ptr() missing? fixes #285 nng_setopt_ptr MIS fixes #297 nng_listener/dialer_close does not validate mode This change adds some missing APIs, and changes others. In particular, certain options are now of type bool, with size of just one. This is a *breaking* change for code that uses those options -- NNG_OPT_RAW, NNG_OPT_PAIR1_POLY, NNG_OPT_TLS_VERIFIED.
Diffstat (limited to 'tests/device.c')
-rw-r--r--tests/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/device.c b/tests/device.c
index 535371e6..c177a2e5 100644
--- a/tests/device.c
+++ b/tests/device.c
@@ -11,8 +11,8 @@
#include "convey.h"
#include "nng.h"
#include "protocol/pair1/pair.h"
-#include "supplemental/util/platform.h"
#include "stubs.h"
+#include "supplemental/util/platform.h"
#include <string.h>
@@ -54,8 +54,8 @@ Main({
So(nng_pair1_open(&dev1) == 0);
So(nng_pair1_open(&dev2) == 0);
- So(nng_setopt_int(dev1, NNG_OPT_RAW, 1) == 0);
- So(nng_setopt_int(dev2, NNG_OPT_RAW, 1) == 0);
+ So(nng_setopt_bool(dev1, NNG_OPT_RAW, true) == 0);
+ So(nng_setopt_bool(dev2, NNG_OPT_RAW, true) == 0);
struct dev_data ddata;
ddata.s1 = dev1;