Skip to content

Commit

Permalink
sockfd: we can use NULL for dialer ops
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Nov 25, 2024
1 parent 2df4d2e commit 9c987eb
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/sp/transport/socket/sockfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,6 @@ sfd_tran_ep_init(sfd_tran_ep **epp, nng_url *url, nni_sock *sock)
return (0);
}

static int
sfd_tran_dialer_init(void **dp, nng_url *url, nni_dialer *ndialer)
{
NNI_ARG_UNUSED(dp);
NNI_ARG_UNUSED(url);
NNI_ARG_UNUSED(ndialer);
return (NNG_ENOTSUP);
}

static int
sfd_tran_listener_init(void **lp, nng_url *url, nni_listener *nlistener)
{
Expand Down Expand Up @@ -978,15 +969,6 @@ sfd_tran_listener_setopt(
return (rv);
}

static nni_sp_dialer_ops sfd_tran_dialer_ops = {
.d_init = sfd_tran_dialer_init,
.d_fini = NULL,
.d_connect = NULL,
.d_close = NULL,
.d_getopt = NULL,
.d_setopt = NULL,
};

static nni_sp_listener_ops sfd_tran_listener_ops = {
.l_init = sfd_tran_listener_init,
.l_fini = sfd_tran_ep_fini,
Expand All @@ -999,7 +981,7 @@ static nni_sp_listener_ops sfd_tran_listener_ops = {

static nni_sp_tran sfd_tran = {
.tran_scheme = "socket",
.tran_dialer = &sfd_tran_dialer_ops,
.tran_dialer = NULL,
.tran_listener = &sfd_tran_listener_ops,
.tran_pipe = &sfd_tran_pipe_ops,
.tran_init = sfd_tran_init,
Expand Down

0 comments on commit 9c987eb

Please sign in to comment.