[sr-dev] git:jason.penton/ims_ro_interface: lib/ims: added function to get p-charging-vector

Olle E. Johansson oej at edvina.net
Tue Mar 12 14:18:29 CET 2013


12 mar 2013 kl. 14:16 skrev Jason Penton <jason.penton at gmail.com>:

> Thanks for volunteering to clean out for us Olle ;)
You wish ;-)
In this case you added a function that must exist somewhere else, since I can find headers
in the config scripts... That should definitely be avoided...

/O
> 
> On Tue, Mar 12, 2013 at 2:39 PM, Richard Good <richard.good at smilecoms.com> wrote:
> Hi
> 
> Agreed on this - historically large parts of the IMS module code comes from the FOKUS Open Source IMS Core which I think started as an IMS specific SER branch.
> 
> The purpose of these new modules is to enable this same IMS functionality but take advantage of Kamailio's proven reliability and core functionality.  Some functions, like the one you mentioned, still need to be reworked.
> 
> Regards
> Richard.
> 
> 
> 
> On 12 March 2013 14:18, Olle E. Johansson <oej at edvina.net> wrote:
> 
> 12 mar 2013 kl. 12:31 skrev Jason Penton <jason.penton at gmail.com>:
> 
> > +/**
> > + * Returns the first header structure for a given header name.
> > + * @param msg - the SIP message to look into
> > + * @param header_name - the name of the header to search for
> > + * @returns the hdr_field on success or NULL if not found
> > + */
> > +struct hdr_field* cscf_get_header(struct sip_msg * msg, str header_name) {
> > +     struct hdr_field *h;
> > +     if (parse_headers(msg, HDR_EOH_F, 0) < 0) {
> > +             LM_ERR("cscf_get_path: error parsing headers\n");
> > +             return NULL ;
> > +     }
> > +     h = msg->headers;
> > +     while (h) {
> > +             if (h->name.len == header_name.len
> > +                             && strncasecmp(h->name.s, header_name.s, header_name.len) == 0)
> > +                     break;
> > +             h = h->next;
> > +     }
> > +     return h;
> > +}
> > +
> 
> Just a small philosophical note. I think we should be careful not to rebuild Kamailio in a specific "IMS" version.
> 
> Generic functions like this one doesn't belong in the IMS library, it should exist (and maybe does) in the
> core libraries.
> 
> Let's try to merge functionality where we can and not complicate things.
> 
> /O
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 
> 
> 
> 
> 
> 
>  This email is subject to the disclaimer of Smile Communications (PTY) Ltd. at http://www.smilecoms.com/disclaimer
> 
> 
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 
> 
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20130312/33d8cce2/attachment.htm>


More information about the sr-dev mailing list