[sr-dev] git:master:2c593481: core: kemi - exported force_rport()

Daniel-Constantin Mierla miconda at gmail.com
Sun Apr 24 12:42:03 CEST 2016


Module: kamailio
Branch: master
Commit: 2c59348120e6cddb893a3f8b5cc0f0cf3b2279b6
URL: https://github.com/kamailio/kamailio/commit/2c59348120e6cddb893a3f8b5cc0f0cf3b2279b6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-04-24T12:39:17+02:00

core: kemi - exported force_rport()

---

Modified: kemi.c

---

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

---

diff --git a/kemi.c b/kemi.c
index b1c33fb..3ceaad6 100644
--- a/kemi.c
+++ b/kemi.c
@@ -409,7 +409,7 @@ static int sr_kemi_core_setdsturi(sip_msg_t *msg, str *uri)
 static int sr_kemi_core_resetdsturi(sip_msg_t *msg)
 {
 	if(msg==NULL) {
-		LM_WARN("invalid parameters from\n");
+		LM_WARN("invalid msg parameter\n");
 		return SR_KEMI_FALSE;
 	}
 
@@ -417,6 +417,19 @@ static int sr_kemi_core_resetdsturi(sip_msg_t *msg)
 	return SR_KEMI_TRUE;
 }
 
+/**
+ *
+ */
+static int sr_kemi_core_force_rport(sip_msg_t *msg)
+{
+	if(msg==NULL) {
+		LM_WARN("invalid msg parameter\n");
+		return SR_KEMI_FALSE;
+	}
+
+	msg->msg_flags|=FL_FORCE_RPORT;
+	return SR_KEMI_TRUE;
+}
 
 /**
  *
@@ -522,6 +535,11 @@ static sr_kemi_t _sr_kemi_core[] = {
 		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
 			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
 	},
+	{ str_init(""), str_init("force_rport"),
+		SR_KEMIP_BOOL, sr_kemi_core_force_rport,
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
 
 	{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
 };




More information about the sr-dev mailing list