Fix bugs: Need to call local encodeInterest, etc, not to_ccnb.
diff --git a/js/encoding/BinaryXMLWireFormat.js b/js/encoding/BinaryXMLWireFormat.js
index 5cc2a5f..8dbe3a2 100644
--- a/js/encoding/BinaryXMLWireFormat.js
+++ b/js/encoding/BinaryXMLWireFormat.js
@@ -17,8 +17,7 @@
*/
BinaryXMLWireFormat.prototype.encodeInterest = function(interest) {
var encoder = new BinaryXMLEncoder();
- interest.to_ccnb(encoder);
-
+ BinaryXMLWireFormat.encodeInterest(interest, encoder);
return encoder.getReducedOstream();
};
@@ -39,8 +38,7 @@
*/
BinaryXMLWireFormat.prototype.encodeContentObject = function(contentObject) {
var encoder = new BinaryXMLEncoder();
- BinaryXMLWireFormat(contentObject, encoder);
-
+ BinaryXMLWireFormat.encodeContentObject(contentObject, encoder);
return encoder.getReducedOstream();
};
@@ -51,7 +49,7 @@
*/
BinaryXMLWireFormat.prototype.decodeContentObject = function(contentObject, input) {
var decoder = new BinaryXMLDecoder(input);
- contentObject.from_ccnb(decoder);
+ BinaryXMLWireFormat.decodeContentObject(contentObject, decoder);
};
// Default object.