From 812e2814bcb24f335ab4be1db4e3cb192c792fe2 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 31 Dec 2018 14:23:48 -0500 Subject: [PATCH] read flags from LS2 header --- libi2pd/LeaseSet.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libi2pd/LeaseSet.cpp b/libi2pd/LeaseSet.cpp index 470dfc0a..2999f2f2 100644 --- a/libi2pd/LeaseSet.cpp +++ b/libi2pd/LeaseSet.cpp @@ -244,14 +244,15 @@ namespace data uint32_t timestamp = bufbe32toh (buf + offset); offset += 4; // published timestamp (seconds) uint16_t expires = bufbe16toh (buf + offset); offset += 2; // expires (seconds) SetExpirationTime ((timestamp + expires)*1000LL); // in milliseconds - offset += 2; // flags + uint16_t flags = bufbe16toh (buf + offset); offset += 2; // flags + if (flags) return; // offline keys not supported // properties uint16_t propertiesLen = bufbe16toh (buf + offset); offset += 2; offset += propertiesLen; // skip for now. TODO: implement properties if (offset + 1 >= len) return; // key sections - int numKeySections = buf[offset]; offset++; - for (int i = 0; i < numKeySections; i++) + //int numKeySections = buf[offset]; offset++; + //for (int i = 0; i < numKeySections; i++) { // skip key for now. TODO: implement encryption key offset += 2; // encryption key type