[SR-Users] About setflag()'s parameter

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Jul 6 11:34:40 CEST 2010


On Jul 06, 2010 at 10:24, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> Hello,
> 
> On 7/6/10 10:16 AM, Alex Balashov wrote:
> >Daniel,
> >
> >Based on this, I think I was erroneous in suggesting that plain
> >flags (setflag, isflagset) are transaction-associated.  They seem
> >to be message-associated, not transaction.  Is this right?
> 
> in first place is associated to message, then inherited to
> transaction (when that is created) and kept for the life of the
> transaction. So both associations are true, of course, a matter of
> whether the transaction was created or not at respective time.

Not exactly, the flags are updated at t_relay() time, even if the
transaction was created before by t_newtran().
E.g.:

flags a, b;

    setflag(a);
    t_newtran();
    setflag(b);
    t_on_failure("failure_route");
    t_on_reply("reply_route");
    t_relay();
 => both a & b will be set in the reply_route or failure_route.


Andrei



More information about the sr-users mailing list