El Monday 23 June 2008 10:24:15 Daniel-Constantin Mierla escribió: > I mean that the avp is deleted (entire structure -- name and value) when > you assign the null value. There is no avp in the list that has 'null' > value -- it is just the PV engine that considers to be null.
Ok, understood. > If you compare with C: > > int i; > > you can do i = 0 but not i = null. > > char *p; > > you can do p = "abc" and p = null, but does not mean after the second > the p variable is destroyed from the list of variables, just its value > is set to null. > > I wanted to underline that null functionality is very much specific to > openser config , and may be something that someones may expect or not. > > I have nothing against allowing null values for vars or avps. They use > same structure to hold the value: the int_str union which is actually > defined by the avps specifications -- see usr_avp.h: > > typedef union { > int n; > str s; > } int_str; > > in script_var.h: > > typedef struct script_val { > int flags; > int_str value; > } script_val_t, *script_val_p; > > > flags field can be used to signal that the value is neither int nor str, > but null, and that can happen for both avps and vars. Ok, thanks for a great explanation ;) -- Iñaki Baz Castillo [EMAIL PROTECTED] _______________________________________________ Devel mailing list Devel@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/devel