From 2c953eba1703c2a6de8afcd09e4b39fdbae8fdb5 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Sun, 17 Oct 2010 21:46:09 +0000
Subject: [PATCH] Fix bugs introduced on Friday in adding a show_flag to a
 block_info RPC

---
 src/common/slurm_protocol_pack.c          | 4 ++--
 src/plugins/select/linear/select_linear.c | 2 +-
 src/sview/block_info.c                    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c
index 87f5607c073..49b9983a242 100644
--- a/src/common/slurm_protocol_pack.c
+++ b/src/common/slurm_protocol_pack.c
@@ -6401,7 +6401,7 @@ _pack_block_info_req_msg(block_info_request_msg_t *msg, Buf buffer,
 {
 	if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
 		pack_time(msg->last_update, buffer);
-		safe_unpack16(&job_info->show_flags, buffer);
+		pack16(msg->show_flags, buffer);
 	} else {
 		pack_time(msg->last_update, buffer);
 	}
@@ -6419,7 +6419,7 @@ _unpack_block_info_req_msg(block_info_request_msg_t **msg,
 
 	if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
 		safe_unpack_time(&node_sel_info->last_update, buffer);
-		safe_unpack16(&node_sel_info->how_flags, buffer);
+		safe_unpack16(&node_sel_info->show_flags, buffer);
 	} else {
 		safe_unpack_time(&node_sel_info->last_update, buffer);
 	}
diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c
index d4bb5ff44f0..aeeed3e87ae 100644
--- a/src/plugins/select/linear/select_linear.c
+++ b/src/plugins/select/linear/select_linear.c
@@ -2583,7 +2583,7 @@ extern int select_p_job_resume(struct job_record *job_ptr)
 	return SLURM_SUCCESS;
 }
 
-eextern int select_p_pack_select_info(time_t last_query_time,
+extern int select_p_pack_select_info(time_t last_query_time,
 				     uint16_t show_flags, Buf *buffer_ptr,
 				     uint16_t protocol_version)
 {
diff --git a/src/sview/block_info.c b/src/sview/block_info.c
index b0ee2f6d697..2b9c88ff443 100644
--- a/src/sview/block_info.c
+++ b/src/sview/block_info.c
@@ -711,7 +711,7 @@ extern int get_new_info_block(block_info_msg_t **block_ptr, int force)
 	time_t now = time(NULL);
 	static time_t last;
 	static bool changed = 0;
-	uint16_t show_flags;
+	uint16_t show_flags = 0;
 
 	if(!(cluster_flags & CLUSTER_FLAG_BG))
 		return error_code;
-- 
GitLab