[OpenSIPS-Devel] About $rc return values

Iñaki Baz Castillo ibc at aliax.net
Wed Nov 12 00:22:10 CET 2008


Hi, I've realized the $rc is not very coherent.

For example: "nathelper" fix_nated_sdp() function returns $rc=1 in case the 
SDP media address has been in fact modified. But in case the SDP already 
contains a "a=nortpproxy:yes" then the method fix_nated_sdp() doesn't modify 
the SDP and returns $rc=123132123897 (i.e).

In any language we expect to be able to do:

  if $rc { .... }

This is, the block is runned just in case $rc is true. But the above two cases 
are "true" (1 and 12312334458).

I really wonder why a "negative" result has so strange value (1232332434) 
instead of -1. Also, the result of $rc is not coherent in many functions.

Opinions? Thanks.

-- 
Iñaki Baz Castillo



More information about the Devel mailing list