In readBinaryElement, added argument allowNull, and use for ContentObject content.
This fixes some of the connection problems where the initial response from a new hub would not decode.
diff --git a/js/ContentObject.js b/js/ContentObject.js
index 71aed69..ca6a819 100644
--- a/js/ContentObject.js
+++ b/js/ContentObject.js
@@ -141,10 +141,7 @@
this.signedInfo.from_ccnb(decoder);
}
- if (decoder.peekTypeAndVal() == null)
- this.content = null;
- else
- this.content = decoder.readBinaryElement(CCNProtocolDTags.Content);
+ this.content = decoder.readBinaryElement(CCNProtocolDTags.Content, null, true);
this.endSIG = decoder.offset;