[Kamailio-Devel] SF.net SVN: openser:[4756] trunk/modules/tm/sip_msg.c

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 28 08:49:46 CEST 2008


Hello Juha,

On 08/28/08 09:28, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>  > Log Message:
>  > -----------
>  > - fix cloning in shm for pai header hook
>  > - all hdrs with hooks needs to be reviewed for similar issue
>  > - perhaps whole sip_msg cloning in shm of sip_msg has to be
>  > - redesigned
>
> daniel,
>
> thanks for the fix.  if i remember correctly, it was my mistake.  i
> simply forgot to add those cloning statements although i had remembered
> to add them for some other headers.
>
> i agree that i would be nice if a header could be added by touching
> fewer places in the code, but i guess that frequency is now getting less
> when new headers need to be added.
>   
the problem is about maintenance, when new developers come in or take 
over. I agree that in tm might be fewer new headers in the future. It is 
not only about adding new headers, but also changing the structure of 
parsed header, if that structure is cloned as well.

I think we should consider building an API for each header, with rules 
for naming functions
- parsing function
- free function
- cloning function

This can be in a structure in an array indexed by header type. If a 
function is not needed, then will be set to null. Not a priority to do 
it now, but could help also in the direction of asynchronous processing.

Cheers,
Daniel

> -- juha
>
> _______________________________________________
> Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list