version 1.2.2.2, 2012/04/11 15:08:27
|
version 1.2.2.3, 2012/04/16 00:09:57
|
Line 89 Publish(int sock)
|
Line 89 Publish(int sock)
|
goto end; |
goto end; |
} |
} |
|
|
siz = mqtt_msgPUBREL(args->msg, args->MsgID); | do { |
if (siz == -1) { | siz = mqtt_msgPUBREL(args->msg, args->MsgID); |
printf("Error:: msgPUBREL #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); | if (siz == -1) { |
return -1; | printf("Error:: msgPUBREL #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
} | return -1; |
if (SendTo(sock, siz) == -1) | } |
return -1; | if (SendTo(sock, siz) == -1) |
| return -1; |
|
|
if ((siz = RecvFrom(sock)) == -1 || !siz) | if ((siz = RecvFrom(sock)) == -1 || !siz) |
return -1; | return -1; |
|
|
siz = mqtt_readPUBCOMP(args->msg); | siz = mqtt_readPUBCOMP(args->msg); |
if (siz == args->MsgID) | if (siz == args->MsgID) |
return siz; | return siz; |
if (!args->Dup) { | if (!args->Dup) { |
args->Dup++; | args->Dup++; |
return Publish(sock); | continue; |
} | } |
| } while (0); |
|
|
end: |
end: |
printf("Error:: Message not delivered\n"); |
printf("Error:: Message not delivered\n"); |