diff --git a/apps/aqhome-tool/flash.c b/apps/aqhome-tool/flash.c index bc0a71c..d9a8991 100644 --- a/apps/aqhome-tool/flash.c +++ b/apps/aqhome-tool/flash.c @@ -303,6 +303,12 @@ int _doFlash(GWEN_DB_NODE *dbArgs) return 4; } + rv=Utils_FlushOutMessageQueue(emgr, epTcp, timeoutInSeconds); + if (rv<0) { + DBG_INFO(NULL, "here (%d)", rv); + GWEN_MsgEndpointMgr_free(emgr); + return 4; + } GWEN_MsgEndpointMgr_free(emgr); return 0; @@ -457,6 +463,8 @@ int _sendFlashData(GWEN_MSG_ENDPOINT_MGR *emgr, GWEN_Text_LogString((const char*) ptr, sendLen, NULL, GWEN_LoggerLevel_Error); #endif + fprintf(stdout, "Send data: dest addr=%04x, len=%d bytes\n", address, sendLen); + msgNode=AQH_FlashDataMsg_new(0, 0xc1, AQH_MSG_TYPE_FLASH_DATA, address, ptr, sendLen); if (msgNode==NULL) { DBG_ERROR(NULL, "Error creating message");