mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
fix clang compilation and warnings
This commit is contained in:
1 parent
31bd66b4c1
commit
f6b3c263b2
3 files changed
+5
-6
No files matched your search
@@ -194,8 +194,8 @@ public:
|
||||
|
||||
int getNodesStats(sa_family_t af, unsigned *good_return, unsigned *dubious_return, unsigned *cached_return, unsigned *incoming_return) const;
|
||||
std::string getStorageLog() const;
|
||||
std::string getRoutingTablesLog(sa_family_t af) const;
|
||||
std::string getSearchesLog(sa_family_t af) const;
|
||||
std::string getRoutingTablesLog(sa_family_t) const;
|
||||
std::string getSearchesLog(sa_family_t) const;
|
||||
|
||||
void dumpTables() const;
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
inline void NOLOG(char const*, va_list) {}
|
||||
|
||||
|
||||
class Value;
|
||||
struct Value;
|
||||
|
||||
typedef std::function<bool(InfoHash, std::shared_ptr<Value>&, InfoHash, const sockaddr*, socklen_t)> StorePolicy;
|
||||
typedef std::function<bool(InfoHash, const std::shared_ptr<Value>&, std::shared_ptr<Value>&, InfoHash, const sockaddr*, socklen_t)> EditPolicy;
|
||||
|
||||
+2
-3
@@ -768,7 +768,7 @@ Dht::searchStep(Search& sr)
|
||||
TransId {TransPrefix::ANNOUNCE_VALUES, sr.tid}, sr.id, *a.value,
|
||||
n.token, n.reply_time >= now - UDP_REPLY_TIME);
|
||||
if (a_status == n.acked.end()) {
|
||||
n.acked[vid] = { .request_time = now, .reply_time = TIME_INVALID };
|
||||
n.acked[vid] = { now };
|
||||
} else {
|
||||
a_status->second.request_time = now;
|
||||
}
|
||||
@@ -1767,9 +1767,8 @@ Dht::getRoutingTablesLog(sa_family_t af) const
|
||||
}
|
||||
|
||||
std::string
|
||||
Dht::getSearchesLog(sa_family_t af) const
|
||||
Dht::getSearchesLog(sa_family_t) const
|
||||
{
|
||||
auto& list = (af == AF_INET) ? buckets : buckets6;
|
||||
std::stringstream out;
|
||||
for (const auto& sr : searches)
|
||||
dumpSearch(sr, out);
|
||||
|
||||
Reference in new issue
Block a user