mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
replace __FILE__ with __file__
This commit is contained in:
committed by
svenhoefer
parent
54e1d3eecb
commit
70b7f74362
@@ -37,7 +37,7 @@ extern int SysLogLevel;
|
||||
#define dsyslog printf
|
||||
#endif
|
||||
|
||||
#define LOG_ERROR esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__)
|
||||
#define LOG_ERROR esyslog("ERROR (%s,%d): %m", __file__, __LINE__)
|
||||
#define LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s)
|
||||
|
||||
#define SECSINDAY 86400
|
||||
|
@@ -321,7 +321,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
|
||||
if (section_length <= 0)
|
||||
{
|
||||
unlock();
|
||||
fprintf(stderr, "[sectionsd] section_length <= 0: %d [%s:%s:%d] please report!\n", section_length, __FILE__,__FUNCTION__,__LINE__);
|
||||
fprintf(stderr, "[sectionsd] section_length <= 0: %d [%s:%s:%d] please report!\n", section_length, __file__,__func__,__LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@@ -681,7 +681,7 @@ void COPKGManager::getPkgData(const int pkg_content_id)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fprintf(stderr, "%s %s %d: unrecognized content id %d\n", __FILE__, __func__, __LINE__, pkg_content_id);
|
||||
fprintf(stderr, "%s %s %d: unrecognized content id %d\n", __file__, __func__, __LINE__, pkg_content_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -104,14 +104,14 @@ static unsigned int timer_msec;
|
||||
#define DBG_TIMER_STOP(label) \
|
||||
gettimeofday(&timer_tv2, NULL); \
|
||||
timer_msec = ((timer_tv2.tv_sec - timer_tv.tv_sec) * 1000) + ((timer_tv2.tv_usec - timer_tv.tv_usec) / 1000); \
|
||||
printf("##### [%s] %s: %u msec\n", __FILE__, label, timer_msec);
|
||||
printf("##### [%s] %s: %u msec\n", __file__, label, timer_msec);
|
||||
#else
|
||||
#define DBG_TIMER_START()
|
||||
#define DBG_TIMER_STOP(label)
|
||||
#endif // UPDATE_DEBUG_TIMER
|
||||
|
||||
#ifdef UPDATE_DEBUG
|
||||
#define DBG_MSG(fmt, args...) printf("#### [%s:%s:%d] " fmt "\n", __FILE__, __FUNCTION__, __LINE__ , ## args);
|
||||
#define DBG_MSG(fmt, args...) printf("#### [%s:%s:%d] " fmt "\n", __file__, __func__, __LINE__ , ## args);
|
||||
#else
|
||||
#define DBG_MSG(fmt, args...)
|
||||
#endif // UPDATE_DEBUG
|
||||
|
@@ -61,11 +61,11 @@ class CLogging
|
||||
|
||||
// print show file and linenumber
|
||||
#define log_printfX(fmt, args...) \
|
||||
do { CLogging::getInstance()->printf("[yhttpd(%s:%d)] " fmt, __FILE__, __LINE__, ## args); } while (0)
|
||||
do { CLogging::getInstance()->printf("[yhttpd(%s:%d)] " fmt, __file__, __LINE__, ## args); } while (0)
|
||||
|
||||
//Set Watch Point (show file and linenumber and function)
|
||||
#define WP() \
|
||||
do { CLogging::getInstance()->printf("[yhttpd(%s:%d)%s]\n", __FILE__, __LINE__, __FUNCTION__); } while (0)
|
||||
do { CLogging::getInstance()->printf("[yhttpd(%s:%d)%s]\n", __file__, __LINE__, __FUNCTION__); } while (0)
|
||||
|
||||
// print if level matches
|
||||
#define log_level_printf(level, fmt, args...) \
|
||||
@@ -73,7 +73,7 @@ class CLogging
|
||||
|
||||
// print if level matches / show file and linenumber
|
||||
#define log_level_printfX(level, fmt, args...) \
|
||||
do { if(CLogging::getInstance()->LogLevel>=level) CLogging::getInstance()->printf("[yhttpd#%d(%s:%d)] " fmt, level, __FILE__, __LINE__, ## args); } while (0)
|
||||
do { if(CLogging::getInstance()->LogLevel>=level) CLogging::getInstance()->printf("[yhttpd#%d(%s:%d)] " fmt, level, __file__, __LINE__, ## args); } while (0)
|
||||
|
||||
// print only if debug is on
|
||||
#define dprintf(fmt, args...) \
|
||||
|
@@ -218,16 +218,16 @@ bool CLuaServer::luaserver_parse_command(CBasicMessage::Header &rmsg __attribute
|
||||
size_t size;
|
||||
|
||||
if (!CBasicServer::receive_data(connfd, &size, sizeof(size))) {
|
||||
fprintf(stderr, "%s %s %d: receive_data failed\n", __FILE__, __func__, __LINE__);
|
||||
fprintf(stderr, "%s %s %d: receive_data failed\n", __file__, __func__, __LINE__);
|
||||
return true;
|
||||
}
|
||||
char data[size];
|
||||
if (!CBasicServer::receive_data(connfd, data, size)) {
|
||||
fprintf(stderr, "%s %s %d: receive_data failed\n", __FILE__, __func__, __LINE__);
|
||||
fprintf(stderr, "%s %s %d: receive_data failed\n", __file__, __func__, __LINE__);
|
||||
return true;
|
||||
}
|
||||
if (data[size - 1]) {
|
||||
fprintf(stderr, "%s %s %d: unterminated string\n", __FILE__, __func__, __LINE__);
|
||||
fprintf(stderr, "%s %s %d: unterminated string\n", __file__, __func__, __LINE__);
|
||||
return true;
|
||||
}
|
||||
std::string luascript;
|
||||
@@ -239,7 +239,7 @@ bool CLuaServer::luaserver_parse_command(CBasicMessage::Header &rmsg __attribute
|
||||
luascript += ".lua";
|
||||
}
|
||||
if (access(luascript, R_OK)) {
|
||||
fprintf(stderr, "%s %s %d: %s not found\n", __FILE__, __func__, __LINE__, luascript.c_str());
|
||||
fprintf(stderr, "%s %s %d: %s not found\n", __file__, __func__, __LINE__, luascript.c_str());
|
||||
const char *result_code = "-1";
|
||||
const char *result_string = "";
|
||||
std::string error_string = luascript + " not found\n";
|
||||
@@ -288,7 +288,7 @@ void *CLuaServer::luaserver_main_thread(void *) {
|
||||
|
||||
CBasicServer server;
|
||||
if (!server.prepare(LUACLIENT_UDS_NAME)) {
|
||||
fprintf(stderr, "%s %s %d: prepare failed\n", __FILE__, __func__, __LINE__);
|
||||
fprintf(stderr, "%s %s %d: prepare failed\n", __file__, __func__, __LINE__);
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user