mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
- fix compile warnings from previous commit
warning: declaration of ‘url’ shadows a previous local warning: the use of `tmpnam' is dangerous Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -840,21 +840,24 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
|
||||
for (std::list<std::string>::iterator it = webchannels_xml->begin(); it != webchannels_xml->end(); ++it)
|
||||
{
|
||||
std::string url_= (*it);
|
||||
std::string tmp_name = tmpnam (NULL);
|
||||
std::string extension = getFileExt(url_);
|
||||
std::string filename = (*it);
|
||||
std::string extension = getFileExt(filename);
|
||||
|
||||
std::string tmp_name = "/tmp/.webchannel";
|
||||
tmp_name = tmp_name + "." + extension;
|
||||
bool remove_tmp = false;
|
||||
|
||||
if (url_.compare(0,1,"/") == 0)
|
||||
tmp_name = url_;
|
||||
else {
|
||||
if (::downloadUrl(url_,tmp_name))
|
||||
remove_tmp = true;}
|
||||
if (filename.compare(0, 1, "/") == 0)
|
||||
tmp_name = filename;
|
||||
else
|
||||
{
|
||||
if (::downloadUrl(filename, tmp_name))
|
||||
remove_tmp = true;
|
||||
}
|
||||
|
||||
if (!access(tmp_name.c_str(), R_OK))
|
||||
{
|
||||
INFO("Loading %s from %s ...", (mode == MODE_WEBTV) ? "webtv" : "webradio", url_.c_str());
|
||||
INFO("Loading %s from %s ...", (mode == MODE_WEBTV) ? "webtv" : "webradio", filename.c_str());
|
||||
|
||||
// check for extension
|
||||
bool e2tv = false;
|
||||
|
Reference in New Issue
Block a user