From 4af2f8180c644d0916096793c528138d369062ca Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 29 Apr 2017 17:09:31 +0200 Subject: [PATCH] [Fix] ctrlTerm doesn't get DATA when flag TERMREQ_FBK absent --- central-manager/lib/local/handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/central-manager/lib/local/handler.c b/central-manager/lib/local/handler.c index 7a358de..8771bdd 100644 --- a/central-manager/lib/local/handler.c +++ b/central-manager/lib/local/handler.c @@ -447,7 +447,7 @@ void* manageCtrlTerm(void* THREADABLE_ARGS){ count = recv(arg->sgca->socket[pindex], buffer, sizeof(char), 0); if( count != sizeof(char) ){ - printf("{udp_cterm}{com}(%d) Cannot get response from plane %d (%d)\n", index, count, PLANE_LEN); + printf("{udp_cterm}{com}(%d) Cannot get response from plane %d (%d)\n", index, count, (int) PLANE_LEN); break; } printf("{udp_cterm}{com}(%d) Plane res { flags: %d }\n", index, buffer[0]); @@ -467,6 +467,7 @@ void* manageCtrlTerm(void* THREADABLE_ARGS){ dataBuffer = realloc(dataBuffer, sizeof(char)*2 ); dataBuffer[0] = request.flags; dataBuffer[1] = 0; + dataLen = 2; } break;