Author: mturk Date: Sat Nov 24 06:35:02 2012 New Revision: 1413136 URL: http://svn.apache.org/viewvc?rev=1413136&view=rev Log: Even if we have multiple instances of the same socket in the pollset they will always point to the same client_data. No need to sweep trough entire set.
Modified: tomcat/native/branches/1.1.x/native/src/poll.c 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=1413136&r1=1413135&r2=1413136&view=diff ============================================================================== --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Sat Nov 24 06:35:02 2012 @@ -261,17 +261,9 @@ static apr_status_t do_remove(tcn_pollse static void update_last_active(tcn_pollset_t *p, const apr_pollfd_t *fd, apr_time_t t) { - tcn_pfde_t *ep; - - APR_RING_FOREACH(ep, &p->poll_ring, tcn_pfde_t, link) - { - if (fd->desc.s == ep->fd.desc.s) { - tcn_socket_t *s = (tcn_socket_t *)ep->fd.client_data; - /* Found an instance of the fd: update last active time */ - s->last_active = t; - break; - } - } + tcn_socket_t *s = (tcn_socket_t *)fd->client_data; + TCN_ASSERT(s != 0); + s->last_active = t; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org