Changeset 5358


Ignore:
Timestamp:
Jun 5, 2011, 10:32:33 PM (9 years ago)
Author:
Admin
Message:

Enhancement #1814: Add log message on failed ecm in order to be able to identify them. Get the caching use in getservicename function really working.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-reader.c

    r5349 r5358  
    11#include "globals.h"
     2#include "reader-common.h"
    23
    34int32_t logfd=0;
     
    520521  cs_ftime(&tps);
    521522  er->rc=reader_ecm(reader, er);
     523  if(er->rc == ERROR){
     524    char buf[32];
     525    cs_log("Error processing ecm for caid %04X, srvid %04X (servicename: %s) on reader %s.", er->caid, er->srvid, get_servicename(reader->client, er->srvid, er->caid, buf), reader->label);   
     526  }
    522527  cs_ftime(&tpe);
    523528  if (cs_dblevel) {
  • trunk/oscam-simples.c

    r5353 r5358  
    782782    if (cl && cl->last_srvidptr && cl->last_srvidptr->srvid==srvid)
    783783        for (i=0; i < cl->last_srvidptr->ncaid; i++)
    784             if (cl->last_srvidptr->caid[i] == caid)
     784            if (cl->last_srvidptr->caid[i] == caid && cl->last_srvidptr->name){
    785785                cs_strncpy(buf, cl->last_srvidptr->name, 32);
     786                return(buf);
     787            }
    786788
    787789    for (this = cfg.srvid[srvid>>12]; this && (!buf[0]); this = this->next)
    788790        if (this->srvid == srvid)
    789             for (i=0; i<this->ncaid; i++)
     791            for (i=0; i < this->ncaid; i++)
    790792                if (this->caid[i] == caid && this->name) {
    791793                    cs_strncpy(buf, this->name, 32);
    792794                    cl->last_srvidptr = this;
     795                    return(buf);
    793796                }
    794797
Note: See TracChangeset for help on using the changeset viewer.