aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nng.c2
-rw-r--r--src/nng.h2
-rw-r--r--src/protocol/pair0/pair.c1
-rw-r--r--src/protocol/pipeline0/pull.c1
-rw-r--r--src/protocol/pipeline0/push.c1
-rw-r--r--src/supplemental/util/options.c4
6 files changed, 9 insertions, 2 deletions
diff --git a/src/nng.c b/src/nng.c
index b906431b..c2e3161d 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -732,6 +732,8 @@ static const struct {
{ NNG_EWRITEONLY, "Write only resource" },
{ NNG_ECRYPTO, "Cryptographic error" },
{ NNG_EPEERAUTH, "Peer could not be authenticated" },
+ { NNG_ENOARG, "Option requires argument" },
+ { NNG_EAMBIGUOUS, "Ambiguous option" },
{ NNG_EINTERNAL, "Internal error detected" },
{ 0, NULL },
// clang-format on
diff --git a/src/nng.h b/src/nng.h
index 779612c7..b3acc86c 100644
--- a/src/nng.h
+++ b/src/nng.h
@@ -590,6 +590,8 @@ enum nng_errno_enum {
NNG_EWRITEONLY = 25,
NNG_ECRYPTO = 26,
NNG_EPEERAUTH = 27,
+ NNG_ENOARG = 28,
+ NNG_EAMBIGUOUS = 29,
NNG_EINTERNAL = 1000,
NNG_ESYSERR = 0x10000000,
NNG_ETRANERR = 0x20000000,
diff --git a/src/protocol/pair0/pair.c b/src/protocol/pair0/pair.c
index 10498c0a..d3591df9 100644
--- a/src/protocol/pair0/pair.c
+++ b/src/protocol/pair0/pair.c
@@ -12,6 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
+#include "protocol/pair0/pair.h"
// Pair protocol. The PAIR protocol is a simple 1:1 messaging pattern.
// While a peer is connected to the server, all other peer connection
diff --git a/src/protocol/pipeline0/pull.c b/src/protocol/pipeline0/pull.c
index 76c680c1..ccc1ef40 100644
--- a/src/protocol/pipeline0/pull.c
+++ b/src/protocol/pipeline0/pull.c
@@ -12,6 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
+#include "protocol/pipeline0/pull.h"
// Pull protocol. The PULL protocol is the "read" side of a pipeline.
diff --git a/src/protocol/pipeline0/push.c b/src/protocol/pipeline0/push.c
index 1e6cf30e..e77bfe99 100644
--- a/src/protocol/pipeline0/push.c
+++ b/src/protocol/pipeline0/push.c
@@ -12,6 +12,7 @@
#include <string.h>
#include "core/nng_impl.h"
+#include "protocol/pipeline0/push.h"
// Push protocol. The PUSH protocol is the "write" side of a pipeline.
// Push distributes fairly, or tries to, by giving messages in round-robin
diff --git a/src/supplemental/util/options.c b/src/supplemental/util/options.c
index d8f78deb..a8cc969d 100644
--- a/src/supplemental/util/options.c
+++ b/src/supplemental/util/options.c
@@ -90,7 +90,7 @@ nng_opts_parse(int argc, const char **argv, const nng_optspec *opts, int *val,
break;
default:
// Ambiguous (not match)
- return (NNG_EINVAL);
+ return (NNG_EAMBIGUOUS);
break;
}
@@ -113,7 +113,7 @@ nng_opts_parse(int argc, const char **argv, const nng_optspec *opts, int *val,
} else {
i++;
if (i >= argc) {
- return (NNG_EINVAL);
+ return (NNG_ENOARG);
}
*optarg = argv[i];
}