mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
replace __FILE__ with __file__
This commit is contained in:
@@ -37,7 +37,7 @@ extern int SysLogLevel;
|
|||||||
#define dsyslog printf
|
#define dsyslog printf
|
||||||
#endif
|
#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 LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s)
|
||||||
|
|
||||||
#define SECSINDAY 86400
|
#define SECSINDAY 86400
|
||||||
|
@@ -326,7 +326,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
|
|||||||
if (section_length <= 0)
|
if (section_length <= 0)
|
||||||
{
|
{
|
||||||
unlock();
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -689,7 +689,7 @@ void COPKGManager::getPkgData(const int pkg_content_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -105,14 +105,14 @@ static unsigned int timer_msec;
|
|||||||
#define DBG_TIMER_STOP(label) \
|
#define DBG_TIMER_STOP(label) \
|
||||||
gettimeofday(&timer_tv2, NULL); \
|
gettimeofday(&timer_tv2, NULL); \
|
||||||
timer_msec = ((timer_tv2.tv_sec - timer_tv.tv_sec) * 1000) + ((timer_tv2.tv_usec - timer_tv.tv_usec) / 1000); \
|
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
|
#else
|
||||||
#define DBG_TIMER_START()
|
#define DBG_TIMER_START()
|
||||||
#define DBG_TIMER_STOP(label)
|
#define DBG_TIMER_STOP(label)
|
||||||
#endif // UPDATE_DEBUG_TIMER
|
#endif // UPDATE_DEBUG_TIMER
|
||||||
|
|
||||||
#ifdef UPDATE_DEBUG
|
#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
|
#else
|
||||||
#define DBG_MSG(fmt, args...)
|
#define DBG_MSG(fmt, args...)
|
||||||
#endif // UPDATE_DEBUG
|
#endif // UPDATE_DEBUG
|
||||||
|
@@ -61,11 +61,11 @@ class CLogging
|
|||||||
|
|
||||||
// print show file and linenumber
|
// print show file and linenumber
|
||||||
#define log_printfX(fmt, args...) \
|
#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)
|
//Set Watch Point (show file and linenumber and function)
|
||||||
#define WP() \
|
#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
|
// print if level matches
|
||||||
#define log_level_printf(level, fmt, args...) \
|
#define log_level_printf(level, fmt, args...) \
|
||||||
@@ -73,7 +73,7 @@ class CLogging
|
|||||||
|
|
||||||
// print if level matches / show file and linenumber
|
// print if level matches / show file and linenumber
|
||||||
#define log_level_printfX(level, fmt, args...) \
|
#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
|
// print only if debug is on
|
||||||
#define dprintf(fmt, args...) \
|
#define dprintf(fmt, args...) \
|
||||||
|
@@ -218,16 +218,16 @@ bool CLuaServer::luaserver_parse_command(CBasicMessage::Header &rmsg __attribute
|
|||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
if (!CBasicServer::receive_data(connfd, &size, sizeof(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;
|
return true;
|
||||||
}
|
}
|
||||||
char data[size];
|
char data[size];
|
||||||
if (!CBasicServer::receive_data(connfd, 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;
|
return true;
|
||||||
}
|
}
|
||||||
if (data[size - 1]) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
std::string luascript;
|
std::string luascript;
|
||||||
@@ -239,7 +239,7 @@ bool CLuaServer::luaserver_parse_command(CBasicMessage::Header &rmsg __attribute
|
|||||||
luascript += ".lua";
|
luascript += ".lua";
|
||||||
}
|
}
|
||||||
if (access(luascript, R_OK)) {
|
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_code = "-1";
|
||||||
const char *result_string = "";
|
const char *result_string = "";
|
||||||
std::string error_string = luascript + " not found\n";
|
std::string error_string = luascript + " not found\n";
|
||||||
@@ -288,7 +288,7 @@ void *CLuaServer::luaserver_main_thread(void *) {
|
|||||||
|
|
||||||
CBasicServer server;
|
CBasicServer server;
|
||||||
if (!server.prepare(LUACLIENT_UDS_NAME)) {
|
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);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user