aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-03 10:33:14 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-03 10:33:14 -0700
commit14c8396d6954622de9e07b010810ee49f0496b2a (patch)
tree8b85317cdbe38c7be674b5b9d6197d7b12d96eaa /src/core/endpt.c
parent14c9712edef594e3701c8851d7c51b109a6da97d (diff)
downloadnng-14c8396d6954622de9e07b010810ee49f0496b2a.tar.gz
nng-14c8396d6954622de9e07b010810ee49f0496b2a.tar.bz2
nng-14c8396d6954622de9e07b010810ee49f0496b2a.zip
Rename legacy connect/accept as _sync for now.
Diffstat (limited to 'src/core/endpt.c')
-rw-r--r--src/core/endpt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index 223d86a3..b24d7643 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -237,7 +237,7 @@ nni_ep_remove(nni_ep *ep)
static int
-nni_ep_connect(nni_ep *ep)
+nni_ep_connect_sync(nni_ep *ep)
{
nni_pipe *pipe;
int rv;
@@ -245,7 +245,7 @@ nni_ep_connect(nni_ep *ep)
if ((rv = nni_pipe_create(&pipe, ep, ep->ep_sock, ep->ep_tran)) != 0) {
return (rv);
}
- rv = ep->ep_ops.ep_connect(ep->ep_data, &pipe->p_tran_data);
+ rv = ep->ep_ops.ep_connect_sync(ep->ep_data, &pipe->p_tran_data);
if (rv != 0) {
nni_pipe_remove(pipe);
return (rv);
@@ -330,7 +330,7 @@ nni_dialer(void *arg)
}
nni_mtx_unlock(&ep->ep_mtx);
- rv = nni_ep_connect(ep);
+ rv = nni_ep_connect_sync(ep);
switch (rv) {
case 0:
// good connection
@@ -383,7 +383,7 @@ nni_ep_dial(nni_ep *ep, int flags)
if (flags & NNG_FLAG_SYNCH) {
nni_mtx_unlock(&ep->ep_mtx);
- rv = nni_ep_connect(ep);
+ rv = nni_ep_connect_sync(ep);
if (rv != 0) {
nni_thr_fini(&ep->ep_thr);
ep->ep_mode = NNI_EP_MODE_IDLE;
@@ -399,8 +399,8 @@ nni_ep_dial(nni_ep *ep, int flags)
}
-int
-nni_ep_accept(nni_ep *ep)
+static int
+nni_ep_accept_sync(nni_ep *ep)
{
nni_pipe *pipe;
int rv;
@@ -411,7 +411,7 @@ nni_ep_accept(nni_ep *ep)
if ((rv = nni_pipe_create(&pipe, ep, ep->ep_sock, ep->ep_tran)) != 0) {
return (rv);
}
- rv = ep->ep_ops.ep_accept(ep->ep_data, &pipe->p_tran_data);
+ rv = ep->ep_ops.ep_accept_sync(ep->ep_data, &pipe->p_tran_data);
if (rv != 0) {
nni_pipe_remove(pipe);
return (rv);
@@ -464,7 +464,7 @@ nni_listener(void *arg)
}
nni_mtx_unlock(&ep->ep_mtx);
- if ((rv = nni_ep_accept(ep)) == 0) {
+ if ((rv = nni_ep_accept_sync(ep)) == 0) {
// Success! Loop around for the next one.
continue;
}