summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-03-30 08:37:39 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2015-12-25 09:33:11 +0100
commit3bcaad6031cf6f9ec08cae7f5e3f1509b3b2f1b9 (patch)
tree52e7bcfbe5b100584ac9cd4b805fc14026c307e5
parent6f2e5eed7a25c5ca6b52e45128d0aa251560e258 (diff)
layer23/UI: Fix: Don't use UI, if not enabled.
-rw-r--r--src/host/layer23/src/mobile/app_mobile.c3
-rw-r--r--src/host/layer23/src/mobile/gui.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c
index c3a6ed63..574ba0f2 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -133,6 +133,9 @@ int mobile_signal_cb(unsigned int subsys, unsigned int signal,
case S_L1CTL_KEYPAD:
kp = signal_data;
ms = kp->ms;
+ /* gui disabled */
+ if (!ms->settings.ui_port)
+ break;
ui_inst_keypad(&ms->gui.ui, kp->key);
break;
}
diff --git a/src/host/layer23/src/mobile/gui.c b/src/host/layer23/src/mobile/gui.c
index 067b168b..85033b23 100644
--- a/src/host/layer23/src/mobile/gui.c
+++ b/src/host/layer23/src/mobile/gui.c
@@ -1723,6 +1723,10 @@ int gui_notify_call(struct osmocom_ms *ms)
int last_call_j_last = 0, selected_call_j_last = 0;
struct gsm_call *last_call = NULL, *selected_call = NULL;
+ /* gui disabled */
+ if (!ms->settings.ui_port)
+ return 0;
+
if (gui->menu != MENU_STATUS
&& gui->menu != MENU_CALL)
return 0;