Changeset 20975
- Timestamp:
- 04/13/13 08:22:03 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/epgscan.h
r20264 r20975 135 135 struct dvbdev* fenode = NULL; 136 136 struct channel* chnode = NULL; 137 char* tmpstr = NULL ;137 char* tmpstr = NULL, *chname = NULL; 138 138 FILE* fd = NULL; 139 139 140 debug(400, "epgscan thread start ");140 debug(400, "epgscan thread start, wait for right time"); 141 141 142 142 fd = fopen(EPGSCANLOG, "w"); … … 146 146 } 147 147 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"); 153 149 154 150 if(status.standby != 0) startmode = 1; … … 171 167 while(self->aktion != STOP && time(NULL) < 1072224000) // 01.01.2004 172 168 usleep(1 * 1000000); 173 169 174 170 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 } 176 177 177 178 if(getconfigint("delepgbeforescan", NULL) == 1) 178 179 { 180 debug(400, "del epg before scan"); 181 if(fd != NULL) fprintf(fd, "del epg before scan\n"); 179 182 resetepg(1); 180 183 epgdelete = 1; … … 192 195 } 193 196 197 if(node->name != NULL) 198 chname = node->name; 199 else 200 chname = "unknown"; 201 194 202 if(epgdelete == 0 && chnode == status.aktservice->channel) 195 203 { 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); 198 206 node = node->next; 199 207 continue; … … 203 211 if(tmpepgscannode != NULL && tmpepgscannode->scantime != 0) 204 212 { 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); 207 215 node = node->next; 208 216 continue; … … 215 223 if(fenode == NULL || (status.standby == 0 && fenode == status.aktservice->fedev)) 216 224 { 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); 219 227 node = node->next; 220 228 continue; … … 235 243 else 236 244 { 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); 239 247 node = node->next; 240 248 continue; … … 244 252 if(festatus != 0) 245 253 { 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); 248 256 node = node->next; 249 257 continue; 250 258 } 251 259 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 257 263 if(chnode->transponder != NULL) chnode->transponder->lastepg = 0; 258 264 readeit(self, chnode, fenode, 1); … … 267 273 else 268 274 { 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); 271 277 } 272 278
Note: See TracChangeset
for help on using the changeset viewer.