From 9f747b6cdfd2bd6debd7ec6eabc673eb295ce422 Mon Sep 17 00:00:00 2001 From: tewk <tewk@unknown> Date: Thu, 18 Jul 2002 17:35:24 +0000 Subject: [PATCH] replaced _pack _unpak functions with pack unpack fixed big/little endian problem --- src/common/slurm_protocol_pack.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 1ca3f92ff2c..371645d221d 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -1174,7 +1174,7 @@ void pack_slurm_addr_array ( slurm_addr * slurm_address , uint16_t size_val, voi { int i=0; uint16_t nl = htons(size_val); - _pack16( nl, buffer, length); + pack16( nl, buffer, length); for ( i=0; i < size_val; i++ ) { @@ -1186,8 +1186,10 @@ void pack_slurm_addr_array ( slurm_addr * slurm_address , uint16_t size_val, voi void unpack_slurm_addr_array ( slurm_addr ** slurm_address , uint16_t * size_val , void ** buffer , int * length ) { int i=0; - _unpack16( size_val, buffer , length ); - slurm_address = xmalloc( (*size_val) * sizeof( slurm_addr ) ); + uint16_t nl ; + unpack16( & nl , buffer , length ); + *size_val = ntohs ( nl ) ; + *slurm_address = xmalloc( (*size_val) * sizeof( slurm_addr ) ); for ( i=0; i < *size_val; i++ ) { -- GitLab