diff options
| author | Vincent Nonnenmacher <vincent.nonnenmacher@gmail.com> | 2018-03-16 15:06:34 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-19 14:27:57 -0700 |
| commit | 9b886a9999247d87c9f6d389c3e65a4bd39be010 (patch) | |
| tree | 5616f0a44748b6f10deb202bbddfabb618d1545e /src/supplemental | |
| parent | 8d8494ad6b2a10e5439b7a4bd621465c57ca9a27 (diff) | |
| download | nng-9b886a9999247d87c9f6d389c3e65a4bd39be010.tar.gz nng-9b886a9999247d87c9f6d389c3e65a4bd39be010.tar.bz2 nng-9b886a9999247d87c9f6d389c3e65a4bd39be010.zip | |
Fixes issues found by (and submitted by) @nonnenmacher when working
on a python wrapper (cffi).
Mostly this is fixing inconsistencies in our public API and the actual
implementation.
Diffstat (limited to 'src/supplemental')
| -rw-r--r-- | src/supplemental/http/http_public.c | 22 | ||||
| -rw-r--r-- | src/supplemental/tls/none/tls.c | 16 |
2 files changed, 37 insertions, 1 deletions
diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index 2d879807..7107c029 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -574,6 +574,16 @@ nng_http_handler_set_host(nng_http_handler *h, const char *host) #endif } +int nng_http_handler_set_tree(nng_http_handler *h) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_handler_set_tree(h)); +#else + NNI_ARG_UNUSED(h); + return (NNG_ENOTSUP); +#endif +} + int nng_http_handler_set_data(nng_http_handler *h, void *dat, void (*dtor)(void *)) { @@ -588,7 +598,7 @@ nng_http_handler_set_data(nng_http_handler *h, void *dat, void (*dtor)(void *)) } void * -nng_handler_get_data(nng_http_handler *h) +nng_http_handler_get_data(nng_http_handler *h) { #ifdef NNG_SUPP_HTTP return (nni_http_handler_get_data(h)); @@ -688,6 +698,16 @@ nng_http_server_get_tls(nng_http_server *srv, nng_tls_config **cfgp) #endif } +int nng_http_hijack(nng_http_conn * conn) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_hijack(conn)); +#else + NNI_ARG_UNUSED(conn); + return (NNG_ENOTSUP); +#endif +} + int nng_http_client_alloc(nng_http_client **clip, const nng_url *url) { diff --git a/src/supplemental/tls/none/tls.c b/src/supplemental/tls/none/tls.c index a11bd3fa..2fdc0c93 100644 --- a/src/supplemental/tls/none/tls.c +++ b/src/supplemental/tls/none/tls.c @@ -163,6 +163,22 @@ nng_tls_config_cert_key_file( return (NNG_ENOTSUP); } +int nng_tls_config_key(nng_tls_config *cfg, const uint8_t * key, size_t size) +{ + NNI_ARG_UNUSED(cfg); + NNI_ARG_UNUSED(key); + NNI_ARG_UNUSED(size); + return (NNG_ENOTSUP); +} + +int nng_tls_config_pass(nng_tls_config *cfg, const char *pass) +{ + NNI_ARG_UNUSED(cfg); + NNI_ARG_UNUSED(pass); + return (NNG_ENOTSUP); +} + + int nng_tls_config_alloc(nng_tls_config **cfgp, nng_tls_mode mode) { |
