summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-03-30 08:37:39 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-09-25 08:11:49 +0200
commit0a8feda800533e228c9e2d044279e8da64530a15 (patch)
tree8ad07b19d23b399ba38e9f835e4099d0a567c3e9
parentbecf73302ed334498a66468df33d19275ad58b79 (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 56c6b65..b0cf75d 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -136,6 +136,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 067b168..85033b2 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;