Will message additions

This commit is contained in:
Ian Craggs
2014-07-07 16:12:13 +01:00
parent 88f7c815e4
commit 6b29d2fa3d
6 changed files with 777 additions and 12 deletions

View File

@@ -426,7 +426,7 @@ int test2(struct Options options)
memset(&topic, 0, sizeof(topic));
memset(&topic2, 0, sizeof(topic2));
topic.type = MQTTSN_TOPIC_TYPE_SHORT;
memcpy(topic.data.name, "my", 2);
memcpy(topic.data.short_name, "my", 2);
rc = MQTTSNSerialize_publish(buf, buflen, dup, qos, retained, msgid, topic,
payload, payloadlen);
assert("good rc from serialize publish", rc > 0, "rc was %d\n", rc);
@@ -664,10 +664,10 @@ int test6(struct Options options)
int connack_rc2 = 0;
fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
fprintf(xml, "<testcase classname=\"test6\" name=\"de/serialization\"");
global_start_time = start_clock();
failures = 0;
MyLog(LOGA_INFO, "Starting test 2 - serialization of connack and back");
MyLog(LOGA_INFO, "Starting test 6 - serialization of connack and back");
rc = MQTTSNSerialize_connack(buf, buflen, connack_rc);
assert("good rc from serialize connack", rc > 0, "rc was %d\n", rc);
@@ -676,7 +676,7 @@ int test6(struct Options options)
assert("good rc from deserialize connack", rc == 1, "rc was %d\n", rc);
/* data after should be the same as data before */
assert("dups should be the same", connack_rc == connack_rc2, "dups were different %d\n", connack_rc2);
assert("connack rcs should be the same", connack_rc == connack_rc2, "connack rcs were different %d\n", connack_rc2);
/* exit: */
MyLog(LOGA_INFO, "TEST6: test %s. %d tests run, %d failures.",