aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/url.c11
-rw-r--r--src/core/url.h1
-rw-r--r--src/sp/transport/inproc/inproc.c4
3 files changed, 2 insertions, 14 deletions
diff --git a/src/core/url.c b/src/core/url.c
index c4bda443..472e70b2 100644
--- a/src/core/url.c
+++ b/src/core/url.c
@@ -334,11 +334,6 @@ nni_url_parse_inline(nng_url *url, const char *raw)
char c;
int rv;
- // TODO: remove this when NNG_OPT_URL is gone
- if ((url->u_rawurl = nni_strdup(raw)) == NULL) {
- return (NNG_ENOMEM);
- }
-
// Grab the scheme.
s = raw;
for (len = 0; (c = s[len]) != ':'; len++) {
@@ -532,7 +527,6 @@ nng_url_parse(nng_url **urlp, const char *raw)
void
nni_url_fini(nng_url *url)
{
- nni_strfree(url->u_rawurl);
if (url->u_bufsz != 0) {
nni_free(url->u_buffer, url->u_bufsz);
}
@@ -623,13 +617,8 @@ nng_url_clone(nng_url **dstp, const nng_url *src)
if ((dst = NNI_ALLOC_STRUCT(dst)) == NULL) {
return (NNG_ENOMEM);
}
- if (URL_COPYSTR(dst->u_rawurl, src->u_rawurl)) {
- NNI_FREE_STRUCT(dst);
- return (NNG_ENOMEM);
- }
if (src->u_bufsz != 0) {
if ((dst->u_buffer = nni_alloc(dst->u_bufsz)) == NULL) {
- nni_strfree(dst->u_rawurl);
NNI_FREE_STRUCT(dst);
return (NNG_ENOMEM);
}
diff --git a/src/core/url.h b/src/core/url.h
index 5aa53dfd..bb6b2382 100644
--- a/src/core/url.h
+++ b/src/core/url.h
@@ -14,7 +14,6 @@
#include "core/defs.h"
struct nng_url {
- char *u_rawurl; // never NULL
const char *u_scheme; // never NULL
const char *u_userinfo; // will be NULL if not specified
char *u_hostname; // name only, will be "" if not specified
diff --git a/src/sp/transport/inproc/inproc.c b/src/sp/transport/inproc/inproc.c
index 5216b5e6..6a3e3ee3 100644
--- a/src/sp/transport/inproc/inproc.c
+++ b/src/sp/transport/inproc/inproc.c
@@ -299,7 +299,7 @@ inproc_dialer_init(void **epp, nng_url *url, nni_dialer *ndialer)
NNI_LIST_INIT(&ep->clients, inproc_ep, node);
nni_aio_list_init(&ep->aios);
- ep->addr = url->u_rawurl; // we match on the full URL.
+ ep->addr = url->u_path; // we match on the URL path.
*epp = ep;
return (0);
@@ -322,7 +322,7 @@ inproc_listener_init(void **epp, nng_url *url, nni_listener *nlistener)
NNI_LIST_INIT(&ep->clients, inproc_ep, node);
nni_aio_list_init(&ep->aios);
- ep->addr = url->u_rawurl; // we match on the full URL.
+ ep->addr = url->u_path; // we match on the path
*epp = ep;
return (0);