Mercurial > pt1.oyama
diff src/http.c @ 152:30e91361506a
EXPERIMENTAL: Enable change phisical channel by DLNA.(ISDB-T only)
author | Naoya OYAMA <naoya.oyama@gmail.com> |
---|---|
date | Sun, 02 Sep 2012 01:59:27 +0900 |
parents | a9f60d56d673 |
children | e040d91c5cc7 |
line wrap: on
line diff
--- a/src/http.c Fri Aug 31 23:39:46 2012 +0900 +++ b/src/http.c Sun Sep 02 01:59:27 2012 +0900 @@ -343,6 +343,9 @@ extern thread_data *gp_tdata; thread_data *tdata = gp_tdata; int channel_length = 0; + char tmp[1024]; + char *p; + tmp[0] = '\0'; if (!filename) return NULL; @@ -376,18 +379,12 @@ * 1. http_open() $B$G$O(B entry $B$,%9%H%j!<%`:F@8MQ$N$b$N$G$"$k>l9g$K!"(B * get_file_stream()$B$r8F$S=P$7%O%s%I%i$rJV5Q$9$k(B */ - log_verbose ("Fullpath : %s\n", entry->fullpath); - if (ut->nr_channel == 0) { - if (!strcmp (entry->fullpath, STREAM_LOCATION)) - return get_file_stream (STREAM_LOCATION, tdata); - } else { - for (i=0; i < ut->nr_channel; i++) - if (!strcmp(entry->fullpath, ut->location_name[i])) { - channel_length = strspn(ut->channel_name[i], "0123456789"); - strncpy(ut->request_channel, ut->channel_name[i], channel_length); - log_verbose ("http_open: request_channel[%s].\n", ut->request_channel); - return get_file_stream (ut->location_name[i], tdata); - } + for (i=0; i < ut->channel_list->nr_channel; i++) { + if (!strcmp(entry->fullpath, ut->channel_list->channel_info[i]->sid)) { + ut->sid = ut->channel_list->channel_info[i]->sid; + ut->tp = ut->channel_list->channel_info[i]->tp; + return get_file_stream (ut->sid, tdata); + } } fd = open (entry->fullpath, O_RDONLY | O_NONBLOCK | O_SYNC | O_NDELAY);