From 94b4caa9abb984a12acc77aa07e986aab3807cf3 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Mon, 6 Jun 2022 08:37:06 +0300 Subject: [PATCH] Commented out accounts debug --- app/src/main/cpp/baresip.c | 14 +++++++++++++- .../kotlin/com/tutpro/baresip/AccountsActivity.kt | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/baresip.c b/app/src/main/cpp/baresip.c index 4e9f749d..4fbf45ad 100644 --- a/app/src/main/cpp/baresip.c +++ b/app/src/main/cpp/baresip.c @@ -39,6 +39,17 @@ static void net_debug_log() } } +static void re_debug_log() +{ + char debug_buf[2048]; + int l; + l = re_snprintf(&(debug_buf[0]), 2047, "%H", re_debug, baresip_network()); + if (l != -1) { + debug_buf[l] = '\0'; + LOGD("%s\n", debug_buf); + } +} + static void net_dns_debug_log() { char debug_buf[2048]; @@ -197,6 +208,7 @@ static void ua_event_handler(struct ua *ua, enum ua_event ev, } break; case UA_EVENT_CALL_OUTGOING: + re_debug_log(); len = re_snprintf(event_buf, sizeof event_buf, "call outgoing"); break; case UA_EVENT_CALL_ANSWERED: @@ -474,7 +486,7 @@ Java_com_tutpro_baresip_BaresipService_baresipStart(JNIEnv *env, jobject instanc } // Turn off DNS client cache - dnsc_cache_max(net_dnsc(baresip_network()), 0); + // dnsc_cache_max(net_dnsc(baresip_network()), 0); if (strlen(addrs) > 0) { char* addr_list = (char*)malloc(strlen(addrs)); diff --git a/app/src/main/kotlin/com/tutpro/baresip/AccountsActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/AccountsActivity.kt index ea980bb9..cacaa4a3 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/AccountsActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/AccountsActivity.kt @@ -171,7 +171,7 @@ class AccountsActivity : AppCompatActivity() { accounts = accounts + a.print() + "\n" } Utils.putFileContents(BaresipService.filesPath + "/accounts", accounts.toByteArray()) - Log.d(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'") + // Log.d(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'") } fun noAccounts(): Boolean {