summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2021-05-31 16:50:27 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2021-05-31 16:55:07 +0300
commitaca0bbf5f1b0b0c9d0fc72272ac6d6254f64802f (patch)
tree0800e4fe1f380269e8a505eb0d13fbb5d60a7230
parent471672f4f6e9085ea93536508d908c75f9c74421 (diff)
downloadradio-query-aca0bbf5f1b0b0c9d0fc72272ac6d6254f64802f.tar.gz
radio-query-aca0bbf5f1b0b0c9d0fc72272ac6d6254f64802f.tar.bz2
radio-query-aca0bbf5f1b0b0c9d0fc72272ac6d6254f64802f.zip
[GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2
Moved MCC and MNC values to the separate fields in the radio-query output after a code review.
-rw-r--r--main.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index 427de5e..ee30668 100644
--- a/main.cpp
+++ b/main.cpp
@@ -350,10 +350,13 @@ int main(int argc, char** argv) {
}
}
} else if (g_iOptions & OPT_SIM_MCC_MNC) {
- std::string sValue;
- result = g_apRadio->getSimMccMnc(sValue);
+ std::string sMcc, sMnc;
+ Json::Value jValue;
+ result = g_apRadio->getSimMccMnc(sMcc, sMnc);
if (result == ICellularRadio::SUCCESS) {
- printf("%s", sValue.c_str());
+ jValue[MTS::IO::ICellularRadio::KEY_SIM_MCC] = sMcc;
+ jValue[MTS::IO::ICellularRadio::KEY_SIM_MNC] = sMnc;
+ printf("%s", jValue.toStyledString().c_str());
}
}
@@ -582,11 +585,13 @@ Json::Value getStaticData() {
}
jData[MTS::IO::ICellularRadio::KEY_SIM_CARRIER_CODE] = sCarrierCode;
- std::string sCarrierId(ICellularRadio::VALUE_UNKNOWN);
- if(g_apRadio->getSimMccMnc(sCarrierId) != ICellularRadio::SUCCESS) {
+ std::string sSimMcc(ICellularRadio::VALUE_UNKNOWN);
+ std::string sSimMnc(ICellularRadio::VALUE_UNKNOWN);
+ if(g_apRadio->getSimMccMnc(sSimMcc, sSimMnc) != ICellularRadio::SUCCESS) {
printWarning("SIM carrier MCC/MNC information not found");
}
- jData[MTS::IO::ICellularRadio::KEY_SIM_MCC_MNC] = sCarrierId;
+ jData[MTS::IO::ICellularRadio::KEY_SIM_MCC] = sSimMcc;
+ jData[MTS::IO::ICellularRadio::KEY_SIM_MNC] = sSimMnc;
return jData;
}