Disable handover: Make disable variable local
This way it does not causes unused variable problems when compiled
without MPTCP support
@@ -5243,7 +5243,6 @@ neat_connect(struct neat_he_candidate *candidate, uv_poll_cb callback_fx)
const char *algo;
#endif
int enable = 1;
- int disable = 0;
int retval;
socklen_t len = 0;
int size = 0, protocol;
@@ -5327,6 +5326,7 @@ neat_connect(struct neat_he_candidate *candidate, uv_poll_cb callback_fx)
nt_log(ctx, NEAT_LOG_WARNING, "Could not disable MPTCP for socket %d, MPTCP globaly enabled", candidate->pollable_socket->fd);
return -2;
} else if (candidate->ctx->sys_mptcp_enabled == MPTCP_SYS_APP_CTRL) {
+ int disable = 0;
if (setsockopt(candidate->pollable_socket->fd, IPPROTO_TCP, MPTCP_ENABLED, &disable, sizeof(int)) < 0) {
nt_log(ctx, NEAT_LOG_WARNING, "Could not disable MPTCP for socket %d, setsockopt failed", candidate->pollable_socket->fd);
return -2;
@@ -5338,6 +5338,7 @@ neat_connect(struct neat_he_candidate *candidate, uv_poll_cb callback_fx)
nt_log(ctx, NEAT_LOG_WARNING, "Could not use TCP over for socket %d, MPTCP globaly enabled", candidate->pollable_socket->fd);
return -2;
} else if (candidate->ctx->sys_mptcp_enabled == MPTCP_SYS_APP_CTRL) {
+ int disable = 0;
if (setsockopt(candidate->pollable_socket->fd, IPPROTO_TCP, MPTCP_ENABLED, &disable, sizeof(int)) < 0) {
nt_log(ctx, NEAT_LOG_WARNING, "Could not disable MPTCP for socket %d, setsockopt failed", candidate->pollable_socket->fd);
return -2;
