From cecafb3215e60a54ed1c197406b1b96cd24e87ac Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Thu, 4 Jun 2020 13:32:38 -0600 Subject: [PATCH] Undo unintentional revert? --- llarp/config/key_manager.cpp | 6 +++--- llarp/router/router.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llarp/config/key_manager.cpp b/llarp/config/key_manager.cpp index 8657b5fdc..871988f27 100644 --- a/llarp/config/key_manager.cpp +++ b/llarp/config/key_manager.cpp @@ -61,7 +61,7 @@ namespace llarp m_lokidRPCPassword = config.lokid.lokidRPCPassword; RouterContact rc; - bool exists = rc.Read(m_rcPath.c_str()); + bool exists = rc.Read(m_rcPath); if (not exists and not genIfAbsent) { LogError("Could not read RouterContact at path ", m_rcPath); @@ -216,7 +216,7 @@ namespace llarp LogInfo("Generating new key", filepath); keygen(key); - if (!key.SaveToFile(filepath.c_str())) + if (!key.SaveToFile(filepath)) { LogError("Failed to save new key"); return false; @@ -224,7 +224,7 @@ namespace llarp } LogDebug("Loading key from file ", filepath); - return key.LoadFromFile(filepath.c_str()); + return key.LoadFromFile(filepath); } bool diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index c28fa2aad..0e34166c8 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -262,6 +262,7 @@ namespace llarp Router::HandleSaveRC() const { std::string fname = our_rc_file.string(); + LogWarn("WRITING RC TO DISK @ ", fname); _rc.Write(fname.c_str()); }