--- libaitmqtt/inc/mqttapi.h 2012/05/01 01:12:16 1.1.2.5 +++ libaitmqtt/inc/mqttapi.h 2012/05/05 13:31:48 1.1.2.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: mqttapi.h,v 1.1.2.5 2012/05/01 01:12:16 misho Exp $ +* $Id: mqttapi.h,v 1.1.2.7 2012/05/05 13:31:48 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -53,8 +53,8 @@ SUCH DAMAGE. #ifdef API_SERVER_SIDE /* MQTT server structure & hooks */ -/* MQTT command callback. 1st argument is (mqtt_srv_t*) server handle */ -typedef int (*mqtt_cb_t)(void* /*mqtt_srv_t**/, void *); +/* MQTT command callback. 1st argument is (mqtt_srv_t*) server handle, 2nd is ready length */ +typedef int (*mqtt_cb_t)(void* /*mqtt_srv_t**/, int, void *); typedef struct { mqtt_cb_t cmds[MQTT_TYPE_MAX]; @@ -84,10 +84,11 @@ void mqtt_srv_Fini(mqtt_srv_t ** __restrict psrv); * mqtt_srv_Dispatch() MQTT server dispatcher * * @srv = Server handle + * @rlen = Ready bytes to parse * @arg = Argument pass to command callback * return: -1 error or 0 ok */ -int mqtt_srv_Dispatch(mqtt_srv_t * __restrict srv, void *arg); +int mqtt_srv_Dispatch(mqtt_srv_t * __restrict srv, int rlen, void *arg); #endif /*