Author: rjung Date: Sat May 23 12:13:03 2015 New Revision: 1681334 URL: http://svn.apache.org/r1681334 Log: Forward port from 1.1:
r1413136 | mturk | 2012-11-24 07:35:02 +0100 (Sat, 24 Nov 2012) | 1 line 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/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1681334&r1=1681333&r2=1681334&view=diff ============================================================================== --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Sat May 23 12:13:03 2015 @@ -298,17 +298,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; } TCN_IMPLEMENT_CALL(jint, Poll, remove)(TCN_STDARGS, jlong pollset, --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org