mirror of
https://github.com/coturn/coturn.git
synced 2025-10-27 13:00:59 +01:00
cleaning
This commit is contained in:
parent
769f2eaf14
commit
2bedd6d1fd
@ -47,33 +47,33 @@
|
|||||||
int TURN_MAX_ALLOCATE_TIMEOUT = 60;
|
int TURN_MAX_ALLOCATE_TIMEOUT = 60;
|
||||||
int TURN_MAX_ALLOCATE_TIMEOUT_STUN_ONLY = 3;
|
int TURN_MAX_ALLOCATE_TIMEOUT_STUN_ONLY = 3;
|
||||||
|
|
||||||
#define log_method(ss0, method, err_code0, reason0) \
|
static inline void log_method(ts_ur_super_session* ss, const char *method, int err_code, const u08bits *reason)
|
||||||
if (ss0) {\
|
{
|
||||||
ts_ur_super_session* _ss = (ss0); \
|
if(ss) {
|
||||||
int _err_code = (err_code0); \
|
if(!method) method = "unknown";
|
||||||
if(!_err_code) {\
|
if(!err_code) {
|
||||||
if(_ss->origin[0]) {\
|
if(ss->origin[0]) {
|
||||||
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,\
|
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
|
||||||
"session %018llu: origin <%s> realm <%s> user <%s>: incoming packet " method " processed, success\n",\
|
"session %018llu: origin <%s> realm <%s> user <%s>: incoming packet %s processed, success\n",
|
||||||
(unsigned long long)(_ss->id), (const char*)(_ss->origin),(const char*)(_ss->realm_options.name),(const char*)(_ss->username));\
|
(unsigned long long)(ss->id), (const char*)(ss->origin),(const char*)(ss->realm_options.name),(const char*)(ss->username),method);
|
||||||
} else {\
|
} else {
|
||||||
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,\
|
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
|
||||||
"session %018llu: realm <%s> user <%s>: incoming packet " method " processed, success\n",\
|
"session %018llu: realm <%s> user <%s>: incoming packet %s processed, success\n",
|
||||||
(unsigned long long)(_ss->id), (const char*)(_ss->realm_options.name),(const char*)(_ss->username));\
|
(unsigned long long)(ss->id), (const char*)(ss->realm_options.name),(const char*)(ss->username),method);
|
||||||
}\
|
}
|
||||||
} else {\
|
} else {
|
||||||
const char *_reason = (const char*)(reason0); \
|
if(!reason) reason=(const u08bits*)"Unknown error";
|
||||||
if(!_reason) _reason="Unknown error"; \
|
if(ss->origin[0]) {
|
||||||
if(_ss->origin[0]) {\
|
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
|
||||||
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,\
|
"session %018llu: origin <%s> realm <%s> user <%s>: incoming packet %s processed, error %d: %s\n",
|
||||||
"session %018llu: origin <%s> realm <%s> user <%s>: incoming packet " method " processed, error %d: %s\n",\
|
(unsigned long long)(ss->id), (const char*)(ss->origin),(const char*)(ss->realm_options.name),(const char*)(ss->username), method, err_code, reason);
|
||||||
(unsigned long long)(_ss->id), (const char*)(_ss->origin),(const char*)(_ss->realm_options.name),(const char*)(_ss->username), _err_code, _reason);\
|
} else {
|
||||||
} else {\
|
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
|
||||||
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,\
|
"session %018llu: realm <%s> user <%s>: incoming packet %s processed, error %d: %s\n",
|
||||||
"session %018llu: realm <%s> user <%s>: incoming packet " method " processed, error %d: %s\n",\
|
(unsigned long long)(ss->id), (const char*)(ss->realm_options.name),(const char*)(ss->username), method, err_code, reason);
|
||||||
(unsigned long long)(_ss->id), (const char*)(_ss->realm_options.name),(const char*)(_ss->username), _err_code, _reason);\
|
}
|
||||||
}\
|
}
|
||||||
}\
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user