From: Marengo S. <ste...@gu...> - 2007-02-05 20:35:17
|
I have just released libsipdht-0.7.0 using the fix suggested by Gustavo Garc=EDa Bernardo with the only difference that I have removed sipdht_initialize_headers() because it was used only internally and so it is no more needed. I have also updated all other packages, because they all depend by libsipdht. Bye, Stefano -----Original Message----- From: sip...@li... on behalf of Marengo = Stefano Sent: Thu 2/1/2007 6:26 PM To: sip...@li... Subject: [Sipdht-devel] R: problem with sipdht_initialize_headers = andconstmclass =20 Thanks, I'm investigating... then I will fix it first in CVS and then in = tarballs and debian packages. Bye, Stefano -----Messaggio originale----- Da: sip...@li... per conto di Gustavo = Garc=EDa Bernardo Inviato: mer 31/01/2007 0.58 A: sip...@li... Oggetto: [Sipdht-devel] problem with sipdht_initialize_headers and = constmclass =20 Hi, =20 I'm building sipdht on Windows, and I think I've found a problem. Now, sipdht-tools call sipdht_initilize_headers(sip_default_mclass()) to = include DHT SIP headers in the mclass object. The mclass returned by sip_default_mclass is a reference to a const object and in my opinion it shouldn't be modified. There is where the application crashes on = Windows, and I have asked just now for it in the sofia-sip list (find the = response at the end of this mail).=20 =20 In my opinion, msg_mclass_clone should be used, including it for example = in peer.c: =20 sipdht_peer_create peer->p_mclass =3D msg_mclass_clone(sip_default_mclass(), 0, 0); if (sipdht_initialize_headers(peer->p_mclass) < 0) SIPDHT_ERROR(NULL, "cannot initialize parser"); =20 peer->p_agent =3D nta_agent_create(root, (url_string_t *)peer->p_contact, unexpected_msg_handler, NULL, NTATAG_MCLASS(peer->p_mclass), TAG_END()); =20 sipdht_peer_destroy free(peer->p_mclass); peer->p_mclass =3D NULL; =20 (This should be included in the same way in the get, put and walk = similar create/destroy functions) =20 Let me know your opinion, maybe I'm wrong. In my case this change seems = to work fine. =20 Best regards. =20 G. =20 On 1/30/07, Gustavo Garc=EDa Bernardo <gg...@ti...> wrote: > I'm trying to add a custom SIP header to the mclass object. As far as = > I understand, sip_default_mclass() returns a reference to a const=20 > object (msg_mclass_t const sip_mclass[1]), so I should clone the=20 > mclass object before adding the header. Is it correct? =20 That is right. -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Sipdht-devel mailing list Sip...@li... https://lists.sourceforge.net/lists/listinfo/sipdht-devel |