Hello Daniel,
On 06/02/2009 09:17 AM, Daniel-Constantin Mierla wrote:
Helo Miklos,
On 06/01/2009 05:12 PM, Miklos Tirpak wrote:
Hi Andrei,
could you please have a look at the tirpi/script_callbacks branch?
There are some modules that need to initialize their variables before,
or free/unlock/unref,... something after the script executions. This
is supported only for request and onreply routes, but it is necessary
also before/after failure routes in some cases. (For example db_ops
needs to free the query result.) So I started to add support for pre-
and post-script callbacks for failure routes. But instead of simply
adding another list to the core I generalized the API a bit to support
any kind of route blocks, and added hooks also for branch and onsend
routes. Please let me know whether I can merge my branch to the master.
Daniel: shall I add a hook around modules_k/htable/htable.c:187 for
event_route?
if there are modules that need it, then yes -- it is executed for a
faked msg, before starting to process the sip traffic, so should not
affect context of other messages.
this sounds a very special case, and I am not aware of any module that
would need script callbacks with event route type, so we can leave it
for now if you prefer. (I just wanted to make the implementation
consistent regardless of the type of the route, and always execute the
callbacks around the top route blocks.)
Thanks,
Miklos
Cheers,
Daniel