[OpenSIPS-Devel] SF.net SVN: opensips:[5091] trunk/modules

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jan 7 14:35:44 CET 2009



Anca Vamanu schrieb:
> Hi Klaus,
> 
> I have changed pua_dialog info module not that much because of bugs but 
> because of improvements in code.
> I have found a bug - when you retrieved the parameter in dialog 
> callback.  In file pua_dialoginfo.c at line 196 you have this:
> struct dlginfo_cell *dlginfo = (struct dlginfo_cell*)_params->param;
> But in fact you need to indirect this like this:
> struct dlginfo_cell *dlginfo = (struct dlginfo_cell*)(*_params->param);
> 
> The reason for this is if you look in 'run_dlg_callbacks' function from 
> modules/dialog/dlg_cb.c at line 251:
> params.param = &cb->param;
> you can see that the param field of the structure retains the address of 
> the parameter.
> 
> However I have taken the parameter part all out because I consider that 
> there is no need for it. I saw that in your comments you mentioned that 
> you chose to copy the info in your structure and pass it as a parameter 
> because:
> /* store the important data locally to avoid reading the data from the
>   dlg_cell during the callback (as this could create a race condition
>   if the dlg_cell gets meanwhile deleted) */
> In fact there is no race condition as the dialog structure is locked 
> while the callbacks are executed.

Interesting: We had a discussion on the mailing list with the result 
that the data should be copied during the CREATE callback as the other 
callbacks are executed without lock, please see:
http://lists.kamailio.org/pipermail/devel/2008-September/016112.html

regards
klaus


> 
> Some other changes that I made are:
> - I have added the 'dialog' event to pua module from pua_dialoginfo module
> - I have added presence_server module parameter and taken out 
> override_lifetime parameter.
> 
> regards,
> Anca
> 
> Klaus Darilion wrote:
>>
>>
>> Anca Vamanu wrote:
>>> Revision: 5091
>>>           
>>> http://opensips.svn.sourceforge.net/opensips/?rev=5091&view=rev
>>> Author:   anca_vamanu
>>> Date:     2008-12-22 15:08:17 +0000 (Mon, 22 Dec 2008)
>>>
>>> Log Message:
>>> -----------
>>> - added modules pua_dialoginfo and presence_dialoginfo - they were 
>>> imported from Kamailio( author Klaus Darilion), but suffered some 
>>> modifications
>>
>>
>> Hi Anca!
>>
>> I have troubles understanding your commit message. Have you modified 
>> the modules?
>>
>> If yes - did you found some bugs, or why?
>>
>> thanks
>> klaus
>>
>>
>>> - the module implements the BLF feature described in RFC4235
>>> - it has beed tested with snom 320 phones
>>>
>>> Added Paths:
>>> -----------
>>>     trunk/modules/presence_dialoginfo/
>>>     trunk/modules/presence_dialoginfo/Makefile
>>>     trunk/modules/presence_dialoginfo/README
>>>     trunk/modules/presence_dialoginfo/add_events.c
>>>     trunk/modules/presence_dialoginfo/add_events.h
>>>     trunk/modules/presence_dialoginfo/doc/
>>>     trunk/modules/presence_dialoginfo/doc/presence_dialoginfo.xml
>>>     trunk/modules/presence_dialoginfo/doc/presence_dialoginfo_admin.xml
>>>     trunk/modules/presence_dialoginfo/notify_body.c
>>>     trunk/modules/presence_dialoginfo/notify_body.h
>>>     trunk/modules/presence_dialoginfo/pidf.c
>>>     trunk/modules/presence_dialoginfo/pidf.h
>>>     trunk/modules/presence_dialoginfo/presence_dialoginfo.c
>>>     trunk/modules/presence_dialoginfo/presence_dialoginfo.h
>>>     trunk/modules/pua_dialoginfo/
>>>     trunk/modules/pua_dialoginfo/Makefile
>>>     trunk/modules/pua_dialoginfo/README
>>>     trunk/modules/pua_dialoginfo/dialog_publish.c
>>>     trunk/modules/pua_dialoginfo/doc/
>>>     trunk/modules/pua_dialoginfo/doc/pua_dialoginfo.xml
>>>     trunk/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
>>>     trunk/modules/pua_dialoginfo/pua_dialoginfo.c
>>>     trunk/modules/pua_dialoginfo/pua_dialoginfo.h
>>>
>>>
>>> This was sent by the SourceForge.net collaborative development 
>>> platform, the world's largest Open Source development site.
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
> 



More information about the Devel mailing list