From 05db5b277232fcfcd35d383cf6d14718aedc39a0 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 25 Mar 2008 18:50:45 +0000 Subject: [PATCH] tweak the logic to get packing order exact, not just the right number of records of each type --- src/common/jobacct_common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/jobacct_common.c b/src/common/jobacct_common.c index 0f044139d8f..316123bfa18 100644 --- a/src/common/jobacct_common.c +++ b/src/common/jobacct_common.c @@ -70,10 +70,13 @@ static void _pack_sacct(sacct_t *sacct, Buf buffer) int mult = 1000000; if(!sacct) { - for(i=0; i<12; i++) + for(i=0; i<8; i++) + pack32((uint32_t) 0, buffer); + + for(i=0; i<4; i++) { /* _pack_jobacct_id() */ pack32((uint32_t) 0, buffer); - for(i=0; i<4; i++) pack16((uint16_t) 0, buffer); + } return; } pack32((uint32_t)sacct->max_vsize, buffer); @@ -84,6 +87,7 @@ static void _pack_sacct(sacct_t *sacct, Buf buffer) pack32((uint32_t)(sacct->ave_pages*mult), buffer); pack32((uint32_t)(sacct->min_cpu*mult), buffer); pack32((uint32_t)(sacct->ave_cpu*mult), buffer); + _pack_jobacct_id(&sacct->max_vsize_id, buffer); _pack_jobacct_id(&sacct->max_rss_id, buffer); _pack_jobacct_id(&sacct->max_pages_id, buffer); -- GitLab