Mercurial > pt1.oyama
changeset 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 | ac23a9b417a2 |
files | src/recpt1.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/recpt1.c Wed Nov 07 22:54:19 2012 +0900 +++ b/src/recpt1.c Wed Nov 07 23:26:22 2012 +0900 @@ -1280,6 +1280,14 @@ channel_list = open_list_file("BS", NULL); channel_list = open_list_file("CS", channel_list); } + if(!channel_list) { + fprintf(stderr, "channel list file does not found.\n" + "please create channel list file first.\n" + "usage:\n" + "$ channelscan_pt1.sh\n"); + use_dlna = FALSE; + break; + } tdata.stream_queue = stream_queue; tdata.streamer = malloc(sizeof(streamer)); if ( tdata.streamer == NULL ) {