slurmrestd - Demote send_http_connection_close() to static
Demote send_http_connection_close() to _send_http_connection_close() as
external linkage is not required.
Issue: 50189
diff --git a/src/slurmrestd/http.c b/src/slurmrestd/http.c
index 6dc7240..6083834 100644
--- a/src/slurmrestd/http.c
+++ b/src/slurmrestd/http.c
@@ -480,7 +480,13 @@
return xstrdup_printf("%s: %zu" CRLF, name, value);
}
-extern int send_http_connection_close(http_context_t *ctxt)
+/*
+ * Send HTTP close notification header
+ * Warns the client that we are about to close the connection.
+ * IN ctxt - connection context
+ * RET SLURM_SUCCESS or error
+ */
+static int _send_http_connection_close(http_context_t *ctxt)
{
return _write_fmt_header(ctxt->con, "Connection", "Close");
}
@@ -608,7 +614,7 @@
if (request->connection_close ||
_valid_http_version(request->http_version.major,
request->http_version.minor))
- send_http_connection_close(context);
+ _send_http_connection_close(context);
/* ensure connection gets closed */
conmgr_con_queue_close_free(&context->ref);
@@ -684,7 +690,7 @@
if (request->connection_close) {
/* Notify client that this connection will be closed now */
if (request->connection_close)
- send_http_connection_close(context);
+ _send_http_connection_close(context);
conmgr_con_queue_close_free(&context->ref);
context->con = NULL;
diff --git a/src/slurmrestd/http.h b/src/slurmrestd/http.h
index bf10c8d..c08b371 100644
--- a/src/slurmrestd/http.h
+++ b/src/slurmrestd/http.h
@@ -120,14 +120,6 @@
} send_http_response_args_t;
/*
- * Send HTTP close notification.
- * Warns the client that we are about to close the connection.
- * IN args arguments of response
- * RET SLURM_SUCCESS or error
- */
-extern int send_http_connection_close(http_context_t *ctxt);
-
-/*
* Send HTTP response
* IN args arguments of response
* RET SLURM_SUCCESS or error