[sr-dev] git:4.1:c16aa106: sctp: fixes for FreeBSD 10.1 compile error and 2 warnings

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 18 21:30:34 CET 2015


Module: kamailio
Branch: 4.1
Commit: c16aa106d46c9bf6485fadc7c8f841fc0c74e84a
URL: https://github.com/kamailio/kamailio/commit/c16aa106d46c9bf6485fadc7c8f841fc0c74e84a

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-12-18T21:26:57+01:00

sctp: fixes for FreeBSD 10.1 compile error and 2 warnings

- missing argument for macro SCTP_EV_REMOTE_ERROR() and two extraneous
  parentheses

(cherry picked from commit b06626e811edae93c5f28dc132eca7542a6dcc97)
(cherry picked from commit c2b03863299b490346735e8b2501098117a42310)

---

Modified: modules/sctp/sctp_server.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c16aa106d46c9bf6485fadc7c8f841fc0c74e84a.diff
Patch: https://github.com/kamailio/kamailio/commit/c16aa106d46c9bf6485fadc7c8f841fc0c74e84a.patch

---

diff --git a/modules/sctp/sctp_server.c b/modules/sctp/sctp_server.c
index 4f21b20..0bf6235 100644
--- a/modules/sctp/sctp_server.c
+++ b/modules/sctp/sctp_server.c
@@ -2397,7 +2397,7 @@ static int sctp_handle_notification(struct socket_info* si,
 		case SCTP_SENDER_DRY_EVENT:
 			ERR_LEN_TOO_SMALL(len, sizeof(struct sctp_sender_dry_event),
 								si, su, "SCTP_SENDER_DRY_EVENT");
-			SCTP_EV_REMOTE_ERROR(&si->address, si->port_no, su);
+			SCTP_EV_REMOTE_ERROR(&si->address, si->port_no, su, 0);
 			SNOT("sctp notification from %s on %.*s:%d: "
 					"SCTP_SENDER_DRY_EVENT on %d\n",
 					su2a(su, sizeof(*su)), si->name.len, si->name.s,
@@ -2659,7 +2659,7 @@ static int sctp_raw_send(int socket, char* buf, unsigned len,
 			goto again;
 		}
 #elif defined __OS_freebsd
-		if ((errno==ENOENT)){
+		if (errno==ENOENT){
 			/* it didn't work, no retrying */
 			WARN("unexpected sendmsg() failure (ENOENT),"
 					" assoc_id %d\n", sinfo->sinfo_assoc_id);
@@ -2826,7 +2826,7 @@ static int sctp_msg_send_ext(struct dest_info* dst, char* buf, unsigned len,
 			goto again;
 		}
 #elif defined __OS_freebsd
-		if ((errno==ENOENT)){
+		if (errno==ENOENT){
 			/* it didn't work, no retrying */
 			WARN("sctp sendmsg: unexpected sendmsg() failure (ENOENT),"
 					" assoc_id %d\n", assoc_id);




More information about the sr-dev mailing list