summaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-07-24 18:23:50 -0700
committerNick Mathewson <nickm@torproject.org>2020-07-30 10:46:15 -0400
commit67a62ccf51f46bde75e0675b1ee19c024152f088 (patch)
treec62c1a86300dea0c1aa3767dffad04b47fc3a7bb /src/feature/hs
parentc212578bf05138801597dcce23f52780c9b7dbb3 (diff)
downloadtor-67a62ccf51f46bde75e0675b1ee19c024152f088.tar.gz
tor-67a62ccf51f46bde75e0675b1ee19c024152f088.zip
Use write_str_if_not_equal() for onion services
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index b56b7f4368..3e264b4686 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -990,7 +990,7 @@ write_address_to_file(const hs_service_t *service, const char *fname_)
tor_asprintf(&addr_buf, "%s.%s\n", service->onion_address, address_tld);
/* Notice here that we use the given "fname_". */
fname = hs_path_from_filename(service->config.directory_path, fname_);
- if (write_str_to_file(fname, addr_buf, 0) < 0) {
+ if (write_str_to_file_if_not_equal(fname, addr_buf)) {
log_warn(LD_REND, "Could not write onion address to hostname file %s",
escaped(fname));
goto end;