Commit 0878d89d authored by Erwan Croze's avatar Erwan Croze 👋🏻
Browse files

Fix android log handler

parent 09f4e232
......@@ -112,10 +112,10 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreFactoryImpl__1setLogHa
}
static void linphone_android_ortp_log_handler(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) {
char str[4096];
char* str = bctbx_strdup_vprintf(fmt, args);
const char *levname = "undef";
vsnprintf(str, sizeof(str) - 1, fmt, args);
str[sizeof(str) - 1] = '\0';
if (str == NULL) return;
int prio;
switch(lev) {
......@@ -139,6 +139,7 @@ static void linphone_android_ortp_log_handler(const char *domain, OrtpLogLevel l
} else {
linphone_android_log_handler(prio, str);
}
bctbx_free(str);
}
int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment