[sr-dev] git:master:33de203f: async: reset avp/xavp (msg env) from async workers

Daniel-Constantin Mierla miconda at gmail.com
Tue May 16 17:35:46 CEST 2017


Module: kamailio
Branch: master
Commit: 33de203fed8b592d8cb156670beb4a44220dd2e9
URL: https://github.com/kamailio/kamailio/commit/33de203fed8b592d8cb156670beb4a44220dd2e9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-05-16T17:33:54+02:00

async: reset avp/xavp (msg env) from async workers

- just in case they were set for non-sip routing processes (async
  workers)

---

Modified: src/modules/async/async_sleep.c

---

Diff:  https://github.com/kamailio/kamailio/commit/33de203fed8b592d8cb156670beb4a44220dd2e9.diff
Patch: https://github.com/kamailio/kamailio/commit/33de203fed8b592d8cb156670beb4a44220dd2e9.patch

---

diff --git a/src/modules/async/async_sleep.c b/src/modules/async/async_sleep.c
index 64ce651..20a5a86 100644
--- a/src/modules/async/async_sleep.c
+++ b/src/modules/async/async_sleep.c
@@ -27,6 +27,7 @@
 
 #include "../../core/dprint.h"
 #include "../../core/ut.h"
+#include "../../core/receive.h"
 #include "../../core/locking.h"
 #include "../../core/timer.h"
 #include "../../core/async_task.h"
@@ -174,8 +175,10 @@ void async_timer_exec(unsigned int ticks, void *param)
 
 		if(ai == NULL)
 			break;
-		if(ai->act != NULL)
+		if(ai->act != NULL) {
 			tmb.t_continue(ai->tindex, ai->tlabel, ai->act);
+			ksr_msg_env_reset();
+		}
 		shm_free(ai);
 	}
 }
@@ -196,8 +199,10 @@ void async_exec_task(void *param)
 	tindex = p[0];
 	tlabel = p[1];
 
-	if(act != NULL)
+	if(act != NULL) {
 		tmb.t_continue(tindex, tlabel, act);
+		ksr_msg_env_reset();
+	}
 	/* param is freed along with the async task strucutre in core */
 }
 




More information about the sr-dev mailing list