[sr-dev] git:master:7261efbc: textops: remove check done in the called function

Daniel-Constantin Mierla miconda at gmail.com
Sun Nov 3 10:40:28 CET 2019


Module: kamailio
Branch: master
Commit: 7261efbcd0826014227fbe814e4142cec0c79368
URL: https://github.com/kamailio/kamailio/commit/7261efbcd0826014227fbe814e4142cec0c79368

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-11-02T18:04:55+01:00

textops: remove check done in the called function

---

Modified: src/modules/textopsx/textopsx.c

---

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

---

diff --git a/src/modules/textopsx/textopsx.c b/src/modules/textopsx/textopsx.c
index 3554c3263e..317abb6002 100644
--- a/src/modules/textopsx/textopsx.c
+++ b/src/modules/textopsx/textopsx.c
@@ -177,11 +177,6 @@ static int ki_msg_set_buffer(sip_msg_t *msg, str *obuf)
  */
 static int ki_msg_apply_changes(sip_msg_t *msg)
 {
-	if(msg->first_line.type != SIP_REPLY && get_route_type() != REQUEST_ROUTE) {
-		LM_ERR("invalid usage - not in request route or a reply\n");
-		return -1;
-	}
-
 	return sip_msg_apply_changes(msg);
 }
 
@@ -190,7 +185,7 @@ static int ki_msg_apply_changes(sip_msg_t *msg)
  */
 static int msg_apply_changes_f(sip_msg_t *msg, char *str1, char *str2)
 {
-	return ki_msg_apply_changes(msg);
+	return sip_msg_apply_changes(msg);
 }
 
 /**




More information about the sr-dev mailing list