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

(-)file_not_specified_in_diff (-4 / +52 lines)
Line  Link Here
0
-- native/common/jk_ajp_common.c
0
++ native/common/jk_ajp_common.c
Lines 3345-3347 Link Here
3345
    JK_TRACE_EXIT(l);
3345
    JK_TRACE_EXIT(l);
3346
    return JK_FALSE;
3346
    return JK_FALSE;
3347
}
3347
}
3348
-- native/common/jk_ajp_common.h
3348
3349
int ajp_has_endpoint(jk_worker_t *pThis,
3350
                     jk_logger_t *l)
3351
{
3352
    JK_TRACE_ENTER(l);
3353
3354
    if (pThis && pThis->worker_private) {
3355
        ajp_worker_t *aw = pThis->worker_private;
3356
        int rc;
3357
3358
        JK_ENTER_CS(&aw->cs, rc);
3359
        if (rc) {
3360
            unsigned int slot;
3361
            /* Try to find connected socket cache entry */
3362
            for (slot = 0; slot < aw->ep_cache_sz; slot++) {
3363
                if (aw->ep_cache[slot]) {
3364
                    JK_LEAVE_CS(&aw->cs, rc);
3365
                    return JK_TRUE;
3366
                }
3367
            }
3368
            JK_LEAVE_CS(&aw->cs, rc);
3369
        }
3370
        else {
3371
            jk_log(l, JK_LOG_ERROR,
3372
                    "locking thread (errno=%d)", errno);
3373
            JK_TRACE_EXIT(l);
3374
            return JK_FALSE;
3375
        }
3376
    }
3377
    else {
3378
        JK_LOG_NULL_PARAMS(l);
3379
    }
3380
3381
    JK_TRACE_EXIT(l);
3382
    return JK_FALSE;
3383
}
3384
++ native/common/jk_ajp_common.h
Lines 458-463 Link Here
458
int jk_ajp_get_cping_mode(const char *m, int def);
458
int jk_ajp_get_cping_mode(const char *m, int def);
459
int ajp_has_endpoint(jk_worker_t *pThis, jk_logger_t *l);
460
459
#ifdef __cplusplus
461
#ifdef __cplusplus
460
}
462
}
461
#endif                          /* __cplusplus */
463
#endif                          /* __cplusplus */
462
-- native/common/jk_lb_worker.c
464
++ native/common/jk_lb_worker.c
Lines 1085-1092 Link Here
1085
    if (p->worker->sequence != p->worker->s->h.sequence)
1085
    if (p->worker->sequence != p->worker->s->h.sequence)
1086
        jk_lb_pull(p->worker, JK_FALSE, l);
1086
        jk_lb_pull(p->worker, JK_FALSE, l);
1087
    for (i = 0; i < num_of_workers; i++) {
1087
    for (i = 0; i < num_of_workers; i++) {
1088
        lb_sub_worker_t *rec = &(p->worker->lb_workers[i]);
1089
        if (rec->s->state == JK_LB_STATE_BUSY) {
1090
            if (ajp_has_endpoint(rec->worker, l)) {
1091
                if (JK_IS_DEBUG_LEVEL(l))
1092
                    jk_log(l, JK_LOG_DEBUG,
1093
                           "worker %s busy count fixed",
1094
                           rec->name);
1095
                rec->s->state = JK_LB_STATE_OK;
1096
            }
1097
        }
1088
        /* Copy the shared state info */
1098
        /* Copy the shared state info */
1089
        p->states[i] = p->worker->lb_workers[i].s->state;
1099
        p->states[i] = rec->s->state;
1090
    }
1100
    }
1091
    /* set the recovery post, for LB mode */
1101
    /* set the recovery post, for LB mode */

Return to bug 51417