Re: [SR-Users] [sr-dev] is t_flush_flags() really needed?

2018-03-28 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Afaik, flags after t_newtran() were supposed not to be moved to
> transaction if t_flush_flags(), that being the purpose of the later
> function. Are you doing any other tm operations between creating the new
> transaction and relaying the request or end of script execution?

After calling t_newtran() I arm failure and onreply routes and then call
t_relay().  Flags set after t_newtran() are visible in both those routes
without calling t_flush_flags().  Same should happen with xflags.

-- Juha

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] is t_flush_flags() really needed?

2018-03-28 Thread Daniel-Constantin Mierla


On 27.03.18 07:40, Juha Heinanen wrote:
> Juha Heinanen writes:
>
>> While testing xflags, i noticed that a regular flag that I set AFTER
>> calling t_newtrans() stays set in onreply_route even when I do not
>> call t_flush_flags().
> I made the same test with xflags and they do require t_flush_xflags()
> call if an xflag is set after t_newtrans();  So the behavior is not the
> same with flags and xflags.
>
> This is confusing.  The flags should behave the same way and I would
> prefer the flags way in order to avoid the flush call.
>
> I added sr-dev to this thread since it now deals also the new feature.
>
Afaik, flags after t_newtran() were supposed not to be moved to
transaction if t_flush_flags(), that being the purpose of the later
function. Are you doing any other tm operations between creating the new
transaction and relaying the request or end of script execution?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users