aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/received.hxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-06 10:39:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-06 10:39:20 +0100
commitc55b683b92b311c9384f960b3a976bb288facac9 (patch)
treeff320397a72e51fe413ba7a9fc006672198d55e3 /src/libmime/received.hxx
parent4251918a1ab758f545bd1d5dc5e298016e1b6bca (diff)
downloadrspamd-c55b683b92b311c9384f960b3a976bb288facac9.tar.gz
rspamd-c55b683b92b311c9384f960b3a976bb288facac9.zip
[Minor] Fix ownership issue
Diffstat (limited to 'src/libmime/received.hxx')
-rw-r--r--src/libmime/received.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmime/received.hxx b/src/libmime/received.hxx
index 20164329f..98d46770b 100644
--- a/src/libmime/received.hxx
+++ b/src/libmime/received.hxx
@@ -103,7 +103,7 @@ struct received_header {
mime_string real_hostname;
mime_string real_ip;
mime_string by_hostname;
- std::string_view for_mbox;
+ mime_string for_mbox;
struct rspamd_email_address *for_addr = nullptr;
rspamd_inet_addr_t *addr = nullptr;
struct rspamd_mime_header *hdr = nullptr;
@@ -128,7 +128,7 @@ struct received_header {
real_hostname = std::move(other.real_hostname);
real_ip = std::move(other.real_ip);
by_hostname = std::move(other.by_hostname);
- for_mbox = other.for_mbox;
+ for_mbox = std::move(other.for_mbox);
timestamp = other.timestamp;
flags = other.flags;
std::swap(for_addr, other.for_addr);
@@ -159,7 +159,7 @@ struct received_header {
rh.from_ip = map.at("from_ip"sv);
}
if (map.contains("for_mbox")) {
- rh.for_mbox = map.at("for_mbox"sv);
+ rh.for_mbox.assign_copy(map.at("for_mbox"sv));
}
return rh;
@@ -185,7 +185,7 @@ struct received_header {
map["from_ip"] = from_ip;
}
if (!for_mbox.empty()) {
- map["for_mbox"] = for_mbox;
+ map["for_mbox"] = for_mbox.as_view();
}
return map;