From a7a25e39d2f7f352370beaaad6cf7a1ee6fb8f2d Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Wed, 11 Jun 2003 17:53:26 +0000
Subject: [PATCH]  o slurm_send_rc_msg() now has return value

---
 src/common/slurm_protocol_api.c | 6 ++----
 src/common/slurm_protocol_api.h | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 4b670dc14c6..c49961337e4 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -721,7 +721,7 @@ int slurm_unpack_slurm_addr_no_alloc(slurm_addr * slurm_address,
  * IN request_msg        - slurm_msg the request msg
  * IN rc                 - the return_code to send back to the client
  */
-void slurm_send_rc_msg(slurm_msg_t *msg, int rc)
+int slurm_send_rc_msg(slurm_msg_t *msg, int rc)
 {
         slurm_msg_t resp_msg;
         return_code_msg_t rc_msg;
@@ -733,7 +733,7 @@ void slurm_send_rc_msg(slurm_msg_t *msg, int rc)
         resp_msg.data     = &rc_msg;
 
         /* send message */
-        slurm_send_node_msg(msg->conn_fd, &resp_msg);
+        return slurm_send_node_msg(msg->conn_fd, &resp_msg);
 }
 
 /*
@@ -862,8 +862,6 @@ static int _send_recv_rc_msg(slurm_fd fd, slurm_msg_t *req, int *rc,
         if (msg.msg_type != RESPONSE_SLURM_RC) 
                 slurm_seterrno_ret(SLURM_UNEXPECTED_MSG_ERROR);
 
-        verbose("got rc msg");
-
         *rc = ((return_code_msg_t *) msg.data)->return_code;
         slurm_free_return_code_msg(msg.data);
 
diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h
index ee57636460a..848be2279cd 100644
--- a/src/common/slurm_protocol_api.h
+++ b/src/common/slurm_protocol_api.h
@@ -375,7 +375,7 @@ int inline slurm_unpack_slurm_addr_no_alloc(slurm_addr * slurm_address,
  * IN request_msg	- slurm_msg the request msg
  * IN rc 		- the return_code to send back to the client
  */
-void slurm_send_rc_msg(slurm_msg_t * request_msg, int rc);
+int slurm_send_rc_msg(slurm_msg_t * request_msg, int rc);
 
 /* slurm_send_recv_controller_msg
  * opens a connection to the controller, sends the controller a message, 
-- 
GitLab