aboutsummaryrefslogtreecommitdiffstats
path: root/src/recvkv6/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/recvkv6/main.cpp')
-rw-r--r--src/recvkv6/main.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/recvkv6/main.cpp b/src/recvkv6/main.cpp
index 3a3338b..e8b0ba3 100644
--- a/src/recvkv6/main.cpp
+++ b/src/recvkv6/main.cpp
@@ -922,20 +922,22 @@ struct Kv6Parser {
922 922
923 std::optional<Tmi8VvTmPushInfo> parse(const rapidxml::xml_document<> &doc) { 923 std::optional<Tmi8VvTmPushInfo> parse(const rapidxml::xml_document<> &doc) {
924 std::optional<Tmi8VvTmPushInfo> msg; 924 std::optional<Tmi8VvTmPushInfo> msg;
925 for (const rapidxml::xml_node<> *node = doc.first_node(); node; node = node->next_sibling()) { 925 withXmlnss(doc.first_attribute(), nullptr /* nss */, [&](const Xmlns *nss) {
926 ifTmi8Element(*node, nullptr /* nss */, [&](std::string_view name, const Xmlns *nss) { 926 for (const rapidxml::xml_node<> *node = doc.first_node(); node; node = node->next_sibling()) {
927 if (name == "VV_TM_PUSH") { 927 ifTmi8Element(*node, nss, [&](std::string_view name, const Xmlns *node_nss) {
928 if (msg) { 928 if (name == "VV_TM_PUSH") {
929 error("Duplicated VV_TM_PUSH"); 929 if (msg) {
930 return; 930 error("Duplicated VV_TM_PUSH");
931 } 931 return;
932 msg = parseVvTmPush(*node, nss); 932 }
933 if (!msg) { 933 msg = parseVvTmPush(*node, node_nss);
934 error("Invalid VV_TM_PUSH"); 934 if (!msg) {
935 error("Invalid VV_TM_PUSH");
936 }
935 } 937 }
936 } 938 });
937 }); 939 }
938 } 940 });
939 if (!msg) 941 if (!msg)
940 error("Expected to find VV_TM_PUSH"); 942 error("Expected to find VV_TM_PUSH");
941 return msg; 943 return msg;