From 2be885bb35c72ab585c697b6a96cc88bd954671e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 23 Mar 2016 10:57:53 +0100 Subject: [PATCH] improve android logger, by stripping \r, because android studio suppresses logs that ends with \r. --- coreapi/linphonecore_jni.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 7c2475b32..62396b464 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -81,7 +81,10 @@ void linphone_android_log_handler(int prio, char *str) { } else { current = str; while ((next = strchr(current, '\n')) != NULL) { + *next = '\0'; + if (next != str && next[-1] == '\r') + next[-1] = '\0'; __android_log_write(prio, LogDomain, current); current = next + 1; }