From 11c621b5ee1a0cdc27610f8b172017764acc285e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 5 Aug 2009 14:11:12 -0400 Subject: Simplify interfaces initialization Make as much as possible static, and remove use of talloc_reference and allocation/deallocation of memory when not necessary. Fix also responder use of rctx->conn, was mistakenly used for both monitor and dp connections. --- server/responder/common/responder.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'server/responder/common/responder.h') diff --git a/server/responder/common/responder.h b/server/responder/common/responder.h index 5bde42ac..0f090831 100644 --- a/server/responder/common/responder.h +++ b/server/responder/common/responder.h @@ -64,16 +64,14 @@ struct resp_ctx { const char *sock_name; const char *priv_sock_name; - struct sbus_connection *conn; - struct sbus_method_ctx *sm_ctx; + struct sbus_connection *mon_conn; + struct sbus_connection *dp_conn; struct sss_domain_info *domains; - struct sbus_method *sss_sbus_methods; struct sss_cmd_table *sss_cmds; const char *sss_pipe_name; const char *confdb_service_path; - struct sbus_method *dp_methods; struct sss_names_ctx *names; @@ -100,12 +98,12 @@ struct sss_cmd_table { int sss_process_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct confdb_ctx *cdb, - struct sbus_method sss_sbus_methods[], struct sss_cmd_table sss_cmds[], const char *sss_pipe_name, const char *sss_priv_pipe_name, const char *confdb_service_path, - struct sbus_method dp_methods[], + struct sbus_interface *dp_intf, + struct sbus_interface *monitor_intf, struct resp_ctx **responder_ctx); int sss_parse_name(TALLOC_CTX *memctx, @@ -119,7 +117,7 @@ int sss_cmd_get_version(struct cli_ctx *cctx); struct cli_protocol_version *register_cli_protocol_version(void); /* responder_dp.c */ -int sss_dp_init(struct resp_ctx *rctx, struct sbus_method dp_methods[]); +int sss_dp_init(struct resp_ctx *rctx, struct sbus_interface *intf); #define NSS_DP_USER 1 #define NSS_DP_GROUP 2 -- cgit