From bd33ac202f7fc2a255524e9c8538d06642e6d577 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 26 Apr 2021 18:21:00 -0400 Subject: [PATCH] handle hostname for STREAM CREATE --- libi2pd_client/SAM.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libi2pd_client/SAM.cpp b/libi2pd_client/SAM.cpp index c662c283..41d08147 100644 --- a/libi2pd_client/SAM.cpp +++ b/libi2pd_client/SAM.cpp @@ -496,10 +496,9 @@ namespace client else m_BufferOffset = 0; - std::shared_ptr
addr; - auto pos = destination.find(".b32.i2p"); - if (pos != std::string::npos) - addr = std::make_shared
(destination.substr (0, pos)); + std::shared_ptr addr; + if (destination.find(".i2p") != std::string::npos) + addr = context.GetAddressBook().GetAddress (destination); else { auto dest = std::make_shared ();