Changeset 8460


Ignore:
Timestamp:
03/03/13 18:50:54 (9 years ago)
Author:
TNe-TWo
Message:

bring cacheex rdr 1 back to work after commit 8370
waittime setup on rdr destination server !
ex1 rdr win, no wait when also possibe wait for ex2/ex3/csp cache
but in time for wait answerback from ex1rdr ex2/ex3/csp can also answer

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-ecm.c

    r8456 r8460  
    13181318
    13191319    struct s_ecm_answer *ea, *prv = NULL;
     1320    uint32_t ex1rdr = 0;
    13201321    if (er->rc >= E_99 && !cacheex_is_match_alias(client, er)) {
    13211322        er->reader_avail = 0;
     
    13741375        er->reader_count = 0;
    13751376        for (ea = er->matching_rdr; ea; ea = ea->next) {
     1377            if (cacheex_reader(ea->reader))
     1378                ex1rdr++;
    13761379            if (ea->status & READER_ACTIVE) {
    13771380                if (!(ea->status & READER_FALLBACK))
     
    14251428#ifdef CS_CACHEEX
    14261429    int8_t cacheex = client->account ? client->account->cacheex.mode : 0;
    1427     uint32_t cacheex_wait_time = get_cacheex_wait_time(er,client);
     1430    uint32_t cacheex_wait_time = ex1rdr>0 ? 0 : get_cacheex_wait_time(er,client); //ex1 reader win, no wait, in time of wait for exscp we ask ex1 already
    14281431    uint8_t cwcycle_act = cwcycle_check_act(er->caid);
    14291432    if (!cwcycle_act)
    1430         cs_debug_mask(D_CACHEEX | D_CSPCWC, "[GET_CW] wait_time %d caid %04X prov %06X srvid %04X rc %d cacheex %d", cacheex_wait_time, er->caid, er->prid, er->srvid, er->rc, cacheex);
     1433        cs_debug_mask(D_TRACE | D_CACHEEX, "[GET_CW] wait_time %d caid %04X prov %06X srvid %04X rc %d cacheex cl mode  %d ex1rdr %d", cacheex_wait_time, er->caid, er->prid, er->srvid, er->rc, cacheex, ex1rdr);
    14311434    if ((cacheex_wait_time && !cwcycle_act) && er->rc == E_UNHANDLED) { //not found in cache, so wait!
    14321435        add_ms_to_timeb(&er->cacheex_wait, cacheex_wait_time);
     
    14511454        }
    14521455        if (max_wait <= 0 ) {
    1453             cs_debug_mask(D_CACHEEX|D_CSPCWC, "[GET_CW] wait_time over");
     1456            cs_debug_mask(D_TRACE | D_CACHEEX, "[GET_CW] wait_time over");
    14541457            snprintf(er->msglog, MSGLOGSIZE, "wait_time over");
    14551458        }
     
    15301533#if defined CS_CACHEEX && defined CW_CYCLE_CHECK
    15311534    if (cwcycle_act)
    1532         cs_debug_mask(D_CACHEEX | D_CSPCWC, "[GET_CW] wait_time (cwc) %d caid %04X prov %06X srvid %04X rc %d cacheex %d %ld", cacheex_wait_time, er->caid, er->prid, er->srvid, er->rc, cacheex, er->tps.time);
     1535        cs_debug_mask(D_TRACE | D_CACHEEX, "[GET_CW] wait_time (cwc) %d caid %04X prov %06X srvid %04X rc %d cacheex cl mode %d ex1rdr %d", cacheex_wait_time, er->caid, er->prid, er->srvid, er->rc, cacheex, ex1rdr);
    15331536    if ((cacheex_wait_time && cwcycle_act) && er->rc == E_UNHANDLED) { //wait for cache answer!
    15341537        add_ms_to_timeb(&er->cacheex_wait, cacheex_wait_time);
  • trunk/oscam.c

    r8455 r8460  
    794794
    795795            tbc = er->tps;
    796 #if defined CS_CACHEEX && defined CW_CYCLE_CHECK
    797             time_to_check = add_ms_to_timeb(&tbc, (er->stage < 2) ? er->cacheex_wait_time:((er->stage < 4) ? auto_timeout(er, cfg.ftimeout) : auto_timeout(er, cfg.ctimeout)));
     796#ifdef CS_CACHEEX
     797            time_to_check = add_ms_to_timeb(&tbc, (er->stage < 2 && er->cacheex_wait_time) ? er->cacheex_wait_time:((er->stage < 4) ? auto_timeout(er, cfg.ftimeout) : auto_timeout(er, cfg.ctimeout)));
    798798#else
    799799            time_to_check = add_ms_to_timeb(&tbc, ((er->stage < 4) ? auto_timeout(er, cfg.ftimeout) : auto_timeout(er, cfg.ctimeout)));
     
    801801            if (comp_timeb(&t_now, &tbc) >= 0) {
    802802                if (er->stage < 4) {
    803 #if defined CS_CACHEEX && defined CW_CYCLE_CHECK
     803#ifdef CS_CACHEEX
    804804                    if (er->stage < 2 && er->cacheex_wait_time)
    805805                        debug_ecm(D_TRACE, "request for %s %s", username(er->client), buf);
Note: See TracChangeset for help on using the changeset viewer.