comparison src/recpt1.c @ 178:a0bc3700a496

Fix problem: If channel list file does not exist, abnormal termination.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Wed, 07 Nov 2012 23:26:22 +0900
parents 1d6674183e76
children 27e5f99f8991
comparison
equal deleted inserted replaced
177:1d6674183e76 178:a0bc3700a496
1278 channel_list = open_list_file("ISDB", NULL); 1278 channel_list = open_list_file("ISDB", NULL);
1279 else { 1279 else {
1280 channel_list = open_list_file("BS", NULL); 1280 channel_list = open_list_file("BS", NULL);
1281 channel_list = open_list_file("CS", channel_list); 1281 channel_list = open_list_file("CS", channel_list);
1282 } 1282 }
1283 if(!channel_list) {
1284 fprintf(stderr, "channel list file does not found.\n"
1285 "please create channel list file first.\n"
1286 "usage:\n"
1287 "$ channelscan_pt1.sh\n");
1288 use_dlna = FALSE;
1289 break;
1290 }
1283 tdata.stream_queue = stream_queue; 1291 tdata.stream_queue = stream_queue;
1284 tdata.streamer = malloc(sizeof(streamer)); 1292 tdata.streamer = malloc(sizeof(streamer));
1285 if ( tdata.streamer == NULL ) { 1293 if ( tdata.streamer == NULL ) {
1286 use_dlna = FALSE; 1294 use_dlna = FALSE;
1287 break; 1295 break;