From 75c167e8a830c0b42ed635fa02c5cca7177edc8f Mon Sep 17 00:00:00 2001 From: kkleczkowski <49439739+kkleczkowski@users.noreply.github.com> Date: Thu, 10 Dec 2020 11:02:20 +0100 Subject: [PATCH] [EGD-4848] CUSD parser fixed (#1173) Fixes CUSD parser bug, it was removig comma from USSD message. --- changelog.md | 1 + module-cellular/at/src/UrcCusd.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index afb1da354ac59599182c3fbf0d9c6eb032c9db2f..bca2da48af8b306b42233be5cc89469570cf556a 100644 --- a/changelog.md +++ b/changelog.md @@ -43,6 +43,7 @@ * Fix too many time options in the meditation application. * Fix default counter settings. * Fix displaying the special characters in a note title. +* Fixed CUSD URC parser. ### Other diff --git a/module-cellular/at/src/UrcCusd.cpp b/module-cellular/at/src/UrcCusd.cpp index 8c9b2d3dd250080b31909aa7a6f15f4c12a1fe81..960b58bd5940097a8e278e69e09283109ec6db51 100644 --- a/module-cellular/at/src/UrcCusd.cpp +++ b/module-cellular/at/src/UrcCusd.cpp @@ -94,8 +94,12 @@ void Cusd::split(const std::string &str) tokens.push_back(el); } } + uint32_t token = 0; for (auto &t : tokens) { - utils::findAndReplaceAll(t, commaString, ""); - t = utils::trim(t); + if (token != static_cast(Tokens::Response)) { + utils::findAndReplaceAll(t, commaString, ""); + t = utils::trim(t); + } + token += 1; } }