pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/32420 )

Change subject: layer23: modem: Fix wrong 'radio not started' vty message
......................................................................

layer23: modem: Fix wrong 'radio not started' vty message

Change-Id: I8871c9d0e820beb75d7820b5a2d8d3c77dac379d
---
M src/host/layer23/src/common/vty.c
M src/host/layer23/src/modem/app_modem.c
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved




diff --git a/src/host/layer23/src/common/vty.c 
b/src/host/layer23/src/common/vty.c
index 3f79ca8..bbe8e2a 100644
--- a/src/host/layer23/src/common/vty.c
+++ b/src/host/layer23/src/common/vty.c
@@ -137,7 +137,9 @@

        if (!ms->started)
                service = ", radio is not started";
-       else if (ms->mmlayer.state == GSM48_MM_ST_MM_IDLE) {
+       else if (ms->mmlayer.state == GSM48_MM_ST_NULL) {
+               service = ", MM connection not yet set up";
+       } else if (ms->mmlayer.state == GSM48_MM_ST_MM_IDLE) {
                /* current MM idle state */
                switch (ms->mmlayer.substate) {
                case GSM48_MM_SST_NORMAL_SERVICE:
diff --git a/src/host/layer23/src/modem/app_modem.c 
b/src/host/layer23/src/modem/app_modem.c
index 644c630..211621e 100644
--- a/src/host/layer23/src/modem/app_modem.c
+++ b/src/host/layer23/src/modem/app_modem.c
@@ -126,6 +126,9 @@
        case S_L1CTL_RESET:
                ms = signal_data;
                layer3_app_reset();
+               app_data.ms = ms;
+
+               ms->started = true;
                return l1ctl_tx_fbsb_req(ms, ms->test_arfcn,
                                         L1CTL_FBSB_F_FB01SB, 100, 0,
                                         CCCH_MODE_NONE, dbm2rxlev(-85));

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32420
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I8871c9d0e820beb75d7820b5a2d8d3c77dac379d
Gerrit-Change-Number: 32420
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to