Skip to content
Snippets Groups Projects
Commit 50dbbce3 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix inverted comparisons in SUB and UNSUB messages

parent 86e9f99a
Branches
Tags
No related merge requests found
...@@ -2227,7 +2227,7 @@ MQTT.Packet.SUBSCRIBE.prototype.recv = function(conn) { ...@@ -2227,7 +2227,7 @@ MQTT.Packet.SUBSCRIBE.prototype.recv = function(conn) {
var tfilter = conn.getUTF8String(); var tfilter = conn.getUTF8String();
var sopts = new MQTT.Connection.SubscriptionOptions(conn.getByte()); var sopts = new MQTT.Connection.SubscriptionOptions(conn.getByte());
this.payload.push({topic_filter: tfilter, subscription_options: sopts}); this.payload.push({topic_filter: tfilter, subscription_options: sopts});
} while ((start_len - conn.rx_buf.length) > this.pkt_length); } while ((start_len - conn.rx_buf.length) < this.pkt_length);
}; };
// MQTT.Packet.SUBACK class // MQTT.Packet.SUBACK class
...@@ -2280,7 +2280,7 @@ MQTT.Packet.UNSUBSCRIBE.prototype.recv = function(conn) { ...@@ -2280,7 +2280,7 @@ MQTT.Packet.UNSUBSCRIBE.prototype.recv = function(conn) {
do { do {
this.payload.push(conn.getUTF8String()); this.payload.push(conn.getUTF8String());
} while ((start_len - conn.rx_buf.length) > this.pkt_length); } while ((start_len - conn.rx_buf.length) < this.pkt_length);
}; };
// MQTT.Packet.UNSUBACK class // MQTT.Packet.UNSUBACK class
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment