From 895c41488ce49073eca20b50bcd81b45e6fbec35 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Mon, 14 Mar 2005 17:31:24 +0000
Subject: [PATCH] Make RPC header version be based upon API version number.
 While not ideal, it makes for one less thing to worry about updating when a
 new release and thus should be better in the long run.

---
 src/common/slurm_protocol_common.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/common/slurm_protocol_common.h b/src/common/slurm_protocol_common.h
index ecd78e098a5..93f18525568 100644
--- a/src/common/slurm_protocol_common.h
+++ b/src/common/slurm_protocol_common.h
@@ -28,6 +28,10 @@
 #ifndef _SLURM_PROTOCOL_COMMON_H
 #define _SLURM_PROTOCOL_COMMON_H
 
+#if HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <sys/time.h>
 #include <time.h>
 
@@ -46,8 +50,8 @@
  * this may need to be increased to 350k-512k */
 #define SLURM_PROTOCOL_MAX_MESSAGE_BUFFER_SIZE (512*1024)
 
-/* slurm protocol header defines */ 
-#define SLURM_PROTOCOL_VERSION 3
+/* slurm protocol header defines, based upon config.h, 16 bits */ 
+#define SLURM_PROTOCOL_VERSION ((SLURM_API_MAJOR << 8) | SLURM_API_AGE)
 
 /* used to set flags to empty */
 #define SLURM_PROTOCOL_NO_FLAGS 0 
-- 
GitLab