[sr-dev] git:master: rtmier: reset avps and xavp lists after route blocks execution

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 29 20:06:08 CEST 2014


Module: sip-router
Branch: master
Commit: 159978cf2a98748f3225155d8946bcbd768b51e3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=159978cf2a98748f3225155d8946bcbd768b51e3

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Apr 29 20:02:19 2014 +0200

rtmier: reset avps and xavp lists after route blocks execution

- avoid leaks if someone is using avp/xavp with rtimer - there is a fake
  message used there, thus not the normal sip message routing that
  resets avps/xavps

---

 modules/rtimer/rtimer_mod.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/rtimer/rtimer_mod.c b/modules/rtimer/rtimer_mod.c
index 03a002d..271b888 100644
--- a/modules/rtimer/rtimer_mod.c
+++ b/modules/rtimer/rtimer_mod.c
@@ -37,6 +37,8 @@
 #include "../../socket_info.h"
 #include "../../dset.h"
 #include "../../pt.h"
+#include "../../usr_avp.h"
+#include "../../xavp.h"
 #include "../../timer_proc.h"
 #include "../../script_cb.h"
 #include "../../parser/parse_param.h"
@@ -190,6 +192,10 @@ void stm_timer_exec(unsigned int ticks, void *param)
 		set_route_type(REQUEST_ROUTE);
 		run_top_route(main_rt.rlist[rt->route], fmsg, 0);
 		exec_post_script_cb(fmsg, REQUEST_CB_TYPE);
+		reset_avps();
+#ifdef WITH_XAVP
+		xavp_reset_list();
+#endif
 	}
 }
 




More information about the sr-dev mailing list