[sr-dev] no line number given and why is $ru not writable?

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Jun 3 19:35:53 CEST 2009


On Jun 02, 2009 at 11:29, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> Hello,
> 
> On 06/01/2009 08:35 PM, Juha Heinanen wrote:
> >if i remember correctly, k told the config file line number where an
> >error occurred and also the name of the function that issued it.
> yes, it printed the line number -  the action structure in K has a field 
> 'line' -- I couldn't find it.

Well kamailio did have the line number for actions, sip-router has
complete position information for expressions :-)
> 
> That is very useful for fixup or runtime errors, I would add it in SR if 
> no one has something against or a better option.

We should add it, but it's not so simple. We should have complete
position information, like we have for expressions (start line, start
column, end line and end column -- struct cfg_pos in route_struct.h). To
add this we need to propagate this information through all the parsing
rules and add it somehow to the basic tokens, which  would be very
time consuming.

So feel free to add it if you add full position info.

Andrei



More information about the sr-dev mailing list