You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/06/18 14:51:15 UTC
(trafficserver) branch 10.0.x updated (a805179ed8 -> 2ae1eacb33)
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
from a805179ed8 Add exec argument to traffic_crashlog (#11447)
new 7f94014c93 Properly handle string return from function (#11442)
new 2ae1eacb33 Coverity Fixes: (#11445)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
plugins/experimental/wasm/ats_context.h | 15 +++++++++------
src/iocore/hostdb/HostDB.cc | 4 ++--
2 files changed, 11 insertions(+), 8 deletions(-)
(trafficserver) 01/02: Properly handle string return from function (#11442)
Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 7f94014c9380bb8f505f2fce6b704b8f2e6edb2e
Author: Kit Chan <ki...@apache.org>
AuthorDate: Sun Jun 16 11:41:35 2024 -0700
Properly handle string return from function (#11442)
* Properly handle string return from function
* Update ats_context.h
* Update ats_context.h
* Update ats_context.h
(cherry picked from commit 4704ee494572305dbfdb5edddc1495b8a0c88d4c)
---
plugins/experimental/wasm/ats_context.h | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/plugins/experimental/wasm/ats_context.h b/plugins/experimental/wasm/ats_context.h
index 0574b42ec4..094a654c25 100644
--- a/plugins/experimental/wasm/ats_context.h
+++ b/plugins/experimental/wasm/ats_context.h
@@ -180,10 +180,10 @@ public:
return this;
}
- std::string
- get()
+ const char *
+ getDataStrPtr()
{
- return owned_data_str_;
+ return owned_data_str_.c_str();
}
private:
@@ -276,9 +276,12 @@ public:
const char *
getTransformResult(size_t *body_size)
{
- std::string s = transform_result_.get();
- *body_size = s.size();
- return s.c_str();
+ if (body_size != nullptr) {
+ *body_size = transform_result_.size();
+ return transform_result_.getDataStrPtr();
+ } else {
+ return nullptr;
+ }
}
// Metrics
(trafficserver) 02/02: Coverity Fixes: (#11445)
Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 2ae1eacb33800bee5550f3cab4d461847d96edf7
Author: Damian Meden <dm...@apache.org>
AuthorDate: Mon Jun 17 19:57:19 2024 +0200
Coverity Fixes: (#11445)
- 1497249 Invalid type in argument to printf format
- 1544455 COPY_INSTEAD_OF_MOVE
(cherry picked from commit ffb41371aa65667e31a41c93799d60b6819020b0)
---
src/iocore/hostdb/HostDB.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/iocore/hostdb/HostDB.cc b/src/iocore/hostdb/HostDB.cc
index 91d93671fb..c5d593a381 100644
--- a/src/iocore/hostdb/HostDB.cc
+++ b/src/iocore/hostdb/HostDB.cc
@@ -1585,7 +1585,7 @@ UpdateHostsFile(swoc::file::path const &path, ts_seconds interval)
// Swap the pointer
if (hf) {
std::unique_lock lock(hostDB.host_file_mutex);
- hostDB.host_file = hf;
+ hostDB.host_file = std::move(hf);
}
hostdb_hostfile_update_timestamp = hostdb_current_timestamp;
// Mark this one as completed, so we can allow another update to happen
@@ -1622,7 +1622,7 @@ struct HostDBRegressionContinuation : public Continuation {
if (event == EVENT_HOST_DB_LOOKUP) {
--outstanding;
if (r) {
- rprintf(test, "HostDBRecord r=%x\n", r);
+ rprintf(test, "HostDBRecord r=%p\n", r);
rprintf(test, "HostDBRecord hostname=%s\n", r->name());
// If RR, print all of the enclosed records
auto rr_info{r->rr_info()};