[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    [sr-dev] git:master: rtmier: reset avps and xavp lists after route blocks execution
From:       Daniel-Constantin Mierla <miconda () gmail ! com>
Date:       2014-04-29 18:06:08
Message-ID: 20140429180608.5C84EEF8074 () rimmer ! ryngle ! com
[Download RAW message or body]

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@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@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
 	}
 }
 


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic