aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/augmentkv6/main.cpp4
-rw-r--r--src/bundleparquet/spliturl.cpp10
-rw-r--r--src/querykv1/main.cpp4
-rw-r--r--src/recvkv6/main.cpp28
4 files changed, 19 insertions, 27 deletions
diff --git a/src/augmentkv6/main.cpp b/src/augmentkv6/main.cpp
index 303721f..ae8405a 100644
--- a/src/augmentkv6/main.cpp
+++ b/src/augmentkv6/main.cpp
@@ -90,10 +90,10 @@ bool parse(Kv1Records &into) {
90 parser.parse(); 90 parser.parse();
91 91
92 bool ok = true; 92 bool ok = true;
93 if (!parser.gerrors.empty()) { 93 if (!parser.global_errors.empty()) {
94 ok = false; 94 ok = false;
95 fputs("Parser reported errors:\n", stderr); 95 fputs("Parser reported errors:\n", stderr);
96 for (const auto &error : parser.gerrors) 96 for (const auto &error : parser.global_errors)
97 fprintf(stderr, "- %s\n", error.c_str()); 97 fprintf(stderr, "- %s\n", error.c_str());
98 } 98 }
99 if (!parser.warns.empty()) { 99 if (!parser.warns.empty()) {
diff --git a/src/bundleparquet/spliturl.cpp b/src/bundleparquet/spliturl.cpp
index 91f897d..2b35d4c 100644
--- a/src/bundleparquet/spliturl.cpp
+++ b/src/bundleparquet/spliturl.cpp
@@ -122,16 +122,6 @@ std::optional<SplitUrl> splitUrl(const std::string &url, std::string *error) {
122 122
123 schemehost = curl_url_dup(parsed); 123 schemehost = curl_url_dup(parsed);
124 124
125 // CURL BUG WORKAROUND: CURLUPART_ZONEID is NOT copied by curl_url_dup!
126 // ^ fixed in CURL 8.3.0 after https://curl.se/mail/lib-2023-07/0047.html
127 rc = curl_url_get(parsed, CURLUPART_ZONEID, &zoneid, 0);
128 if (rc == CURLUE_OK) {
129 rc = curl_url_set(schemehost, CURLUPART_ZONEID, zoneid, 0);
130 if (rc != CURLUE_OK) {
131 errs << "Could not copy zone ID to duplicated URL: " << curl_url_strerror(rc);
132 goto Exit;
133 }
134 }
135 rc = curl_url_set(schemehost, CURLUPART_PORT, nullptr, 0); 125 rc = curl_url_set(schemehost, CURLUPART_PORT, nullptr, 0);
136 if (rc != CURLUE_OK) { 126 if (rc != CURLUE_OK) {
137 errs << "Could not unset port in duplicated URL: " << curl_url_strerror(rc); 127 errs << "Could not unset port in duplicated URL: " << curl_url_strerror(rc);
diff --git a/src/querykv1/main.cpp b/src/querykv1/main.cpp
index 9580328..11437f4 100644
--- a/src/querykv1/main.cpp
+++ b/src/querykv1/main.cpp
@@ -90,10 +90,10 @@ bool parse(const char *path, Kv1Records &into) {
90 parser.parse(); 90 parser.parse();
91 91
92 bool ok = true; 92 bool ok = true;
93 if (!parser.gerrors.empty()) { 93 if (!parser.global_errors.empty()) {
94 ok = false; 94 ok = false;
95 fputs("Parser reported errors:\n", stderr); 95 fputs("Parser reported errors:\n", stderr);
96 for (const auto &error : parser.gerrors) 96 for (const auto &error : parser.global_errors)
97 fprintf(stderr, "- %s\n", error.c_str()); 97 fprintf(stderr, "- %s\n", error.c_str());
98 } 98 }
99 if (!parser.warns.empty()) { 99 if (!parser.warns.empty()) {
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;