From 8b0e2c05bf6931f8085ae80fba29e2b5c58771ba Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 18 Apr 2017 19:40:36 +0200 Subject: [PATCH] double `htons` replaced by `ntohs` for diff-indian compilers --- central-manager/lib/local/middleware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/central-manager/lib/local/middleware.c b/central-manager/lib/local/middleware.c index 52aced2..b19a33c 100644 --- a/central-manager/lib/local/middleware.c +++ b/central-manager/lib/local/middleware.c @@ -157,7 +157,7 @@ int multicastTerminal(struct middleware_arg* arg){ }else{ strcpy(request.addr, SERV_HOST); request.port = comInfo.sin_port; - if( DEBUGMOD&SCK ) printf("{%s}{udp_com} socket opened on %s:%d\n", arg->entity, request.addr, htons(request.port)); + if( DEBUGMOD&SCK ) printf("{%s}{udp_com} socket opened on %s:%d\n", arg->entity, request.addr, ntohs(request.port)); } } @@ -178,7 +178,7 @@ int multicastTerminal(struct middleware_arg* arg){ return -2; } - printf("{%s} sent: bind_header{flag = %d; addr = '%s'; port = %d}\n", arg->entity, (int) request.flags, request.addr, htons(request.port)); + printf("{%s} sent: bind_header{flag = %d; addr = '%s'; port = %d}\n", arg->entity, (int) request.flags, request.addr, ntohs(request.port)); return 0;