--- libaitmqtt/src/cliside.c 2012/05/09 13:48:31 1.1.2.6 +++ libaitmqtt/src/cliside.c 2012/05/10 09:06:42 1.1.2.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cliside.c,v 1.1.2.6 2012/05/09 13:48:31 misho Exp $ +* $Id: cliside.c,v 1.1.2.7 2012/05/10 09:06:42 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -170,7 +170,7 @@ mqtt_cli_Subscribe(mqtt_cli_t * __restrict cli, mqtt_s return NULL; if (msgID != mid) { free(qoses); - mqtt_SetErr(EBADMSG, "Receive different message ID %hu != %hu", msgID, mid); + mqtt_SetErr(ECANCELED, "Receive different message ID %hu != %hu", msgID, mid); return NULL; } @@ -221,7 +221,7 @@ mqtt_cli_Unsubscribe(mqtt_cli_t * __restrict cli, mqtt if (siz == -1) return -1; if (msgID != siz) { - mqtt_SetErr(EBADMSG, "Receive different message ID %hu != %hu", msgID, siz); + mqtt_SetErr(ECANCELED, "Receive different message ID %hu != %hu", msgID, siz); return -1; } @@ -280,7 +280,7 @@ mqtt_cli_Publish(mqtt_cli_t * __restrict cli, u_short if (siz == -1) return -1; if (msgID != siz) { - mqtt_SetErr(EBADMSG, "Receive different message ID %hu != %hu", msgID, siz); + mqtt_SetErr(ECANCELED, "Receive different message ID %hu != %hu", msgID, siz); return -1; } goto end; @@ -289,7 +289,7 @@ mqtt_cli_Publish(mqtt_cli_t * __restrict cli, u_short if (siz == -1) return -1; if (msgID != siz) { - mqtt_SetErr(EBADMSG, "Receive different message ID %hu != %hu", msgID, siz); + mqtt_SetErr(ECANCELED, "Receive different message ID %hu != %hu", msgID, siz); return -1; } } @@ -319,7 +319,7 @@ mqtt_cli_Publish(mqtt_cli_t * __restrict cli, u_short if (siz == -1) return -1; if (msgID != siz) { - mqtt_SetErr(EBADMSG, "Receive different message ID %hu != %hu", msgID, siz); + mqtt_SetErr(ECANCELED, "Receive different message ID %hu != %hu", msgID, siz); if (Dup++ > 1) return -1; else