|
@@ -2336,6 +2336,11 @@ int reply_received( struct sip_msg *p_msg )
|
|
|
/* processing of on_reply block */
|
|
|
if (onreply_route) {
|
|
|
set_route_type(TM_ONREPLY_ROUTE);
|
|
|
+
|
|
|
+ /* lock onreply_route, for safe avp usage */
|
|
|
+ LOCK_REPLIES( t );
|
|
|
+ replies_locked=1;
|
|
|
+
|
|
|
/* transfer transaction flag to message context */
|
|
|
if (t->uas.request) p_msg->flags=t->uas.request->flags;
|
|
|
/* set the as avp_list the one from transaction */
|
|
@@ -2353,9 +2358,6 @@ int reply_received( struct sip_msg *p_msg )
|
|
|
/* Pre- and post-script callbacks have already
|
|
|
* been executed by the core. (Miklos)
|
|
|
*/
|
|
|
- /* lock onreply_route, for safe avp usage */
|
|
|
- LOCK_REPLIES( t );
|
|
|
- replies_locked=1;
|
|
|
run_top_route(onreply_rt.rlist[onreply_route], p_msg, &ctx);
|
|
|
/* transfer current message context back to t */
|
|
|
if (t->uas.request) t->uas.request->flags=p_msg->flags;
|