aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-05 11:22:44 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-05 11:22:44 -0700
commit56b4dba80ed37469d6302337f38e6539dd78889f (patch)
treec9225efd6639d34699f262007081ce382962ed3a /src
parent809909449c371c73dd56770ca1bbe11127a4f915 (diff)
downloadnng-56b4dba80ed37469d6302337f38e6539dd78889f.tar.gz
nng-56b4dba80ed37469d6302337f38e6539dd78889f.tar.bz2
nng-56b4dba80ed37469d6302337f38e6539dd78889f.zip
Cleanup some unused things.
Diffstat (limited to 'src')
-rw-r--r--src/core/pipe.c8
-rw-r--r--src/platform/posix/posix_socket.c9
2 files changed, 0 insertions, 17 deletions
diff --git a/src/core/pipe.c b/src/core/pipe.c
index 7f568457..08d3dee7 100644
--- a/src/core/pipe.c
+++ b/src/core/pipe.c
@@ -192,14 +192,6 @@ nni_pipe_create(nni_pipe **pp, nni_ep *ep, nni_sock *sock, nni_tran *tran)
// Save the protocol destructor.
p->p_proto_dtor = sock->s_pipe_ops.pipe_fini;
-#if 0
- // Initialize the transport pipe data.
- if ((rv = p->p_tran_ops.p_init(&p->p_tran_data)) != 0) {
- nni_objhash_unref(nni_pipes, p->p_id);
- return (rv);
- }
-#endif
-
// Initialize protocol pipe data.
rv = sock->s_pipe_ops.pipe_init(&p->p_proto_data, p, sock->s_data);
if (rv != 0) {
diff --git a/src/platform/posix/posix_socket.c b/src/platform/posix/posix_socket.c
index dabad3af..9e054c42 100644
--- a/src/platform/posix/posix_socket.c
+++ b/src/platform/posix/posix_socket.c
@@ -45,7 +45,6 @@ struct nni_posix_sock {
int fd;
char * unlink; // path to unlink at unbind
nni_posix_pipedesc * pd;
- nni_posix_epdesc * ed;
int tcpnodelay;
};
@@ -213,9 +212,6 @@ nni_posix_sock_fini(nni_posix_sock *s)
if (s->pd != NULL) {
nni_posix_pipedesc_fini(s->pd);
}
- if (s->ed != NULL) {
- nni_posix_epdesc_fini(s->ed);
- }
if (s->unlink != NULL) {
(void) unlink(s->unlink);
nni_free(s->unlink, strlen(s->unlink) + 1);
@@ -311,11 +307,6 @@ nni_posix_sock_listen(nni_posix_sock *s, const nni_sockaddr *saddr)
return (rv);
}
- if ((rv = nni_posix_epdesc_init(&s->ed, fd)) != 0) {
- (void) close(fd);
- return (rv);
- }
-
s->fd = fd;
return (0);