Hello,

On 07/09/07 13:29, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:

> operating with null cannot be consistent unless we change all PV > concept. $avp() = null deletes the avp, $var() = null, resets to 0, $du > = null (and other pv) set to null some internal structures.
as a concrete example, how can i figure out if request uri userpart
exists?
i tried to test if len of $rU is 0, but got 1:

        $rU = null;
        xlog("L_INFO", "Request URI <$ru>\n");
        if ($(rU{s.len}) == 0) {
                xlog("L_INFO", "Length is 0\n");
        }
        if ($(rU{s.len}) == 1) {
                xlog("L_INFO", "Length is 1\n");
        }

prints to syslog

Jul  9 13:27:54 localhost /usr/sbin/openser[16006]: Request URI <sip:test.fi>
Jul  9 13:27:54 localhost /usr/sbin/openser[16006]: Length is 1

which is still the bug that i reported a while back.
I applied now the same fix as in devel to 1.2 -- if PV is null, then no transformation can be applied.

The issue comes because no coherent implementation was found so far for PV and NULL, perhaps we should start a public discussion to see what is the best solution out there. If you have some ideas, please bring then up.

Cheers,
Daniel

-- juha


_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to