diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-01-06 09:21:21 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-08 13:02:59 +1100 |
commit | d0bd6e7ea5a6cc760916acd4f549ac7652c46e05 (patch) | |
tree | bc1870f56a76e13757352134bcf3c83a7dfb35c7 | |
parent | e6f14ac2c4f0d1eaae93980b3628250de945e71e (diff) | |
download | samba-d0bd6e7ea5a6cc760916acd4f549ac7652c46e05.tar.gz samba-d0bd6e7ea5a6cc760916acd4f549ac7652c46e05.tar.bz2 samba-d0bd6e7ea5a6cc760916acd4f549ac7652c46e05.zip |
s4-dsdb: added dsdb_next_callback()
This should be used when you create a sub request and just want the
parent requests callback to be called when done.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index f642160397..09b41a254b 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -585,3 +585,15 @@ int dsdb_module_constrainted_update_integer(struct ldb_module *module, struct ld talloc_free(msg); return ret; } + +/* + used to chain to the callers callback + */ +int dsdb_next_callback(struct ldb_request *req, struct ldb_reply *ares) +{ + struct ldb_request *up_req = talloc_get_type(req->context, struct ldb_request); + + talloc_steal(up_req, req); + return up_req->callback(up_req, ares); +} + |