diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-11-26 15:42:16 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-11-26 16:41:06 +0000 |
commit | b2b2fe643f5c1821c477f583a63a38838964bba7 (patch) | |
tree | c0da00d6454a2c780b06733edd7c278b1bba5b1e | |
parent | 7f0e9f117151d4a317628e089c22af6f921bf7b6 (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
-rw-r--r-- | src/stream.c | 3 |
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; |