diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-23 08:55:21 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-23 09:40:32 -0800 |
| commit | 8f29c19954b7e4f0e47036b37b36ab9cd386ad70 (patch) | |
| tree | 535b12c11e1049f80edd4b7b5564c8e3ebcfb07d /src/sp/transport.c | |
| parent | d1a0201e25ca2bf1d28c753aef47795144733b8d (diff) | |
| download | nng-8f29c19954b7e4f0e47036b37b36ab9cd386ad70.tar.gz nng-8f29c19954b7e4f0e47036b37b36ab9cd386ad70.tar.bz2 nng-8f29c19954b7e4f0e47036b37b36ab9cd386ad70.zip | |
dialers: add nng_dial_url and nng_dialer_create_url
This allows a URL object to be used for dialing, which may
be easier than using a string if you already have the URL object.
Diffstat (limited to 'src/sp/transport.c')
| -rw-r--r-- | src/sp/transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp/transport.c b/src/sp/transport.c index a2220e7b..919a0f37 100644 --- a/src/sp/transport.c +++ b/src/sp/transport.c @@ -41,7 +41,7 @@ nni_sp_tran_find(const char *url) NNI_LIST_FOREACH (&sp_tran_list, t) { size_t len = strlen(t->tran_scheme); if ((strncmp(url, t->tran_scheme, len) == 0) && - (strncmp(url + len, "://", 3) == 0)) { + (url[len] == ':' || url[len] == '\0')) { nni_rwlock_unlock(&sp_tran_lk); return (t); } |
