Merge pull request #131 from majestrate/dev

begin fixing issue #121
This commit is contained in:
Jeff 2018-12-11 13:20:49 -05:00 committed by GitHub
commit c2e379809a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -187,8 +187,19 @@ namespace llarp
bool read = false;
if(!BEncodeMaybeReadDictEntry("e", enckey, read, key, buf))
return false;
if(!BEncodeMaybeReadDictEntry("q", pq, read, key, buf))
return false;
if(llarp_buffer_eq(key, "q"))
{
llarp_buffer_t str;
if(!bencode_read_string(buf, &str))
return false;
if(str.sz == 3200 || str.sz == 2818)
{
pq = str.base;
return true;
}
else
return false;
}
if(!BEncodeMaybeReadDictEntry("s", signkey, read, key, buf))
return false;
if(!BEncodeMaybeReadDictInt("v", version, read, key, buf))