mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
values: apply a maximum value size
This commit is contained in:
1 parent
4aebef5e51
commit
f94de5ac2b
3 files changed
+11
-12
No files matched your search
+4
-4
@@ -59,10 +59,10 @@ std::ostream& operator<< (std::ostream& s, const Value& v)
|
||||
|
||||
const ValueType ValueType::USER_DATA = {0, "User Data"};
|
||||
|
||||
|
||||
msgpack::unpacked
|
||||
unpackMsg(Blob b) {
|
||||
return msgpack::unpack((const char*)b.data(), b.size());
|
||||
bool
|
||||
ValueType::DEFAULT_STORE_POLICY(InfoHash, std::shared_ptr<Value>& v, InfoHash, const sockaddr*, socklen_t)
|
||||
{
|
||||
return v->data.size() <= MAX_VALUE_SIZE;
|
||||
}
|
||||
|
||||
msgpack::object*
|
||||
|
||||
Reference in new issue
Block a user