kansifang / moquette-mqtt

Automatically exported from code.google.com/p/moquette-mqtt
Apache License 2.0
0 stars 0 forks source link

MQTTDecoder.java not working with PINGREQ message. #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect a MQTT client (see IA92 - http://ibm.co/Lp04D3 - for example) is 
connected to this broker.
2. The client will send out a PINGREQ message every keepAlive number of seconds.
3. Set up decoder for PINGREQ message in MQTTHandler.java
4. When a PINGREQ message is received, in MQTTDecoder.java, the message type is 
reported as zero.

What is the expected output? What do you see instead?
1. Expected output is 12 (0x0c).

What version of the product are you using? On what operating system?
Linux 64-bit (Ubuntu 12.04)

Please provide any additional information below.
The issue could be resolved using the following (see : http://bit.ly/Onyrdf) in 
MQTTDecoder.java

byte messageType = (byte) ((h1 & 0xff) >>> 4)

Original issue reported on code.google.com by NageshBl...@gmail.com on 17 Jun 2012 at 6:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 4cd366e6344a.

Original comment by selva.an...@gmail.com on 24 Jul 2012 at 8:52