X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Finet6.c;h=0d96c31c21c98eca65812feeb2e31c91fa6b60d6;hp=ac6d0988afb85cce87f8f31e02d0fced5a4f68e3;hb=de5e90863d3824dd3a5bc52d4cba1cd9b0329200;hpb=47e81c0236926bdee0423bf3f1e6ad3f1facc364 diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index ac6d0988a..0d96c31c2 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -49,7 +49,7 @@ static const struct lttcomm_proto_ops inet6_ops = { */ int lttcomm_create_inet6_sock(struct lttcomm_sock *sock, int type, int proto) { - int val, ret; + int val = 1, ret; /* Create server socket */ if ((sock->fd = socket(PF_INET, type, proto)) < 0) { @@ -136,7 +136,7 @@ struct lttcomm_sock *lttcomm_accept_inet6_sock(struct lttcomm_sock *sock) goto end; } - new_sock = lttcomm_alloc_sock(LTTCOMM_INET, sock->proto); + new_sock = lttcomm_alloc_sock(sock->proto); if (new_sock == NULL) { goto error; } @@ -150,6 +150,7 @@ struct lttcomm_sock *lttcomm_accept_inet6_sock(struct lttcomm_sock *sock) } new_sock->fd = new_fd; + new_sock->ops = &inet6_ops; end: return new_sock; @@ -274,7 +275,7 @@ int lttcomm_close_inet6_sock(struct lttcomm_sock *sock) { int ret; - /* Don't try to close an invalid mark socket */ + /* Don't try to close an invalid marked socket */ if (sock->fd == -1) { return 0; }