tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1342010 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
Date Thu, 24 May 2012 14:18:38 GMT
2012/5/24  <markt@apache.org>:
> Author: markt
> Date: Wed May 23 20:07:46 2012
> New Revision: 1342010
>
> URL: http://svn.apache.org/viewvc?rev=1342010&view=rev
> Log:
> Renames to make code clearer
> socket_ttl -> socket_last_active
> max_ttl -> default_timeout
> Back port of r1342008
>
> Modified:
>    tomcat/native/branches/1.1.x/   (props changed)
>    tomcat/native/branches/1.1.x/native/src/poll.c
>
> Propchange: tomcat/native/branches/1.1.x/
> ------------------------------------------------------------------------------
>  Merged /tomcat/native/trunk:r1342008
>
> Modified: tomcat/native/branches/1.1.x/native/src/poll.c
> URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342010&r1=1342009&r2=1342010&view=diff
> ==============================================================================
> --- tomcat/native/branches/1.1.x/native/src/poll.c (original)
> +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 20:07:46 2012
> @@ -40,8 +40,8 @@ typedef struct tcn_pollset {
>     apr_pollset_t *pollset;
>     jlong         *set;
>     apr_pollfd_t  *socket_set;
> -    apr_time_t    *socket_ttl;
> -    apr_interval_time_t max_ttl;
> +    apr_time_t    *socket_last_active;
> +    apr_interval_time_t default_timeout;
>  #ifdef TCN_DO_STATISTICS
>     int sp_added;
>     int sp_max_count;
> @@ -128,12 +128,12 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)(
>     TCN_CHECK_ALLOCATED(tps->set);
>     tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t));
>     TCN_CHECK_ALLOCATED(tps->socket_set);
> -    tps->socket_ttl = apr_palloc(p, size * sizeof(apr_interval_time_t));
> -    TCN_CHECK_ALLOCATED(tps->socket_ttl);
> +    tps->socket_last_active = apr_palloc(p, size * sizeof(apr_interval_time_t));

Looking at the declaration of "socket_last_active" field, the above
should have used sizeof(apr_time_t).


> +    TCN_CHECK_ALLOCATED(tps->socket_last_active);
>     tps->nelts  = 0;
>     tps->nalloc = size;
>     tps->pool   = p;
> -    tps->max_ttl = J2T(ttl);
> +    tps->default_timeout = J2T(ttl);
> (...)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message