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

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 10 13:23:26 CET 2015


Module: kamailio
Branch: 4.2
Commit: c2b03863299b490346735e8b2501098117a42310
URL: https://github.com/kamailio/kamailio/commit/c2b03863299b490346735e8b2501098117a42310

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-02-10T13:22:47+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)

---

Modified: modules/sctp/sctp_server.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c2b03863299b490346735e8b2501098117a42310.diff
Patch: https://github.com/kamailio/kamailio/commit/c2b03863299b490346735e8b2501098117a42310.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