On May 26, 2010 at 18:09, Andrei Pelinescu-Onciul <andrei(a)iptel.org> wrote:
On May 25, 2010 at 19:05, Juha Heinanen
<jh(a)tutpro.com> wrote:
andrei,
t_gett() returns pointer to the transaction (struct cell). would it be
somehow possible to dig from that structure if the transaction still
has some contacts in the destination set left unconsumed and if so, if
there is the request uri branch still left?
If I understand correctly your use case (next_gw() called after
t_relay() error, always adding only 1 branch and called form
request_route) then yes:
if t!= T_UNDEFINED and t!=0 and t->nr_of_outgoings!=0 =>
uri "consumed", add branch,
else if t==0 or UNDEFINED =>
exit with error (something bad has happend, probably out-of-mem)
else
uri was bad => change ruri.
From failure route, always use append_branch.
Anyway I'll commit some code for the marking consumed ruris on some new
branch soon (but would require extensive testing).
The branch is tmp/ruri_branch. I did only basic testing (serial forking
from request and failure route).
I tried to update all the modules that change r-uri, dst_uri or path to
re-mark the r-uri as usable for forking (ruri_mark_new()), but it's
possible that I've missed some.
Andrei