diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c index 424d6275ec48bcc2b80591385291f847d56618b5..73bda87537b715d6c89ef5c30368927e8f6ee903 100644 --- a/src/common/slurm_protocol_util.c +++ b/src/common/slurm_protocol_util.c @@ -83,12 +83,12 @@ void init_header(header_t *header, slurm_msg_t *msg, || msg->msg_type == ACCOUNTING_FIRST_REG) { uint32_t rpc_version = ((accounting_update_msg_t *)msg->data)->rpc_version; - if(rpc_version < 5) - header->version = SLURM_1_3_PROTOCOL_VERSION; - else if(rpc_version < 6) - header->version = SLURM_2_0_PROTOCOL_VERSION; - else if(rpc_version >= 6) + if(rpc_version >= 6) header->version = SLURM_PROTOCOL_VERSION; + else if(rpc_version >= 5) + header->version = SLURM_2_0_PROTOCOL_VERSION; + else + header->version = SLURM_1_3_PROTOCOL_VERSION; } else header->version = SLURM_PROTOCOL_VERSION;