Changeset 18557


Ignore:
Timestamp:
11/12/12 22:39:52 (11 years ago)
Author:
nit
Message:

[titan] fix epgscan

Location:
titan/titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/epg.h

    r18548 r18557  
    14361436                if(eitlen == 0 || chnode == NULL)
    14371437                        return;
    1438                 if(chnode == status.aktservice->channel && status.aktservice->type != CHANNEL)
     1438                if(flag == 0 && chnode == status.aktservice->channel && status.aktservice->type != CHANNEL)
    14391439                        return;
    14401440               
     
    17201720
    17211721        akttime = time(NULL);
    1722         if(chnode == NULL)
    1723         {
    1724                 if(status.aktservice->channel != NULL && status.aktservice->channel->transponder != NULL && status.aktservice->channel->transponder->lastepg > akttime && status.aktservice->channel->epg != NULL)
    1725                 {
    1726                         debug(400, "skip epg read (%ld < %ld)", akttime, status.aktservice->channel->transponder->lastepg);
    1727                         skip = (status.aktservice->channel->transponder->lastepg - akttime) * 2;
    1728                 }
    1729         }
    1730         else
    1731         {
    1732                 if(chnode->transponder != NULL && chnode->transponder->lastepg > akttime && chnode->epg != NULL)
    1733                 {
    1734                         debug(400, "skip epg read (%ld < %ld)", akttime, chnode->transponder->lastepg);
    1735                         skip = (chnode->transponder->lastepg - akttime) * 2;
    1736                 }
     1722        if(chnode == NULL) chnode = status.aktservice->channel;
     1723
     1724        if(chnode != NULL && chnode->transponder != NULL && chnode->transponder->lastepg > akttime && chnode->epg != NULL)
     1725        {
     1726                debug(400, "skip epg read (%ld < %ld)", akttime, chnode->transponder->lastepg);
     1727                skip = (chnode->transponder->lastepg - akttime) * 2;
    17371728        }
    17381729
     
    17601751        if(fenode == NULL)
    17611752        {
    1762                 debug(400, "no frontend dev in aktservice");
     1753                debug(400, "no frontend dev in service");
    17631754                free(buf);
    17641755                return 1;
     
    18251816                                debug(400, "epg no more new data, wait for next run");
    18261817
    1827                                 if(chnode == NULL)
    1828                                 {
    1829                                         if(status.aktservice->channel != NULL && status.aktservice->channel->transponder != NULL)
    1830                                                 status.aktservice->channel->transponder->lastepg = time(NULL) + 7700;
    1831                                 }
    1832                                 else if(chnode->transponder != NULL)
     1818                                if(chnode == NULL && chnode->transponder != NULL)
    18331819                                        chnode->transponder->lastepg = time(NULL) + 7700;
    18341820
     
    19651951        }
    19661952
    1967         readeit(self, NULL, NULL, 0);
     1953        if(status.epgscanlistthread == NULL)
     1954                readeit(self, NULL, NULL, 0);
    19681955
    19691956        debug(400, "end epg thread on aktiv channel");
  • titan/titan/epgscan.h

    r18431 r18557  
    173173
    174174end:
    175         status.epgscanlistthread = NULL;
    176175        epgscanlistclearscantime();
    177176       
     
    181180                fclose(fd);
    182181        }
     182        status.epgscanlistthread = NULL;
    183183        debug(400, "epgscan thread end");
    184184}
  • titan/titan/standby.h

    r18206 r18557  
    66        int rcret = 0, voltoff = 1;
    77        struct skin* standbyscreen = getscreen("standby");
    8         struct stimerthread *epgscan = NULL;
    98        char* loctime = NULL, *tmpstr = NULL;
    109        time_t lastrun = 0;
     
    6564                        //start epg scanlist
    6665                        lastrun = time(NULL);
    67                         epgscan = addtimer(&epgscanlistthread, START, 1000, 1, NULL, NULL, NULL);
     66                        if(status.epgscanlistthread == NULL)
     67                                status.epgscanlistthread = addtimer(&epgscanlistthread, START, 1000, 1, NULL, NULL, NULL);
    6868                }
    6969                free(loctime); loctime = 0;
    7070        }
    7171
    72         if(gettimer(epgscan) != NULL)
     72        if(status.epgscanlistthread != NULL)
    7373        {
    7474                int i = 0;
    75                 epgscan->aktion = STOP;
    76                 while(gettimer(epgscan) != NULL && epgscan->status != DEACTIVE)
     75                status.epgscanlistthread->aktion = STOP;
     76                while(status.epgscanlistthread != NULL)
    7777                {
    7878                        usleep(100000);
Note: See TracChangeset for help on using the changeset viewer.