diff options
author | Rutger Broekhoff | 2024-08-10 15:51:34 +0200 |
---|---|---|
committer | Rutger Broekhoff | 2024-08-10 15:51:34 +0200 |
commit | 66a98861d0fbb7cba742b63bf97268a2a619c5e0 (patch) | |
tree | 433513c7f875c43a81bd4efe379fffc3e8d4c5ce /src/recvkv6 | |
parent | 279f790f078325582aa62e562a766204034766e4 (diff) | |
download | oeuf-66a98861d0fbb7cba742b63bf97268a2a619c5e0.tar.gz oeuf-66a98861d0fbb7cba742b63bf97268a2a619c5e0.zip |
Some small updates here and there
Diffstat (limited to 'src/recvkv6')
-rw-r--r-- | src/recvkv6/main.cpp | 28 |
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; |