On 28/04/14 10:51, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:

I guess the $hdr(X[*]) uses comma-space for separation (haven't checked
the sources). In your example, the second header test has two values in
one line and $hdr(...) is simply returning all of them.
since there is no need for space, it should not be there.
It can be removed.
i looked at the source and found in pv_core.c/pv_get_hdr() this:

                                memcpy(p, PV_FIELD_DELIM, PV_FIELD_DELIM_LEN);

the constants:

#define PV_FIELD_DELIM ", "
#define PV_FIELD_DELIM_LEN (sizeof(PV_FIELD_DELIM) - 1)

are used all over the place and it would thus not be a good idea to edit
them.  perhaps adding a new ones:

#define PV_HDR_DELIM ", "
#define PV_HDR_DELIM_LEN (sizeof(PV_HDR_DELIM) - 1)

would be ok.
New ones can be added, indeed.
Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to