mirror of https://github.com/eclipse/paho.mqtt.c
Fix test8 and remove debug printfs
This commit is contained in:
parent
f3c5df6376
commit
7004cb8a28
|
|
@ -1094,13 +1094,10 @@ void MQTTAsync_writeComplete(SOCKET socket, int rc)
|
|||
|
||||
if (cur_response) /* we found a response */
|
||||
{
|
||||
printf("writeComplete: cur_response\n");
|
||||
if (command->type == PUBLISH)
|
||||
{
|
||||
printf("writeComplete: PUBLISH %d %d\n", rc, command->details.pub.qos);
|
||||
if (rc == 1 && command->details.pub.qos == 0)
|
||||
{
|
||||
printf("writeComplete: rc 1 onSuccess %p\n", command->onSuccess);
|
||||
if (command->onSuccess)
|
||||
{
|
||||
MQTTAsync_successData data;
|
||||
|
|
|
|||
10
test/test8.c
10
test/test8.c
|
|
@ -1265,6 +1265,7 @@ int test6(struct Options options)
|
|||
int rc = 0;
|
||||
char* test_topic = "C client test8 - test6";
|
||||
int messages_sent = 0;
|
||||
int count = 0;
|
||||
|
||||
failures = 0;
|
||||
test_finished = 0;
|
||||
|
|
@ -1349,10 +1350,10 @@ int test6(struct Options options)
|
|||
dopts.timeout = 1000;
|
||||
|
||||
dopts.context = d;
|
||||
rc = MQTTAsync_disconnect(d, &dopts);
|
||||
test6_disconnected = 0;
|
||||
rc = MQTTAsync_disconnect(d, &dopts);
|
||||
assert("Disconnect start successful", rc == MQTTASYNC_SUCCESS, "rc was %d", rc);
|
||||
while (test6_disconnected == 0)
|
||||
while (test6_disconnected == 0 && ++count < 5)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
Sleep(1000);
|
||||
|
|
@ -1362,10 +1363,11 @@ int test6(struct Options options)
|
|||
}
|
||||
|
||||
dopts.context = c;
|
||||
rc = MQTTAsync_disconnect(c, &dopts);
|
||||
test6_disconnected = 0;
|
||||
rc = MQTTAsync_disconnect(c, &dopts);
|
||||
assert("Disconnect start successful", rc == MQTTASYNC_SUCCESS, "rc was %d", rc);
|
||||
while (test6_disconnected == 0)
|
||||
count = 0;
|
||||
while (test6_disconnected == 0 && ++count < 5)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
Sleep(1000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue