void srv_fssa_cleanup(void)
{
- struct fss_sc_set *sc_set;
- struct fss_sc_set *sc_set_n;
-
- for (sc_set = fss_global.sc_sets; sc_set; sc_set = sc_set_n) {
- sc_set_n = sc_set->next;
- talloc_free(sc_set);
- }
+ talloc_free(fss_global.mem_ctx);
ZERO_STRUCT(fss_global);
}
-void srv_fssa_start(void)
+NTSTATUS srv_fssa_start(void)
{
+ fss_global.mem_ctx = talloc_named_const(NULL, 0,
+ "parent fss rpc server ctx");
+ if (fss_global.mem_ctx == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
fss_global.min_vers = FSRVP_RPC_VERSION_1;
fss_global.max_vers = FSRVP_RPC_VERSION_1;
/*
* TODO The server MUST populate the GlobalShadowCopySetTable with the
* ShadowCopySet entries read from the configuration store.
*/
+ return NT_STATUS_OK;
}
/*
/* stop msg seq timer */
- sc_set = talloc_zero(NULL, struct fss_sc_set);
+ sc_set = talloc_zero(fss_global.mem_ctx, struct fss_sc_set);
if (sc_set == NULL) {
return E_OUTOFMEMORY;
}
#ifndef _SRV_FSS_AGENT_H_
#define _SRV_FSS_AGENT_H_
-void srv_fssa_start(void);
+NTSTATUS srv_fssa_start(void);
void srv_fssa_cleanup(void);
#endif /*_SRV_FSS_AGENT_H_ */
static bool fss_init_cb(void *ptr)
{
- srv_fssa_start();
- return true;
+ NTSTATUS status;
+ status = srv_fssa_start();
+ return NT_STATUS_IS_OK(status);
}
void start_fssd(struct tevent_context *ev_ctx,