aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:42:16 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 16:41:06 +0000
commitb2b2fe643f5c1821c477f583a63a38838964bba7 (patch)
treec0da00d6454a2c780b06733edd7c278b1bba5b1e /src
parent7f0e9f117151d4a317628e089c22af6f921bf7b6 (diff)
sctp_sock_activate_events(): Print error message on error
When the setsockopt() in sctp_sock_activate_events() indicates an error, let's print an error message in the log about this. Change-Id: I5920154e23debe6d01eaa156005db0842f1a18cc Fixes: Coverity CID 57634
Diffstat (limited to 'src')
-rw-r--r--src/stream.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c
index 7d40df2..0ef54c6 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -45,6 +45,9 @@ static int sctp_sock_activate_events(int fd)
rc = setsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS,
&event, sizeof(event));
+ if (rc < 0)
+ LOGP(DLINP, LOGL_ERROR, "coudldn't activate SCTP events "
+ "on FD %u\n", fd);
return rc;
#else
return -1;