Changeset 20975


Ignore:
Timestamp:
04/13/13 08:22:03 (11 years ago)
Author:
nit
Message:

[titan] extend epg scan log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/epgscan.h

    r20264 r20975  
    135135        struct dvbdev* fenode = NULL;
    136136        struct channel* chnode = NULL;
    137         char* tmpstr = NULL;
     137        char* tmpstr = NULL, *chname = NULL;
    138138        FILE* fd = NULL;
    139139       
    140         debug(400, "epgscan thread start");
     140        debug(400, "epgscan thread start, wait for right time");
    141141       
    142142        fd = fopen(EPGSCANLOG, "w");
     
    146146        }
    147147        else
    148         {
    149                 tmpstr = ostrcat("epgscan thread start ", gettime(NULL, "%d-%m-%Y %H:%M"), 0, 1);
    150                 if(tmpstr != NULL) fprintf(fd, "%s\n", tmpstr);
    151                 free(tmpstr); tmpstr = NULL;
    152         }
     148                fprintf(fd, "epgscan thread start, wait for right time\n");
    153149
    154150        if(status.standby != 0) startmode = 1;
     
    171167        while(self->aktion != STOP && time(NULL) < 1072224000) // 01.01.2004
    172168                usleep(1 * 1000000);
    173                
     169
    174170        debug(400, "epgscan time ok");
    175         if(fd != NULL) fprintf(fd, "epgscan time ok\n");
     171        if(fd != NULL)
     172        {
     173                tmpstr = ostrcat("epgscan time ok ", gettime(NULL, "%d-%m-%Y %H:%M"), 0, 1);
     174                if(tmpstr != NULL) fprintf(fd, "%s\n", tmpstr);
     175                free(tmpstr); tmpstr = NULL;
     176        }
    176177
    177178        if(getconfigint("delepgbeforescan", NULL) == 1)
    178179        {
     180                debug(400, "del epg before scan");
     181                if(fd != NULL) fprintf(fd, "del epg before scan\n");
    179182                resetepg(1);
    180183                epgdelete = 1;
     
    192195                }
    193196
     197                if(node->name != NULL)
     198                        chname = node->name;
     199                else
     200                        chname = "unknown";
     201
    194202                if(epgdelete == 0 && chnode == status.aktservice->channel)
    195203                {
    196                         debug(400, "epgscan channel same as aktchannel sid=%d, tid=%llu", node->serviceid, node->transponderid);
    197                         if(fd != NULL) fprintf(fd, "epgscan channel same as aktchannel sid=%d, tid=%llu\n", node->serviceid, node->transponderid);
     204                        debug(400, "epgscan channel same as aktchannel channel=%s sid=%d, tid=%llu", chname, node->serviceid, node->transponderid);
     205                        if(fd != NULL) fprintf(fd, "epgscan channel same as aktchannel channel=%s sid=%d, tid=%llu\n", chname, node->serviceid, node->transponderid);
    198206                        node = node->next;
    199207                        continue;
     
    203211                if(tmpepgscannode != NULL && tmpepgscannode->scantime != 0)
    204212                {
    205                         debug(400, "epgscan transponer already scanned tid=%llu", node->transponderid);
    206                         if(fd != NULL) fprintf(fd, "epgscan transponer already scanned tid=%llu\n", node->transponderid);
     213                        debug(400, "epgscan transponer already scanned channel=%s tid=%llu", chname, node->transponderid);
     214                        if(fd != NULL) fprintf(fd, "epgscan transponer already scanned channel=%s tid=%llu\n", chname, node->transponderid);
    207215                        node = node->next;
    208216                        continue;
     
    215223                if(fenode == NULL || (status.standby == 0 && fenode == status.aktservice->fedev))
    216224                {
    217                         debug(400, "epgscan no free frontend found");
    218                         if(fd != NULL) fprintf(fd, "epgscan no free frontend found\n");
     225                        debug(400, "epgscan no free frontend found channel=%s", chname);
     226                        if(fd != NULL) fprintf(fd, "epgscan no free frontend found channel=%s\n", chname);
    219227                        node = node->next;
    220228                        continue;
     
    235243                        else
    236244                        {
    237                                 debug(400, "epgscan unknown frontend");
    238                                 if(fd != NULL) fprintf(fd, "epgscan unknown frontend\n");
     245                                debug(400, "epgscan unknown frontend channel=%s", chname);
     246                                if(fd != NULL) fprintf(fd, "epgscan unknown frontend channel=%s\n", chname);
    239247                                node = node->next;
    240248                                continue;
     
    244252                        if(festatus != 0)
    245253                        {
    246                                 debug(400, "epgscan frontend tune failed");
    247                                 if(fd != NULL) fprintf(fd, "epgscan frontend tune failed\n");
     254                                debug(400, "epgscan frontend tune failed channel=%s", chname);
     255                                if(fd != NULL) fprintf(fd, "epgscan frontend tune failed channel=%s\n", chname);
    248256                                node = node->next;
    249257                                continue;
    250258                        }
    251259
    252                         if(chnode->name != NULL)
    253                         {
    254                                 debug(400, "epgscan scanning channel=%s, sid=%d, tid=%llu, frontend=%s", chnode->name, chnode->serviceid, chnode->transponderid, fenode->feshortname);
    255                                 if(fd != NULL) fprintf(fd, "epgscan scanning channel=%s, sid=%d, tid=%llu, frontend=%s\n", chnode->name, chnode->serviceid, chnode->transponderid, fenode->feshortname);
    256                         }
     260                        debug(400, "epgscan scanning channel=%s, sid=%d, tid=%llu, frontend=%s", chname, chnode->serviceid, chnode->transponderid, fenode->feshortname);
     261                        if(fd != NULL) fprintf(fd, "epgscan scanning channel=%s, sid=%d, tid=%llu, frontend=%s\n", chname, chnode->serviceid, chnode->transponderid, fenode->feshortname);
     262
    257263                        if(chnode->transponder != NULL) chnode->transponder->lastepg = 0;
    258264                        readeit(self, chnode, fenode, 1);
     
    267273                else
    268274                {
    269                         debug(400, "epgscan frontend locked frontend=%s", fenode->feshortname);
    270                         if(fd != NULL) fprintf(fd, "epgscan frontend locked frontend=%s\n", fenode->feshortname);
     275                        debug(400, "epgscan frontend locked channel=%s frontend=%s", chname, fenode->feshortname);
     276                        if(fd != NULL) fprintf(fd, "epgscan frontend locked channel=%s frontend=%s\n", chname, fenode->feshortname);
    271277                }
    272278
Note: See TracChangeset for help on using the changeset viewer.