On May 25, 2010 at 19:05, Juha Heinanen jh@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).
Andrei