diff --git a/src/common/slurmdbd_defs.c b/src/common/slurmdbd_defs.c index 1bd7861666fb41a819409a049ed9cc57b9f802a2..fa1fba5cf427d816ee6a946dc3d707e8207dc0e2 100644 --- a/src/common/slurmdbd_defs.c +++ b/src/common/slurmdbd_defs.c @@ -3149,11 +3149,21 @@ inline void slurmdbd_pack_job_complete_msg(dbd_job_comp_msg_t *msg, uint16_t rpc_version, Buf buffer) { - if (rpc_version >= 8) { + if (rpc_version >= 9) { + pack32(msg->assoc_id, buffer); + packstr(msg->comment, buffer); + pack32(msg->db_index, buffer); + pack32(msg->derived_ec, buffer); + pack_time(msg->end_time, buffer); + pack32(msg->exit_code, buffer); + pack32(msg->job_id, buffer); + pack16(msg->job_state, buffer); + packstr(msg->nodes, buffer); + pack32(msg->req_uid, buffer); + pack_time(msg->start_time, buffer); + pack_time(msg->submit_time, buffer); + } else if (rpc_version >= 8) { pack32(msg->assoc_id, buffer); - if (rpc_version >= 9) { - packstr(msg->comment, buffer); - } pack32(msg->db_index, buffer); pack32(msg->derived_ec, buffer); pack_time(msg->end_time, buffer); @@ -3186,12 +3196,21 @@ slurmdbd_unpack_job_complete_msg(dbd_job_comp_msg_t **msg, dbd_job_comp_msg_t *msg_ptr = xmalloc(sizeof(dbd_job_comp_msg_t)); *msg = msg_ptr; - if (rpc_version >= 8) { + if (rpc_version >= 9) { + safe_unpack32(&msg_ptr->assoc_id, buffer); + safe_unpackstr_xmalloc(&msg_ptr->comment, &uint32_tmp, buffer); + safe_unpack32(&msg_ptr->db_index, buffer); + safe_unpack32(&msg_ptr->derived_ec, buffer); + safe_unpack_time(&msg_ptr->end_time, buffer); + safe_unpack32(&msg_ptr->exit_code, buffer); + safe_unpack32(&msg_ptr->job_id, buffer); + safe_unpack16(&msg_ptr->job_state, buffer); + safe_unpackstr_xmalloc(&msg_ptr->nodes, &uint32_tmp, buffer); + safe_unpack32(&msg_ptr->req_uid, buffer); + safe_unpack_time(&msg_ptr->start_time, buffer); + safe_unpack_time(&msg_ptr->submit_time, buffer); + } else if (rpc_version >= 8) { safe_unpack32(&msg_ptr->assoc_id, buffer); - if (rpc_version >= 9) { - safe_unpackstr_xmalloc(&msg_ptr->comment, &uint32_tmp, - buffer); - } safe_unpack32(&msg_ptr->db_index, buffer); safe_unpack32(&msg_ptr->derived_ec, buffer); safe_unpack_time(&msg_ptr->end_time, buffer);