fixed shitty ping/request output

This commit is contained in:
xdrm-brackets 2017-05-04 12:18:58 +02:00
parent 5b7d7d5c80
commit d6b2b82116
1 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,6 @@ void* manageCtrlTerm(void* THREADABLE_ARGS){
count += last; last = sizeof(int); memcpy(&request.update.cap, buffer+count, last ); count += last; last = sizeof(int); memcpy(&request.update.cap, buffer+count, last );
count += last; last = sizeof(int); memcpy(&request.update.spd, buffer+count, last ); count += last; last = sizeof(int); memcpy(&request.update.spd, buffer+count, last );
printf("{udp_cterm}{com}(%d) Plane req { flags: %d; plane: #%s { z=%d; cap=%d; speed=%d } }\n", index, request.flags, request.update.code, ntohl(request.update.z), ntohl(request.update.cap), ntohl(request.update.spd));
/* [3] Gestion de la requête /* [3] Gestion de la requête
@ -392,10 +391,11 @@ void* manageCtrlTerm(void* THREADABLE_ARGS){
fbk = request.flags&TERMREQ_FBK; fbk = request.flags&TERMREQ_FBK;
if( !( update || fbk ) ){ if( !( update || fbk ) ){
send(arg->socket, "\x00\0", sizeof(char)*2, 0); send(arg->socket, "\x00\0", sizeof(char)*2, 0);
printf("{udp_cterm}{com}(%d) Empty flag (might be a ping), passing\n", index); printf("{udp_cterm}{com}(%d) Ping received\n", index);
continue; continue;
} }
printf("{udp_cterm}{com}(%d) Plane req { flags: %d; plane: #%s { z=%d; cap=%d; speed=%d } }\n", index, request.flags, request.update.code, ntohl(request.update.z), ntohl(request.update.cap), ntohl(request.update.spd));
/* [4] Gestion de la mise à jour de valeurs /* [4] Gestion de la mise à jour de valeurs
=========================================================*/ =========================================================*/