version 1.1.1.1, 2012/01/26 13:07:33
|
version 1.1.1.1.2.1, 2012/04/26 15:26:37
|
Line 88 main()
|
Line 88 main()
|
printf("subscribe=%d/%d\n", m->msg_len, mqtt_msgSUBSCRIBE(m, s, 10, 0, 0)); |
printf("subscribe=%d/%d\n", m->msg_len, mqtt_msgSUBSCRIBE(m, s, 10, 0, 0)); |
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]); |
hdr = mqtt_readSUBSCRIBE(m, &msgID, &ss); | if (mqtt_readSUBSCRIBE(m, &msgID, &ss) == -1) { |
if (!hdr) { | |
printf("Error:: mqtt_readSUBSCRIBE() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
printf("Error:: mqtt_readSUBSCRIBE() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
return 3; |
return 3; |
} |
} |
Line 109 main()
|
Line 108 main()
|
printf("unsubscribe=%d/%d\n", m->msg_len, mqtt_msgUNSUBSCRIBE(m, s, 10, 0, 1)); |
printf("unsubscribe=%d/%d\n", m->msg_len, mqtt_msgUNSUBSCRIBE(m, s, 10, 0, 1)); |
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]); |
hdr = mqtt_readUNSUBSCRIBE(m, &msgID, &ss); | if (mqtt_readUNSUBSCRIBE(m, &msgID, &ss) == -1) { |
if (!hdr) { | |
printf("Error:: mqtt_readUNSUBSCRIBE() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
printf("Error:: mqtt_readUNSUBSCRIBE() #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
return 3; |
return 3; |
} |
} |