[OpenSER-Docs] AVPOPS documentation bug - maybe

Johansson Olle E oej at edvina.net
Tue Jun 10 13:26:13 CEST 2008


10 jun 2008 kl. 11.22 skrev Henning Westerholt:

> On Monday 09 June 2008, Johansson Olle E wrote:
>>> i think that most functions return '-1' in case of an error, but i'm
>>> not sure how many document this. Adding a statement to every  
>>> available
>>> module functionis probably not the best way of dealing with this  
>>> issue.
>>> Any idea where this could be documented instead?
>>
>> That's food for thought. In this case I can imagine more error codes
>> though, like -2 for database error, -1 for "not found" and other  
>> codes...
>
> Hi Olle,
>
> sure, this is another point. But trying to agree to one scheme for  
> error codes
> for all this different module functions won't be probably easy. Why  
> do you
> think it would make sense to handle DB errors differently in the  
> script then
> any other errors? This informations are visible in the logs after all.

Well, there's a big difference if we have a negative reply from the  
database
or no reply at all from the database because it's down. In general,  
I'm wondering
how to catch that state in the Openser config without reading log  
files - maybe
the error_route could catch these so I could send a warning somewhere.
That would be generic enough and handled from the db subsystem.

We already have apps that return various error codes that are  
"reserved",
like the auth functions and the t_relay function.

/O




More information about the sr-docs mailing list