[MERGED] libosmo-netif[master]: sctp_sock_activate_events(): Print error message on error

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Nov 26 18:37:32 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: sctp_sock_activate_events(): Print error message on error
......................................................................


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
---
M src/stream.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
 	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;

-- 
To view, visit https://gerrit.osmocom.org/1333
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5920154e23debe6d01eaa156005db0842f1a18cc
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list