mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 08:56:51 +01:00
Will message additions
This commit is contained in:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user