summaryrefslogtreecommitdiff
path: root/src/DHTRoutingTableSerializer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-08-08 21:46:10 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-08-08 21:46:10 +0900
commit02307cee0a395d8405d0e160664d4a37c79fe16c (patch)
treebf897205f2e9f8262bd9a92e7e9eb078ba93bf98 /src/DHTRoutingTableSerializer.cc
parent7368c9c9d8515232204d3708a3e2233454368aec (diff)
Removed utf8ToNative from log message and exception message.
Diffstat (limited to 'src/DHTRoutingTableSerializer.cc')
-rw-r--r--src/DHTRoutingTableSerializer.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/DHTRoutingTableSerializer.cc b/src/DHTRoutingTableSerializer.cc
index a32b9cbe..3a2db492 100644
--- a/src/DHTRoutingTableSerializer.cc
+++ b/src/DHTRoutingTableSerializer.cc
@@ -72,18 +72,17 @@ void DHTRoutingTableSerializer::setNodes
#define WRITE_CHECK(fp, ptr, count) \
if(fp.write((ptr), (count)) != (count)) { \
throw DL_ABORT_EX(fmt("Failed to save DHT routing table to %s.", \
- utf8ToNative(filename).c_str())); \
+ filename.c_str())); \
}
void DHTRoutingTableSerializer::serialize(const std::string& filename)
{
- A2_LOG_INFO(fmt("Saving DHT routing table to %s.",
- utf8ToNative(filename).c_str()));
+ A2_LOG_INFO(fmt("Saving DHT routing table to %s.", filename.c_str()));
std::string filenameTemp = filename+"__temp";
BufferedFile fp(filenameTemp, BufferedFile::WRITE);
if(!fp) {
throw DL_ABORT_EX(fmt("Failed to save DHT routing table to %s.",
- utf8ToNative(filename).c_str()));
+ filename.c_str()));
}
char header[8];
memset(header, 0, sizeof(header));
@@ -146,11 +145,11 @@ void DHTRoutingTableSerializer::serialize(const std::string& filename)
}
if(fp.close() == EOF) {
throw DL_ABORT_EX(fmt("Failed to save DHT routing table to %s.",
- utf8ToNative(filename).c_str()));
+ filename.c_str()));
}
if(!File(filenameTemp).renameTo(filename)) {
throw DL_ABORT_EX(fmt("Failed to save DHT routing table to %s.",
- utf8ToNative(filename).c_str()));
+ filename.c_str()));
}
A2_LOG_INFO("DHT routing table was saved successfully");
}