diff options
author | Sumit Bose <sbose@redhat.com> | 2009-08-18 11:57:50 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-08-18 07:55:51 -0400 |
commit | a2e6b54bb5f50bcc3325851ed977892262896dd9 (patch) | |
tree | 64b708ed89d2bd0fc11440b549d2e9620712218f /server | |
parent | f408a47afc4b5643e224e80a8899ca061446e4e5 (diff) | |
download | sssd-a2e6b54bb5f50bcc3325851ed977892262896dd9.tar.gz sssd-a2e6b54bb5f50bcc3325851ed977892262896dd9.tar.bz2 sssd-a2e6b54bb5f50bcc3325851ed977892262896dd9.zip |
added missing hash_create which was remove by a previous patch
Diffstat (limited to 'server')
-rw-r--r-- | server/responder/common/responder_dp.c | 19 |
1 files 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; |