diff options
author | Simo Sorce <idra@samba.org> | 2006-03-15 21:23:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:57:27 -0500 |
commit | 753bf8fb995d5cd9abe4c23b5dc79e2392dfa1cb (patch) | |
tree | 21a97e11f71d82d965e2686988e788d789932cfc /source4/nbt_server/wins | |
parent | 8eb83c809f107e422b156774b561e5252fa5f382 (diff) | |
download | samba-753bf8fb995d5cd9abe4c23b5dc79e2392dfa1cb.tar.gz samba-753bf8fb995d5cd9abe4c23b5dc79e2392dfa1cb.tar.bz2 samba-753bf8fb995d5cd9abe4c23b5dc79e2392dfa1cb.zip |
r14459: Make this async compatible
(This used to be commit a71d762acff73a5ba11927a3afbcbf404314aa24)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r-- | source4/nbt_server/wins/wins_ldb.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c index 83b8d3f438..6fcf675702 100644 --- a/source4/nbt_server/wins/wins_ldb.c +++ b/source4/nbt_server/wins/wins_ldb.c @@ -44,6 +44,11 @@ static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req, c struct winsdb_handle); char *error = NULL; + /* do not manipulate our control entries */ + if (ldb_dn_is_special(msg->dn)) { + return ldb_next_request(module, req); + } + if (!h) { error = talloc_strdup(module, "WINS_LDB: INTERNAL ERROR: no winsdb_handle present!"); ldb_debug(module->ldb, LDB_DEBUG_FATAL, "%s", error); @@ -68,28 +73,28 @@ static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req, c static int wins_ldb_request(struct ldb_module *module, struct ldb_request *req) { - const struct ldb_message *msg = req->op.mod.message; + const struct ldb_message *msg; switch (req->operation) { case LDB_REQ_ADD: + case LDB_ASYNC_ADD: + msg = req->op.add.message; break; - + case LDB_REQ_MODIFY: + case LDB_ASYNC_MODIFY: + msg = req->op.mod.message; break; default: - goto call_next; + return ldb_next_request(module, req); } - if (ldb_dn_is_special(msg->dn)) goto call_next; - return wins_ldb_verify(module, req, msg); - -call_next: - return ldb_next_request(module, req); } + static int wins_ldb_init(struct ldb_module *ctx) { |