[Vortex] Bug in vortex_alive.c (vortex-1.1.6.b4526.g4526)

Francis Brosnan Blazquez francis at aspl.es
Mon Nov 8 19:25:20 CET 2010


> Hi,

Hi Gernot,

> I am evaluating the vortex alive feature, which was broken until the
> latest release. 
> 
> Thanks for the fix!!!!

Nice.

> I think I found another, but minor bug:

Ok,

> In vortex_alive_enable_check(…)
> 
> axl_bool           vortex_alive_enable_check
> (VortexConnection * conn,
> 
>                                                     long
> check_period,
> 
>                                                     int
> max_unreply_count,
> 
>                                                     VortexAliveFailure
> failure_handler)
> 
> {
> 
>        VortexAliveData * data;
> 
>        VortexCtx        * ctx = CONN_CTX (conn);
> 
>  
> 
>        if (check_period <= 0 || max_unreply_count < 0) {
> 
>               vortex_log (VORTEX_LEVEL_CRITICAL, "Expecified an
> unsupported check period or max unreply count. Both must be > 0.");
> 
>               return axl_false;
> 
>        }
> 
>  
> 
>        /* check if the connection is already checked */
> 
>        if (PTR_TO_INT (vortex_connection_get_data (conn,
> VORTEX_ALIVE_CHECK_ENABLED))) {
> 
>               vortex_log (VORTEX_LEVEL_WARNING, "Calling to enable
> connection alive check where it is already enabled");
> 
>               return axl_false;
> 
>        } /* end if */
> 
>  
> 
>        /* check to get a reference to the connection */
> 
>        data       = axl_new (VortexAliveData, 1);
> 
>        if (data == NULL) {
> 
>               vortex_log (VORTEX_LEVEL_CRITICAL, "failed to acquire
> memory to hold VortexAliveData, unable to continue");
> 
>               return axl_false;
> 
>        }
> 
>        data->conn              = conn;
> 
>        data->failure_handler   = failure_handler;
> 
>        data->max_unreply_count = max_unreply_count;
> 
>        data->check_period      = check_period;
> 
>  
> 
>        if (! vortex_connection_ref (conn, "alive-check")) {
> 
>               vortex_log (VORTEX_LEVEL_CRITICAL, "Failed to enable
> alive check, connection reference acquisition have failed");
> 
> BUG:>>>> Memory leak: data pointer should be freed here.

Ok, thanks for reporting Gernot. The patch is now applied in svn [1].
Cheers!

[1] https://dolphin.aspl.es/svn/publico/af-arch/trunk/libvortex-1.1/

>               return axl_false;
> 
>        }
> 
>  
> 
>  
> 
>  
> 
> Gernot Seidler
> Software Architect
> 
> Egenera Inc. | Converge. Unify. Simplify.™ 
> 
> 508-858-3185 (office)
> 508-481-3114 (fax)
> 
> http://www.egenera.com
> http://blog.egenera.com
> 
>  
> 
> 
> _______________________________________________
> Vortex mailing list
> Vortex at lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/vortex
-- 
Francis Brosnan Blázquez <francis.brosnan at aspl.es>
ASPL
91 134 14 22 - 91 134 14 45 - 91 116 07 57

AVISO LEGAL

Este mensaje se dirige exclusivamente a su destinatario. Los datos
incluidos en el presente correo son confidenciales y sometidos a secreto
profesional, se prohíbe divulgarlos, en virtud de las leyes vigentes. Si
usted no lo es y lo ha recibido por error o tiene conocimiento del mismo
por cualquier motivo, le rogamos que nos lo comunique por este medio y
proceda a destruirlo o borrarlo.

En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL). No obstante, usted puede ejercitar sus derechos de acceso,
rectificación, cancelación y oposición dispuestos en la mencionada Ley
Orgánica, notificándolo por escrito a:
ASPL - Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de
Henares (Madrid).



More information about the Vortex mailing list