slurmrestd - Move http_context_t typedef
Change http_context_t into opaque type while only being defined in http.c.
Issue: 50189
diff --git a/src/slurmrestd/http.c b/src/slurmrestd/http.c
index a3804c7..929db25 100644
--- a/src/slurmrestd/http.c
+++ b/src/slurmrestd/http.c
@@ -95,6 +95,22 @@
} http_version;
} request_t;
+typedef struct http_context_s {
+ int magic; /* MAGIC */
+ /* reference to assigned connection */
+ conmgr_fd_ref_t *ref;
+ /* assigned connection */
+ conmgr_fd_t *con;
+ /* Authentication context (auth_context_type_t) */
+ void *auth;
+ /* callback to call on each HTTP request */
+ on_http_request_t on_http_request;
+ /* http parser plugin state */
+ http_parser_state_t *parser;
+ /* http request_t */
+ void *request;
+} http_context_t;
+
/* default keep_alive value which appears to be implementation specific */
static int DEFAULT_KEEP_ALIVE = 5; //default to 5s to match apache2
diff --git a/src/slurmrestd/http.h b/src/slurmrestd/http.h
index c99da56..bf10c8d 100644
--- a/src/slurmrestd/http.h
+++ b/src/slurmrestd/http.h
@@ -58,21 +58,8 @@
*/
typedef int (*on_http_request_t)(on_http_request_args_t *args);
-typedef struct {
- int magic;
- /* reference to assigned connection */
- conmgr_fd_ref_t *ref;
- /* assigned connection */
- conmgr_fd_t *con;
- /* Authentication context (auth_context_type_t) */
- void *auth;
- /* callback to call on each HTTP request */
- on_http_request_t on_http_request;
- /* http parser plugin state */
- http_parser_state_t *parser;
- /* http request_t */
- void *request;
-} http_context_t;
+/* Opaque connection context */
+typedef struct http_context_s http_context_t;
typedef struct on_http_request_args_s {
const http_request_method_t method; /* HTTP request method */