From a2e6b54bb5f50bcc3325851ed977892262896dd9 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 18 Aug 2009 11:57:50 +0200 Subject: added missing hash_create which was remove by a previous patch --- server/responder/common/responder_dp.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/server/responder/common/responder_dp.c b/server/responder/common/responder_dp.c index 076b1543..604c4194 100644 --- a/server/responder/common/responder_dp.c +++ b/server/responder/common/responder_dp.c @@ -190,11 +190,6 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx, return EINVAL; } - tmp_ctx = talloc_new(NULL); - if (!tmp_ctx) { - return ENOMEM; - } - switch (type) { case SSS_DP_USER: be_type = BE_REQ_USER; @@ -209,6 +204,20 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx, return EINVAL; } + if (dp_requests == NULL) { + /* Create a hash table to handle queued update requests */ + ret = hash_create(10, &dp_requests, NULL); + if (ret != HASH_SUCCESS) { + fprintf(stderr, "cannot create hash table (%s)\n", hash_error_string(ret)); + return EIO; + } + } + + tmp_ctx = talloc_new(NULL); + if (!tmp_ctx) { + return ENOMEM; + } + key.type = HASH_KEY_STRING; key.str = NULL; -- cgit