diff -Nru oscam-1.20-10351~r10123/csctapi/ifd_smartreader.c oscam-1.20-10367~r10139/csctapi/ifd_smartreader.c --- oscam-1.20-10351~r10123/csctapi/ifd_smartreader.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/csctapi/ifd_smartreader.c 2015-01-09 18:08:54.000000000 +0000 @@ -91,6 +91,7 @@ struct sr_data *crdr_data = reader->crdr_data; int32_t ret = 0; uint32_t total_read = 0; + int32_t gone = 0; struct timeb start, now; cs_ftime(&start); @@ -100,7 +101,7 @@ while(crdr_data->g_read_buffer_size == 0) { - int32_t gone = comp_timeb(&now, &start); + gone = comp_timeb(&now, &start); if (gone >= timeout_ms) break; struct timespec ts; @@ -119,7 +120,7 @@ total_read += ret; pthread_mutex_unlock(&crdr_data->g_read_mutex); cs_ftime(&now); - if(ret>0) start=now; // reset timeout calculation again since reader is responsive! + if(ret>0) { cs_ftime(&start); now = start;} // reset timeout calculation again since reader is responsive! } while(total_read < size && comp_timeb(&now, &start) < timeout_ms); rdr_ddump_mask(reader, D_DEVICE, buff, total_read, "SR: Receive:"); diff -Nru oscam-1.20-10351~r10123/csctapi/io_serial.c oscam-1.20-10367~r10139/csctapi/io_serial.c --- oscam-1.20-10351~r10123/csctapi/io_serial.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/csctapi/io_serial.c 2015-01-09 18:08:54.000000000 +0000 @@ -359,8 +359,27 @@ void IO_Serial_Flush(struct s_reader *reader) { unsigned char b; + uint8_t n = 0; tcflush(reader->handle, TCIOFLUSH); - while(!IO_Serial_Read(reader, 0, 75000, 1, &b)) { ; } // first appears between 9~75ms + struct timeb starttotal, endtotal; + struct timeb start, end; + cs_ftimeus(&starttotal); + endtotal = starttotal; + cs_ftimeus(&start); + end = start; + int64_t gone = 0; + while(!IO_Serial_Read(reader, 0, 75000, 1, &b)) // first appears between 9~75ms + { + n++; + cs_ftimeus(&end); + gone = comp_timebus(&end, &start); + rdr_log(reader,"Flush readed byte Nr %d value %.2x time_us %"PRId64, n, b, gone); + cs_ftimeus(&start); // Reset timer + end = start; + } + cs_ftimeus(&endtotal); + gone = comp_timebus(&endtotal, &starttotal); + rdr_log(reader,"Buffers readed %d bytes total time_us %"PRId64, n, gone); } void IO_Serial_Sendbreak(struct s_reader *reader, int32_t duration) @@ -404,7 +423,8 @@ if(readed > 0) { count += readed; - end = start; // reset timeout again since card is responsive! + cs_ftime(&start); // Reset timer + end = start; } gone = comp_timeb(&end, &start); if(count < size) diff -Nru oscam-1.20-10351~r10123/debian/changelog oscam-1.20-10367~r10139/debian/changelog --- oscam-1.20-10351~r10123/debian/changelog 2015-01-04 08:42:43.000000000 +0000 +++ oscam-1.20-10367~r10139/debian/changelog 2015-01-09 18:08:58.000000000 +0000 @@ -1,202 +1,124 @@ -oscam (1.20-10351~r10123-trusty) trusty; urgency=medium +oscam (1.20-10367~r10139-trusty) trusty; urgency=medium - * [r10123] - - WebIf: - - Fix typo - - - * [r10122] - - sci readers. - - revert to flush procedure like it was before. Since there are still reports off non working sci one some stb's. - - flush back to 1 if it not works buffer flush done by reading it out. - - - * [r10121] - - WebIf: - - - set height for select in script.html If script not found. - - - * [r10120] - - - Emm filtering cosmetics for dvbapi - - - - * [r10119] - - Some rework on emm provider matching the reader providers. - Hope I managed to minimize the cs378/camd35 4 digit provid effect! - - - - * [r10118] - - - More log output on emm filtersetting! - + * [r10139] + - Webif cosmetic fixes for dvbapi FTA channels + - Webif page refresh fixes for side-effects introduced by commit 10134 - * [r10117] + Tnx Hook and Ultrar47 for providing a combined patch! - - Even more EMM rework dvbapi module + * [r10138] - * [r10116] + - Fix warning: seems some toolchains like arm-cortex uname is already defined in utsname.h - external reader - I saw that the loop implemented before even never worked. It just caused an oscam block voor 30 tries each seconds one during 60 seconds. - But actually did not a real retry to find the device. Now it will try 10 times 1 try each two seconds . Thats more then enough. If after those tries (20 sec) Device still not found reader will be disabled. And oscam can work with the avbl readers. + * [r10137] - * [r10115] + - dvbapi requestmode 1 now follows prio / ignore rules too - external readers - Added webif ouput reader device error in case off device failure due to wrong configs or unplugged cable + * [r10136] - * [r10114] + general - - DVBAPI: dont rely on data a filter is returning to discover if its the emm cat, better check if emmpid is 0x01 + added sys/utsname.h header. ussefull to determine platform info out off c + * [r10135] - * [r10113] + some emmfix - - Dvbapi: removed emm cat filter from emm filter list too (why was it there in first place?!) -> should prevent cached filtered responses on some type receivers! + added extra protection + * [r10134] - * [r10112] + - Fix for auto http refresh doing "actions" repeatingly for example loadbalancer readerstatistics resets repeat (Tnx Ultra47 for providing patch!) - external readers. - When an external reader cable was unplugged or wrongly configured, Oscam did not allowed clients login at all for other readers with waitforcards (default enabled) Now the reader of wich device can't be detected will be closed and set to disable then oscam can continu whitout that reader. - some small fixes smartreader. + * [r10133] + oscam-time - * [r10111] + millitm param from uint64_t to int64_t - smartreader - Better log output if endpoint detection failed . + * [r10132] - Requested in ticket #4052 + - Ecm handler log cosmetics - * [r10110] - - Emm just compare last 4 digits of provid, this should fix sharereader! + * [r10131] + oscam time + changed uint64_t into int64_t - * [r10109] - - Simplify dvbapi emm reader matching - - Re-introduced camd35/cs378 4 digits emm provid matching + * [r10130] + io-serial + some extra log outputs after reader flush. In us. + sh4 and smartreader timer reset did not worked now it does. - * [r10108] - - Always start filtering on matching emmpid with correct caid and no provid + * [r10129] + Experimental: + While testing changing millitm to uint32_t the ecm requests to my readers start to give random timeouts + But on higher debugging level timeouts disappeared again. + Changing it even further up from uint16_t to uint64_t and the timeouts disappeared completely. - * [r10107] + I seem to unexperienced to find the real reason for this behaviour but for now I want to test if this fixes more issues some users reported! - - Emm rework since auprovid on sharereaders are changing constantly + * [r10128] - * [r10106] + - EMM logging improved - - Revert 10105 since sharereader do deliver 6 digit provid + * [r10127] - * [r10105] + - EMM logging improved - - Minor emm fixing since share readers use only 4 digits provid + * [r10126] - * [r10104] + - EMM logging improved - - dvbapi fix pmt6 listenfd to socket was openened but never closed on connection error -> opening new fd next run -> running eventually out of fd! + * [r10125] - * [r10103] + - Improve EMM logging - - Another rework for emmpid selection versus au enabled readers - - Reanalyzed emm cat parsing -> updated viaccess and nagra parsing + * [r10124] - * [r10102] + fix no current channel txt on status if no picon exist - bulcrypt: Fix ticket #4055 (Bulsatcom removed CAID 5581). - Credits to kraiv and chepik from satsupreme forum. + * [r10123] - * [r10101] - - - Next rework of dvbapi emm handling: - - If you have a card that is multiprovider dont set auprovid. - Just add idents, each ident should match the (emm) provid. - - Example - - Old seca2 card: - - auprovid leave empty - - idents:0100:00006a,00006c,00006d - - - - * [r10100] - - - Attempt to stop starting repeatingily new emmfilters if none are active on a demuxer - This behaviour is e.g. triggered if watching more than 1 channel from same provider - - - - * [r10099] - - - Removed extensive emm matching in dvbapi again (nobody except me used it and it was flooding dvbapi debug logging!) - - Tryfix dvbapi problem on multiecm-s channels (ticket 4056) - - - - * [r10098] - - - Viaccess is now using correct provid again on emm cat parsing (issue introduced 10097) - - - - * [r10097] - - Some more rework of dvbapi emm handling: - - If emm cat is fetched dont filter the emmmpids in it against active au readers, that will be done later on too. - This way we avoid scenario that a new card cant find any valid emmpids and dont get any emm updates. + WebIf: + Fix typo - -- Andrey Pavlenko Sun, 04 Jan 2015 11:42:43 +0300 + -- Andrey Pavlenko Fri, 09 Jan 2015 21:08:58 +0300 diff -Nru oscam-1.20-10351~r10123/globals.h oscam-1.20-10367~r10139/globals.h --- oscam-1.20-10351~r10123/globals.h 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/globals.h 2015-01-09 18:08:54.000000000 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include /* * The following hack is taken from Linux: include/linux/kconfig.h @@ -514,7 +515,7 @@ struct timeb { time_t time; - uint16_t millitm; + int64_t millitm; }; typedef struct cs_mutexlock diff -Nru oscam-1.20-10351~r10123/module-dvbapi.c oscam-1.20-10367~r10139/module-dvbapi.c --- oscam-1.20-10351~r10123/module-dvbapi.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/module-dvbapi.c 2015-01-09 18:08:54.000000000 +0000 @@ -1947,35 +1947,33 @@ return; } } - else + + // prioritize CAIDs which already decoded same caid:provid + for(n = 0; n < demux[demux_index].ECMpidcount; n++) { - // prioritize CAIDs which already decoded same caid:provid - for(n = 0; n < demux[demux_index].ECMpidcount; n++) + c = find_channel_cache(demux_index, n, 1); + if(c != NULL) { - c = find_channel_cache(demux_index, n, 1); - if(c != NULL) - { - cache = 1; //found cache entry - demux[demux_index].ECMpids[n].status = prio; - cs_debug_mask(D_DVBAPI, "[PRIORITIZE PID %d] %04X:%06X:%04X (found caid/provid in cache - weight: %d)", n, - demux[demux_index].ECMpids[n].CAID, demux[demux_index].ECMpids[n].PROVID, demux[demux_index].ECMpids[n].ECM_PID, - demux[demux_index].ECMpids[n].status); - } + cache = 1; //found cache entry + demux[demux_index].ECMpids[n].status = prio; + cs_debug_mask(D_DVBAPI, "[PRIORITIZE PID %d] %04X:%06X:%04X (found caid/provid in cache - weight: %d)", n, + demux[demux_index].ECMpids[n].CAID, demux[demux_index].ECMpids[n].PROVID, demux[demux_index].ECMpids[n].ECM_PID, + demux[demux_index].ECMpids[n].status); } + } - // prioritize CAIDs which already decoded same caid:provid:srvid - for(n = 0; n < demux[demux_index].ECMpidcount; n++) + // prioritize CAIDs which already decoded same caid:provid:srvid + for(n = 0; n < demux[demux_index].ECMpidcount; n++) + { + c = find_channel_cache(demux_index, n, 0); + if(c != NULL) { - c = find_channel_cache(demux_index, n, 0); - if(c != NULL) - { - cache = 2; //found cache entry with higher priority - demux[demux_index].ECMpids[n].status = prio * 2; - if(c->chid < 0x10000) { demux[demux_index].ECMpids[n].CHID = c->chid; } - cs_debug_mask(D_DVBAPI, "[PRIORITIZE PID %d] %04X:%06X:%04X (found caid/provid/srvid in cache - weight: %d)", n, - demux[demux_index].ECMpids[n].CAID, demux[demux_index].ECMpids[n].PROVID, demux[demux_index].ECMpids[n].ECM_PID, - demux[demux_index].ECMpids[n].status); - } + cache = 2; //found cache entry with higher priority + demux[demux_index].ECMpids[n].status = prio * 2; + if(c->chid < 0x10000) { demux[demux_index].ECMpids[n].CHID = c->chid; } + cs_debug_mask(D_DVBAPI, "[PRIORITIZE PID %d] %04X:%06X:%04X (found caid/provid/srvid in cache - weight: %d)", n, + demux[demux_index].ECMpids[n].CAID, demux[demux_index].ECMpids[n].PROVID, demux[demux_index].ECMpids[n].ECM_PID, + demux[demux_index].ECMpids[n].status); } } diff -Nru oscam-1.20-10351~r10123/module-webif.c oscam-1.20-10367~r10139/module-webif.c --- oscam-1.20-10351~r10123/module-webif.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/module-webif.c 2015-01-09 18:08:54.000000000 +0000 @@ -4664,8 +4664,13 @@ tpl_addVar(vars, TPLADD, "CLIENTLASTRESPONSETIMEHIST", value); free_mk_t(value); +#ifdef HAVE_DVBAPI + if((isec < cfg.hideclient_to || cfg.hideclient_to == 0 || streq(cl->account->usr, cfg.dvbapi_usr)) && (cl->typ == 'c' || cl->typ == 'p' || cl->typ == 'r')) + { +#else if((isec < cfg.hideclient_to || cfg.hideclient_to == 0) && (cl->typ == 'c' || cl->typ == 'p' || cl->typ == 'r')) { +#endif if(((cl->typ == 'c')) && (cl->lastreader[0])) { tpl_printf(vars, TPLADD, "MSVALUE", PRINTF_LOCAL_D, cl->cwlastresptime); @@ -4696,13 +4701,15 @@ tpl_printf(vars, TPLAPPEND, "CLIENTLBVALUE", "%s (%'d ms)", xml_encode(vars, cl->lastreader), cl->cwlastresptime); #endif } + if(cl->last_caid == NO_CAID_VALUE) tpl_addVar(vars, TPLADD, "CLIENTLBVALUE", ""); } - if(cl->last_caid != NO_CAID_VALUE && cl->last_srvid != NO_SRVID_VALUE) + if(cl->last_caid != NO_CAID_VALUE || cl->last_srvid != NO_SRVID_VALUE) { + char channame[32]; tpl_printf(vars, TPLADD, "CLIENTCAID", "%04X", cl->last_caid); tpl_printf(vars, TPLADD, "CLIENTSRVID", "%04X", cl->last_srvid); tpl_printf(vars, TPLADD, "CLIENTSRVPROVIDER", "%s%s", cl->last_srvidptr && cl->last_srvidptr->prov ? xml_encode(vars, cl->last_srvidptr->prov) : "", cl->last_srvidptr && cl->last_srvidptr->prov ? ": " : ""); - tpl_addVar(vars, TPLADD, "CLIENTSRVNAME", cl->last_srvidptr && cl->last_srvidptr->name ? xml_encode(vars, cl->last_srvidptr->name) : ""); + tpl_addVar(vars, TPLADD, "CLIENTSRVNAME",xml_encode(vars, get_servicename(cl, cl->last_srvid, cl->last_caid, channame))); tpl_printf(vars, TPLADD, "CLIENTLASTRESPONSETIME", "%d", cl->cwlastresptime ? cl->cwlastresptime : 1); tpl_addVar(vars, TPLADD, "CLIENTSRVTYPE", cl->last_srvidptr && cl->last_srvidptr->type ? xml_encode(vars, cl->last_srvidptr->type) : ""); tpl_addVar(vars, TPLADD, "CLIENTSRVDESCRIPTION", cl->last_srvidptr && cl->last_srvidptr->desc ? xml_encode(vars, cl->last_srvidptr->desc) : ""); diff -Nru oscam-1.20-10351~r10123/oscam-ecm.c oscam-1.20-10367~r10139/oscam-ecm.c --- oscam-1.20-10351~r10123/oscam-ecm.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/oscam-ecm.c 2015-01-09 18:08:54.000000000 +0000 @@ -849,11 +849,11 @@ static const char *stxtWh[16] = {"", "user ", "reader ", "server ", "lserver ", "", "", "", "", "", "", "", "" , "" , "", ""}; char sby[100] = "", sreason[32] = "", scwcinfo[32] = "", schaninfo[32] = "", srealecmtime[50]=""; char erEx[32] = ""; - char uname[38] = ""; + char usrname[38] = ""; char channame[32]; struct timeb tpe; - snprintf(uname, sizeof(uname) - 1, "%s", username(client)); + snprintf(usrname, sizeof(usrname) - 1, "%s", username(client)); #ifdef WITH_DEBUG if(cs_dblevel & D_CLIENTECM) @@ -953,7 +953,10 @@ if(er->rc < E_NOTFOUND) - { er->rcEx = 0; } + { + er->rcEx = 0; + memset(er->msglog, 0, MSGLOGSIZE); // remove reader msglog from previous requests that failed, founds never give back msglog! + } if(er->rcEx) { snprintf(erEx, sizeof(erEx) - 1, "rejected %s%s", stxtWh[er->rcEx >> 4], stxtEx[er->rcEx & 0xf]); } @@ -1247,13 +1250,13 @@ if(er->reader_avail == 1 || er->stage == 0) { cs_log("%s (%s): %s (%d ms)%s%s%s%s", - uname, buf, + usrname, buf, er->rcEx ? erEx : stxt[er->rc], client->cwlastresptime, sby, schaninfo, sreason, scwcinfo); } else { cs_log("%s (%s): %s (%d ms)%s (%c/%d/%d/%d)%s%s%s%s", - uname, buf, + usrname, buf, er->rcEx ? erEx : stxt[er->rc], client->cwlastresptime, sby, stageTxt[er->stage], er->reader_requested, (er->reader_count + er->fallback_reader_count), er->reader_avail, diff -Nru oscam-1.20-10351~r10123/oscam-emm.c oscam-1.20-10367~r10139/oscam-emm.c --- oscam-1.20-10351~r10123/oscam-emm.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/oscam-emm.c 2015-01-09 18:08:54.000000000 +0000 @@ -416,19 +416,31 @@ int32_t is_blocked = 0; - if (aureader->fix_07 == 1 && (caid == 0x098C || caid == 0x09C4) && ep->type == UNIQUE) + if (aureader->fix_07 == 1 && ep->type == UNIQUE) { - if(ep->emm[1] == 0x70 && (ep->emm[8] * 0x100 + ep->emm[9] != 0x200)) + if((caid == 0x098C || caid == 0x09C4) && ep->emm[1] == 0x70 && (ep->emm[8] * 0x100 + ep->emm[9] != 0x200)) { rdr_log(aureader,"emmtype 0x%04X marked as unknown for caid 0x%04X", (ep->emm[8] * 0x100 + ep->emm[9]),caid); ep->type = UNKNOWN; } - if(ep->emm[1] == 0 && (ep->emm[4] *0x100 + ep->emm[5] != 0x200)) + if((caid == 0x098C || caid == 0x09C4) && ep->emm[1] == 0 && (ep->emm[4] * 0x100 + ep->emm[5] != 0x200)) { rdr_log(aureader,"emmtype 0x%04X marked as unknown for caid 0x%04X", (ep->emm[4] * 0x100 + ep->emm[5]),caid); ep->type = UNKNOWN; } + + if(caid == 0x09AF && ep->emm[1] == 0x70 && ep->emm[11] != 2) + { + rdr_log(aureader,"emmtype 0x%02X marked as unknown for caid 0x%04X", ep->emm[11],caid); + ep->type = UNKNOWN; + } + + if(caid == 0x09AF && ep->emm[1] == 0 && ep->emm[7] != 2) + { + rdr_log(aureader,"emmtype 0x%02X marked as unknown for caid 0x%04X", ep->emm[7],caid); + ep->type = UNKNOWN; + } } switch(ep->type) diff -Nru oscam-1.20-10351~r10123/oscam-time.c oscam-1.20-10367~r10139/oscam-time.c --- oscam-1.20-10351~r10123/oscam-time.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/oscam-time.c 2015-01-09 18:08:54.000000000 +0000 @@ -7,7 +7,12 @@ #endif int64_t comp_timeb(struct timeb *tpa, struct timeb *tpb) { - return (uint64_t)(((uint64_t)(tpa->time - tpb->time) * 1000ull) + (tpa->millitm - tpb->millitm)); + return (int64_t)(((int64_t)(tpa->time - tpb->time) * 1000ull) + (tpa->millitm - tpb->millitm)); +} + +int64_t comp_timebus(struct timeb *tpa, struct timeb *tpb) +{ + return (int64_t)(((int64_t)(tpa->time - tpb->time) * 1000000ull) + (tpa->millitm - tpb->millitm)); } /* Checks if year is a leap year. If so, 1 is returned, else 0. */ @@ -121,6 +126,25 @@ tp->millitm = tv.tv_usec / 1000; } +void cs_ftimeus(struct timeb *tp) +{ + struct timeval tv; + gettimeofday(&tv, NULL); +#if defined(CLOCKFIX) + if (tv.tv_sec > lasttime.tv_sec || (tv.tv_sec == lasttime.tv_sec && tv.tv_usec >= lasttime.tv_usec)){ // check for time issues! + lasttime = tv; // register this valid time + } + else + { + tv = lasttime; + settimeofday(&tv, NULL); // set time back to last known valid time + //fprintf(stderr, "*** WARNING: BAD TIME AFFECTING WHOLE OSCAM ECM HANDLING, SYSTEMTIME SET TO LAST KNOWN VALID TIME **** \n"); + } +#endif + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec; +} + void cs_sleepms(uint32_t msec) { //does not interfere with signals like sleep and usleep do diff -Nru oscam-1.20-10351~r10123/oscam-time.h oscam-1.20-10367~r10139/oscam-time.h --- oscam-1.20-10351~r10123/oscam-time.h 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/oscam-time.h 2015-01-09 18:08:54.000000000 +0000 @@ -8,10 +8,12 @@ }; int64_t comp_timeb(struct timeb *tpa, struct timeb *tpb); +int64_t comp_timebus(struct timeb *tpa, struct timeb *tpb); time_t cs_timegm(struct tm *tm); struct tm *cs_gmtime_r(const time_t *timep, struct tm *r); char *cs_ctime_r(const time_t *timep, char *buf); void cs_ftime(struct timeb *tp); +void cs_ftimeus(struct timeb *tp); void cs_sleepms(uint32_t msec); void cs_sleepus(uint32_t usec); diff -Nru oscam-1.20-10351~r10123/reader-irdeto.c oscam-1.20-10367~r10139/reader-irdeto.c --- oscam-1.20-10351~r10123/reader-irdeto.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/reader-irdeto.c 2015-01-09 18:08:54.000000000 +0000 @@ -1036,7 +1036,10 @@ sc_Acs57_Cmd[4] = acslength; reader_chk_cmd(sc_Acs57_Cmd, acslength + 2); if(cta_res[2] != 0) - { rdr_log(reader, "EMM write error %02X", cta_res[2]); } + { + rdr_log(reader, "EMM write error %02X", cta_res[2]); + return ERROR; + } return OK; } else @@ -1057,13 +1060,20 @@ ptr += ADDRLEN; emm += l; memcpy(ptr, &emm[2], dataLen); // copy emm bytes - return (irdeto_do_cmd(reader, cta_cmd, 0, cta_res, &cta_lr) ? 0 : 1); // TODO: this always returns success cause return code cant be 0 + return (irdeto_do_cmd(reader, cta_cmd, 0, cta_res, &cta_lr) == 0 ? OK : ERROR); } } else - { rdr_debug_mask(reader, D_EMM, "addrlen %d > %d", l, ADDRLEN); } + { + rdr_debug_mask(reader, D_EMM, "addrlen %d > %d", l, ADDRLEN); + return ERROR; + } + } + else + { + rdr_debug_mask(reader, D_EMM, "EMM skipped since its hexserial or base doesnt match with this card!"); + return SKIPPED; } - return ERROR; } static int32_t irdeto_card_info(struct s_reader *reader) diff -Nru oscam-1.20-10351~r10123/reader-nagra.c oscam-1.20-10367~r10139/reader-nagra.c --- oscam-1.20-10351~r10123/reader-nagra.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/reader-nagra.c 2015-01-09 18:08:54.000000000 +0000 @@ -1328,8 +1328,10 @@ { //check EMM prov id if(memcmp(&reader->prid[0][2], ep->emm + 10, 2)) - { return ERROR; } - + { + rdr_debug_mask(reader, D_READER, "EMM skipped since provider doesnt match!"); + return SKIPPED; + } // emm_data: 82 70 8E 00 00 00 00 00 D3 87 8D 11 C0 F4 B1 27 2C 3D 25 94 ... //serial_data: A0 CA 00 00 8C D3 8A 01 00 00 00 00 C0 F4 B1 27 2C 3D 25 94 ... unsigned char emm_trim[150] = { 0x01, 0x00, 0x00, 0x00, 0x00 }; diff -Nru oscam-1.20-10351~r10123/reader-seca.c oscam-1.20-10367~r10139/reader-seca.c --- oscam-1.20-10351~r10123/reader-seca.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/reader-seca.c 2015-01-09 18:08:54.000000000 +0000 @@ -487,8 +487,8 @@ i = get_prov_index(reader, prov_id_ptr); if(i == -1) { - rdr_log(reader, "EMM: provider id not found."); - return ERROR; + rdr_log(reader, "EMM: skipped since provider id doesnt match"); + return SKIPPED; } ins40[2] = (ep->emm[ins40data_offset - 2] & 0xF0) | (i & 0x0F); diff -Nru oscam-1.20-10351~r10123/reader-viaccess.c oscam-1.20-10367~r10139/reader-viaccess.c --- oscam-1.20-10351~r10123/reader-viaccess.c 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/reader-viaccess.c 2015-01-09 18:08:54.000000000 +0000 @@ -1472,8 +1472,8 @@ } else { - rdr_log(reader, "EMM: provider or key not found on card (%x, %x)", emm_provid, keynr); - return ERROR; + rdr_log(reader, "EMM: ignored since provider or key not present on card (%x, %x)", emm_provid, keynr); + return SKIPPED; } // check if the provider changes. If yes, set the new one. If not, don't .. card will return an error if we do. diff -Nru oscam-1.20-10351~r10123/webif/include/jscript.js oscam-1.20-10367~r10139/webif/include/jscript.js --- oscam-1.20-10351~r10123/webif/include/jscript.js 2015-01-04 08:42:36.000000000 +0000 +++ oscam-1.20-10367~r10139/webif/include/jscript.js 2015-01-09 18:08:54.000000000 +0000 @@ -3,6 +3,7 @@ function reloadDocument() { if(!withquery) history.pushState('', document.title, window.location.pathname); + else if (window.location.href.match(/(&|&)action=\w+/)) history.pushState('', document.title, window.location.href.replace(/(&|&)action=\w+/,'')); window.location.reload(); }; @@ -1213,8 +1214,8 @@ } else { // picon is not delivered in JSON - we set the text of column - if (item.request.chprovider && item.request.chname && item.request.srvid != '0000') { - $(uid + " > td.statuscol13").html(item.request.chprovider + item.request.chname); + if (item.request.chname && item.request.srvid != '0000') { + $(uid + " > td.statuscol13 > a").html(item.request.chprovider + item.request.chname); } else { $(uid + " > td.statuscol13").html(''); } @@ -1222,7 +1223,7 @@ } if (!is_nopoll('statuscol14')) { - if (item.type == 's' || item.type == 'h' || item.type == 'm') { + if ('hms'.indexOf(item.type) > (-1) || item.request.caid == 'FFFE') { $(uid + " > td.statuscol14").text(''); } else { var value = item.type == 'c' ? (item.request.answered ? item.request.answered + ' (' + item.request.msvalue + ' ms)' : '') : item.request.lbvalue;