Module: kamailio
Branch: 5.0
Commit: 72012440214b0827e6ae7e1dd494c5ecd3fdbaa8
URL:
https://github.com/kamailio/kamailio/commit/72012440214b0827e6ae7e1dd494c5e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Luis Azedo <luis(a)2600hz.com>
Date: 2017-06-02T14:28:04+01:00
core: reset avps and xavps lists in all error cases
- just for safety when one uses some srevent routes
(cherry picked from commit bc336bfcba127a9232583a3d7b7e10d994c369eb)
---
Modified: src/core/receive.c
---
Diff:
https://github.com/kamailio/kamailio/commit/72012440214b0827e6ae7e1dd494c5e…
Patch:
https://github.com/kamailio/kamailio/commit/72012440214b0827e6ae7e1dd494c5e…
---
diff --git a/src/core/receive.c b/src/core/receive.c
index f2cdeeb4f5..0e622274f9 100644
--- a/src/core/receive.c
+++ b/src/core/receive.c
@@ -379,10 +379,6 @@ int receive_msg(char* buf, unsigned int len, struct receive_info*
rcv_info)
error_rpl:
/* execute post reply-script callbacks */
exec_post_script_cb(msg, ONREPLY_CB_TYPE);
- reset_avps();
-#ifdef WITH_XAVP
- xavp_reset_list();
-#endif
goto error02;
#endif /* NO_ONREPLY_ROUTE_ERROR */
error_req:
@@ -390,15 +386,14 @@ int receive_msg(char* buf, unsigned int len, struct receive_info*
rcv_info)
/* execute post request-script callbacks */
exec_post_script_cb(msg, REQUEST_CB_TYPE);
error03:
- /* free possible loaded avps -bogdan */
- reset_avps();
-#ifdef WITH_XAVP
- xavp_reset_list();
-#endif
error02:
free_sip_msg(msg);
pkg_free(msg);
error00:
+ reset_avps();
+#ifdef WITH_XAVP
+ xavp_reset_list();
+#endif
STATS_RX_DROPS;
/* reset log prefix */
log_prefix_set(NULL);