Browse Source

don't save invalid addreses

pull/1550/head
orignal 4 years ago
parent
commit
e7ff6fbffc
  1. 5
      libi2pd_client/AddressBook.cpp

5
libi2pd_client/AddressBook.cpp

@ -197,6 +197,8 @@ namespace client @@ -197,6 +197,8 @@ namespace client
}
for (const auto& it: addresses)
{
if (it.second->IsValid ())
{
f << it.first << ",";
if (it.second->IsIdentHash ())
@ -206,6 +208,9 @@ namespace client @@ -206,6 +208,9 @@ namespace client
f << std::endl;
num++;
}
else
LogPrint (eLogWarning, "Addressbook: invalid address ", it.first);
}
LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved");
return num;
}

Loading…
Cancel
Save