[sr-dev] git:master:0f5aaac4: textops: stop after substituting in first header if flag f is set for subst_hf()

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 9 12:35:02 CET 2015


Module: kamailio
Branch: master
Commit: 0f5aaac47a6002bbd4fdfaf0e6897d307c2cbc0e
URL: https://github.com/kamailio/kamailio/commit/0f5aaac47a6002bbd4fdfaf0e6897d307c2cbc0e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-03-09T12:33:58+01:00

textops: stop after substituting in first header if flag f is set for subst_hf()

- reported by Julia Boudniatsky

---

Modified: modules/textops/textops.c

---

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

---

diff --git a/modules/textops/textops.c b/modules/textops/textops.c
index f8b6e41..a677cba 100644
--- a/modules/textops/textops.c
+++ b/modules/textops/textops.c
@@ -2874,6 +2874,9 @@ static int subst_hf_f(struct sip_msg *msg, char *str_hf, char *subst, char *flag
 		} else {
 			hfl = hf;
 		}
+		/* if flags set for first header, then all done */
+		if(flags!=NULL && *flags=='f')
+			return ret;
 	}
 	if(hfl!=NULL)
 	{




More information about the sr-dev mailing list