Logo Search packages:      
Sourcecode: ldb version File versions  Download package

int ldb_build_rename_req ( struct ldb_request **  ret_req,
struct ldb_context *  ldb,
void *  mem_ctx,
struct ldb_dn *  olddn,
struct ldb_dn *  newdn,
struct ldb_control **  controls,
void *  context,
ldb_request_callback_t  callback 

Helper function to build a rename request

ret_req the request structure is returned here (talloced on mem_ctx)
ldb the context associated with the database (from ldb_init())
mem_ctx a talloc emmory context (used as parent of ret_req)
olddn the old DN
newdn the new DN
controls an array of controls
context the callback function context
the callback function to handle the async replies
result code (LDB_SUCCESS on success, or a failure code)

Definition at line 763 of file ldb.c.


      struct ldb_request *req;

      *ret_req = NULL;

      req = talloc(mem_ctx, struct ldb_request);
      if (req == NULL) {
            ldb_set_errstring(ldb, "Out of Memory");
            return LDB_ERR_OPERATIONS_ERROR;

      req->operation = LDB_RENAME;
      req->op.rename.olddn = olddn;
      req->op.rename.newdn = newdn;
      req->controls = controls;
      req->context = context;
      req->callback = callback;

      *ret_req = req;

      return LDB_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index