summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-26 09:03:38 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-26 09:03:38 +0300
commit49429a4f10d9e40d3c2bcba2d9c8fc0d5a9bc830 (patch)
tree3dd6ddfc603b0c1cdc12b81fc0af5dc50c7f86fc /src
parent83c86fe26b69439f75c893618114d16be0d1d2e8 (diff)
downloadlibmts-io-49429a4f10d9e40d3c2bcba2d9c8fc0d5a9bc830.tar.gz
libmts-io-49429a4f10d9e40d3c2bcba2d9c8fc0d5a9bc830.tar.bz2
libmts-io-49429a4f10d9e40d3c2bcba2d9c8fc0d5a9bc830.zip
[MTS-MTQ] QuectelRadio implementation
A small fix for the QuectelRadio::getNetwork - removed extra `"` character when only short / long operator name is returned by +COPS?
Diffstat (limited to 'src')
-rw-r--r--src/MTS_IO_QuectelRadio.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp
index 8ac9bac..472255f 100644
--- a/src/MTS_IO_QuectelRadio.cpp
+++ b/src/MTS_IO_QuectelRadio.cpp
@@ -167,8 +167,10 @@ CellularRadio::CODE QuectelRadio::getNetwork(std::string& sNetwork) {
// +COPS: 0,0,"CHN-UNICOM UNICOM",7
// ^start ^end
+ // +COPS: 0,0,"AT&T",7
+ // ^st ^end
size_t start = sValue.find("\"") + 1;
- size_t end = sValue.find(" ", start);
+ size_t end = sValue.find_first_of(" \"", start);
sNetwork = sValue.substr(start, end-start);
} else {
sNetwork = ""; // Not connected to any network