diff options
author | Simo Sorce <idra@samba.org> | 2006-03-03 17:44:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:13 -0500 |
commit | 6ef61825541131e16a03975cdbd344e2bbebf810 (patch) | |
tree | 694f02c64535972619629f610b90d8057f3a0c32 /source4/lib/ldb/ldb_ldap | |
parent | a7d5bc2dd3837ce98710d0475f16ec571202bab5 (diff) | |
download | samba-6ef61825541131e16a03975cdbd344e2bbebf810.tar.gz samba-6ef61825541131e16a03975cdbd344e2bbebf810.tar.bz2 samba-6ef61825541131e16a03975cdbd344e2bbebf810.zip |
r13818: Make ldb_tdb 'fake' async.
Simo.
(This used to be commit 0db616ef59ed51cac7e0bfaea8a799d5aa42ef16)
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 4f840868a1..540dfc690b 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -52,7 +52,7 @@ struct lldb_private { struct lldb_async_context { struct ldb_module *module; int msgid; - uint32_t timeout; + int timeout; void *context; int (*callback)(struct ldb_context *, void *, struct ldb_async_result *); }; @@ -398,7 +398,10 @@ static int lldb_search_bytree(struct ldb_module *module, const struct ldb_dn *ba if (ret != LDB_SUCCESS) return ret; - return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + + talloc_free(handle); + return ret; } /* @@ -469,7 +472,10 @@ static int lldb_add(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + + talloc_free(handle); + return ret; } @@ -541,7 +547,10 @@ static int lldb_modify(struct ldb_module *module, const struct ldb_message *msg) if (ret != LDB_SUCCESS) return ret; - return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + + talloc_free(handle); + return ret; } /* @@ -601,7 +610,10 @@ static int lldb_delete(struct ldb_module *module, const struct ldb_dn *dn) if (ret != LDB_SUCCESS) return ret; - return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + + talloc_free(handle); + return ret; } /* @@ -681,7 +693,10 @@ static int lldb_rename(struct ldb_module *module, const struct ldb_dn *olddn, co if (ret != LDB_SUCCESS) return ret; - return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL); + + talloc_free(handle); + return ret; } static int lldb_parse_result(struct ldb_async_handle *handle, LDAPMessage *result) |