Author: markt Date: Tue Mar 17 10:28:05 2015 New Revision: 1667243 URL: http://svn.apache.org/r1667243 Log: Follow-up to r1665888. Review by kkolinko. else clause should not depend on s->pe
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=1667243&r1=1667242&r2=1667243&view=diff ============================================================================== --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Tue Mar 17 10:28:05 2015 @@ -366,15 +366,17 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN least, multiple pairs have been observed. In this case do not try and remove socket from the pollset for a second time else a crash will result. */ - if (remove && s->pe) { - apr_pollset_remove(p->pollset, fd); - APR_RING_REMOVE(s->pe, link); - APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link); - s->pe = NULL; - p->nelts--; + if (remove) { + if (s->pe) { + apr_pollset_remove(p->pollset, fd); + APR_RING_REMOVE(s->pe, link); + APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link); + s->pe = NULL; + p->nelts--; #ifdef TCN_DO_STATISTICS - p->sp_removed++; + p->sp_removed++; #endif + } } else { /* Update last active with the current time --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org