checking errcode in the sql_snprint_error function of rlm_sql_oracle.c

Arran Cudbard-Bell a.cudbardb at
Fri Nov 27 02:24:50 CET 2015

> On 26 Nov 2015, at 20:08, Kyuyoung Kim <jadebrill at> wrote:
> Hello,
> First, I want to say that I don't know well OCI programming.
> I'm trying to make interface between FreeRADIUS and Oracle.
> I found this code in the rlm_sql_oracle module.
> This part seems a bit strange.
> If there are errors, errcode variable is larger than 0.
> but, the function returns -1.
> I think if errcode is large than 0, function should return 0 not -1.

Why? Look at how the function is called.  If it's called an error has occurred.

If an error has occurred but oracle knows nothing about it, is that an error? Yes.

What do the callers of this function do on an error? Print unknown error mostly.


Arran Cudbard-Bell <a.cudbardb at>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the Freeradius-Users mailing list