[Vortex] [PATCH] sanitize vortex_connection_*
Francis Brosnan Blazquez
francis at aspl.es
Tue Jan 22 16:37:46 CET 2008
> Hello,
Hi Benoit,
> Documentation and code is not synchronized with
> vortex_connection_*_timeout. Attached patch fixes that
I've updated some part of the patch, see next...
> Index: src/vortex_connection.c
> ===================================================================
> --- src/vortex_connection.c (revision 3231)
> +++ src/vortex_connection.c (working copy)
> @@ -2034,7 +2034,7 @@
> } /* end if */
>
> if (d_timeout == 0) {
> - /* no timeout definition done using default timeout 10
> seconds */
> + /* no timeout definition done using default timeout 60
> seconds */
> return ctx->connection_std_timeout;
> }else {
> /* update current std timeout */
> @@ -2053,7 +2053,7 @@
> * See also \ref vortex_connection_connect_timeout.
> *
> * @return Current timeout configured. Returned value is measured in
> - * microseconds (1 second = 1000000 microseconds).
> + * seconds.
> */
> long int vortex_connection_get_connect_timeout ()
> {
> @@ -4651,7 +4651,8 @@
> /**** vortex_connection.c: init connection module */
> ctx->connection_id = 1;
> ctx->connection_enable_sanity_check = true;
> - ctx->connection_std_timeout = 60000000;
> + ctx->connection_connect_std_timeout = 60;
> + ctx->connection_std_timeout =
> ctx->connection_connect_std_timeout * 1000000;
I've not applied this part of the patch because both values must have
60000000, which are 60 seconds measured in microseconds... Doing so will
cause vortex_connection_timeout and vortex_connection_connect_timeout to
return seconds rather than micro..
> vortex_mutex_create (&ctx->connection_xml_cache_mutex);
> vortex_mutex_create (&ctx->connection_hostname_mutex);
> Index: src/vortex_connection.h
> ===================================================================
> --- src/vortex_connection.h (revision 3231)
> +++ src/vortex_connection.h (working copy)
> @@ -93,7 +93,7 @@
>
> VortexConnection * __connection,
>
> VortexPeerRole role);
>
> -void vortex_connection_timeout (long
> int miliseconds_to_wait);
> +void vortex_connection_timeout (long
> int microseconds_to_wait);
Ok. Applied.
Thanks for reporting Benoit. Cheers!
--
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
More information about the Vortex
mailing list