[Vortex] [PATCH] sanitize vortex_connection_*
Benoit Amiaux
b.amiaux at ateme.com
Tue Jan 22 16:58:53 CET 2008
Hi Francis,
Francis Brosnan Blazquez wrote:
>> @@ -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..
I'm not sure about that, let's see if I understood the code properly:
There is one place where vortex_connection_get_connect_timeout is used
which is in __vortex_connection_new() function.
d_timeout = vortex_connection_get_connect_timeout ();
The following code is then used with d_timeout
while (d_start_time + d_timeout > time (NULL)) {
time(NULL), both under windows and POSIX systems return the number of
seconds since 1970-01-01 which imply that d_timeout unit is in seconds.
Finally, vortex_connection_get_connect_timeout() will return
ctx->connection_connect_std_timeout by default. That's why I fixed the
default value to 60 instead of 60*1000000.
Correct me if I overlooked something
Thanks,
--
Amiaux Benoît - b.amiaux at ateme.com
More information about the Vortex
mailing list