Changeset 9118
- Timestamp:
- 12/16/13 00:17:42 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cacheex.c
r9105 r9118 28 28 extern CS_MUTEX_LOCK ecmcache_lock; 29 29 extern struct ecm_request_t *ecmcwcache; 30 31 30 32 31 static void *chkcache_process(void) … … 644 643 645 644 } 646 if(awtime > 0 && dwtime <= 0)645 if(awtime > 0 && (dwtime <= 0 || awtime==dwtime) ) //if awtime==dwtime useless check hitcache 647 646 { 648 647 return awtime; -
trunk/oscam-ecm.c
r9105 r9118 818 818 { 819 819 cs_debug_mask(D_LB, "{client %s, caid %04X, prid %06X, srvid %04X} [distribute_ea] send ea by reader %s answering for client %s", (check_client(ea_temp->er->client) ? ea_temp->er->client->account->usr : "-"), ea_temp->er->caid, ea_temp->er->prid, ea_temp->er->srvid, ea_temp->reader->label, (check_client(ea->er->client) ? ea->er->client->account->usr : "-")); 820 if(ea->rc!=E_FOUND) 821 ea->rc=E_NOTFOUND; //e.g. we cannot send timeout, because "ea_temp->er->client" could wait/ask other readers! Simply set not_found! 820 822 write_ecm_answer(ea_temp->reader, ea_temp->er, ea->rc, ea->rcEx, ea->cw, NULL); 821 823 } … … 1343 1345 1344 1346 #ifdef CS_CACHEEX 1345 /* if not wait_time expired and wait_time due to cacheex2 or ecm is cacheex-1 and other normal readers (for check INT cache), we have to waitbefore send rc to client!1346 * (Before cacheex_wait_time_expired, this answered reader is a cacheex mode 1 reader!)1347 /* if not wait_time expired and wait_time due to hitcache, or ecm is cacheex-1 and there are other normal readers for check INT cache, we have to wait wait_time expires before send rc to client! 1348 * (Before cacheex_wait_time_expired, this answered reader is obviously a cacheex mode 1 reader!) 1347 1349 */ 1348 1350 if((!ert->cacheex_wait_time_expired && ert->cacheex_hitcache) || (ert->from_cacheex1_client && ert->reader_nocacheex_avail)) … … 1350 1352 #endif 1351 1353 1354 //check if there are other readers to ask, and if not send NOT_FOUND to client 1352 1355 ert->rcEx = ea->rcEx; 1353 1356 cs_strncpy(ert->msglog, ea->msglog, sizeof(ert->msglog)); … … 2218 2221 if(client->account && !client->account->no_wait_time) 2219 2222 { 2220 wait_time_no_hitcache = get_cacheex_wait_time(er,NULL); //NO check hitcache. Wait_time is dwtime, or, if absent, awtime.2223 wait_time_no_hitcache = get_cacheex_wait_time(er,NULL); //NO check hitcache. Wait_time is dwtime, or, if 0, awtime. 2221 2224 wait_time_hitcache = get_cacheex_wait_time(er,client); //check hitcache for calculating wait_time! If hitcache wait_time is biggest value between dwtime and awtime, else it's awtime. 2222 2225 … … 2225 2228 (cacheex != 1 && er->cacheex_reader_count) 2226 2229 || 2227 /* Cw for ex1-cl comes from: INT. cache by "normal" readers (normal clients that ask normal readers), ex1-rdr and ex2-rdr .2230 /* Cw for ex1-cl comes from: INT. cache by "normal" readers (normal clients that ask normal readers), ex1-rdr and ex2-rdr and ex3-rdr. 2228 2231 * If readers, we have to wait cws generating by normal clients asking normal readers and answers by ex1-rdr (cannot use hitcache). 2229 2232 * If no readers, use hitcache for calculating wait_time. … … 2317 2320 if(er->cacheex_reader_count > 0) 2318 2321 { 2319 er->cacheex_hitcache = wait_time_hitcache ? 1 : 0; //usefull only when cacheex mode 1 readers 2322 er->cacheex_hitcache = wait_time_hitcache ? 1 : 0; //usefull only when cacheex mode 1 readers answers before wait_time and we have to decide if we have to wait until wait_time expires. 2320 2323 request_cw_from_readers(er, 1); // setting stop_stage=1, we request only cacheex mode 1 readers. Others are requested at cacheex timeout! 2321 2324 }
Note:
See TracChangeset
for help on using the changeset viewer.