View | Details | Raw Unified | Return to bug 57653
Collapse All | Expand All

(-)native/src/poll.c (+13 lines)
Lines 294-299 Link Here
294
    UNREFERENCED(o);
294
    UNREFERENCED(o);
295
    TCN_ASSERT(pollset != 0);
295
    TCN_ASSERT(pollset != 0);
296
296
297
    // xxx
298
    if(!p) {
299
        tcn_ThrowAPRException(e, APR_ENOPOLL);
300
        return -(jint)APR_ENOPOLL;
301
    }
297
#ifdef TCN_DO_STATISTICS
302
#ifdef TCN_DO_STATISTICS
298
     p->sp_poll++;
303
     p->sp_poll++;
299
#endif
304
#endif
Lines 307-312 Link Here
307
        {
312
        {
308
            apr_interval_time_t socket_timeout = 0;
313
            apr_interval_time_t socket_timeout = 0;
309
            tcn_socket_t *s = (tcn_socket_t *)ep->fd.client_data;
314
            tcn_socket_t *s = (tcn_socket_t *)ep->fd.client_data;
315
            if(!s) {
316
                tcn_ThrowAPRException(e, APR_EINVALSOCK);
317
                return -(jint)APR_EINVALSOCK;
318
            }
310
            if (s->timeout == TCN_NO_SOCKET_TIMEOUT) {
319
            if (s->timeout == TCN_NO_SOCKET_TIMEOUT) {
311
                socket_timeout = p->default_timeout;
320
                socket_timeout = p->default_timeout;
312
            }
321
            }
Lines 358-363 Link Here
358
            now = apr_time_now();
367
            now = apr_time_now();
359
        for (i = 0; i < num; i++) {
368
        for (i = 0; i < num; i++) {
360
            tcn_socket_t *s = (tcn_socket_t *)fd->client_data;
369
            tcn_socket_t *s = (tcn_socket_t *)fd->client_data;
370
            if(!s) {
371
                tcn_ThrowAPRException(e, APR_EINVALSOCK);
372
                return -(jint)APR_EINVALSOCK;
373
            }
361
            p->set[i*2+0] = (jlong)(fd->rtnevents);
374
            p->set[i*2+0] = (jlong)(fd->rtnevents);
362
            p->set[i*2+1] = P2J(s);
375
            p->set[i*2+1] = P2J(s);
363
            if (remove) {
376
            if (remove) {

Return to bug 57653