|
|
| version 1.1.1.1.2.1, 2012/04/26 15:26:37 | version 1.1.1.1.2.2, 2012/04/27 15:15:12 |
|---|---|
| Line 49 main() | Line 49 main() |
| for (i = 0; i < m->msg_len; i++) | for (i = 0; i < m->msg_len; i++) |
| printf("%d\n", ((u_char*) m->msg_base)[i]); | printf("%d\n", ((u_char*) m->msg_base)[i]); |
| len = sizeof message; | len = sizeof message; |
| hdr = mqtt_readPUBLISH(m, topic, sizeof topic, &msgID, message, &len); | if (!mqtt_readPUBLISH(m, topic, sizeof topic, &msgID, message, &len)) { |
| if (!hdr) { | |
| printf("Error:: mqtt_readPUBLISH() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); | printf("Error:: mqtt_readPUBLISH() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
| return 2; | return 2; |
| } | } |