mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
implement own tmp function / satify compiler
Origin commit data
------------------
Branch: ni/coolstream
Commit: 841b6efd95
Author: TangoCash <eric@loxat.de>
Date: 2018-09-02 (Sun, 02 Sep 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -645,9 +645,7 @@ void *insertEventsfromXMLTV(void * data)
|
|||||||
}
|
}
|
||||||
std::string url = (char *) data;
|
std::string url = (char *) data;
|
||||||
std::string url_ext = getFileExt(url);
|
std::string url_ext = getFileExt(url);
|
||||||
|
std::string tmp_name = genTmpName(url_ext,8);
|
||||||
std::string tmp_name = "/tmp/.xmltv";
|
|
||||||
tmp_name = tmp_name + "." + url_ext;
|
|
||||||
|
|
||||||
int64_t now = time_monotonic_ms();
|
int64_t now = time_monotonic_ms();
|
||||||
|
|
||||||
|
@@ -1714,6 +1714,25 @@ bool utf8_check_is_valid(const std::string &str)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string genTmpName(std::string suffix,unsigned int length)
|
||||||
|
{
|
||||||
|
const char alphanum[] =
|
||||||
|
"0123456789"
|
||||||
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
"abcdefghijklmnopqrstuvwxyz";
|
||||||
|
int stringLength = sizeof(alphanum) - 1;
|
||||||
|
std::string Str;
|
||||||
|
unsigned int i;
|
||||||
|
Str.append("/tmp/");
|
||||||
|
for( i = 0; i < length; ++i)
|
||||||
|
{
|
||||||
|
Str += alphanum[rand() % stringLength];
|
||||||
|
}
|
||||||
|
Str += ".";
|
||||||
|
Str += suffix;
|
||||||
|
return Str;
|
||||||
|
}
|
||||||
|
|
||||||
// curl
|
// curl
|
||||||
static void *myrealloc(void *ptr, size_t size)
|
static void *myrealloc(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
|
@@ -163,6 +163,8 @@ std::string readFile(std::string file);
|
|||||||
std::string iso_8859_1_to_utf8(std::string &str);
|
std::string iso_8859_1_to_utf8(std::string &str);
|
||||||
bool utf8_check_is_valid(const std::string &str);
|
bool utf8_check_is_valid(const std::string &str);
|
||||||
|
|
||||||
|
std::string genTmpName(std::string suffix,unsigned int length);
|
||||||
|
|
||||||
// curl
|
// curl
|
||||||
struct MemoryStruct {
|
struct MemoryStruct {
|
||||||
char *memory;
|
char *memory;
|
||||||
|
@@ -842,9 +842,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
{
|
{
|
||||||
std::string filename = (*it);
|
std::string filename = (*it);
|
||||||
std::string extension = getFileExt(filename);
|
std::string extension = getFileExt(filename);
|
||||||
|
std::string tmp_name = genTmpName(extension,8);
|
||||||
std::string tmp_name = "/tmp/.webchannel";
|
|
||||||
tmp_name = tmp_name + "." + extension;
|
|
||||||
bool remove_tmp = false;
|
bool remove_tmp = false;
|
||||||
|
|
||||||
if (filename.compare(0, 1, "/") == 0)
|
if (filename.compare(0, 1, "/") == 0)
|
||||||
|
Reference in New Issue
Block a user