summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-06-04 05:28:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:52 -0500
commitca5accf224dc3ef998235603797b519866b57b1c (patch)
tree3d2790afbc47076c2b12611d5c1e5b20683b36c5 /source4/lib/ldb/include
parentb31c685ec293ef65bc33a474fc5a1d83545d4749 (diff)
downloadsamba-ca5accf224dc3ef998235603797b519866b57b1c.tar.gz
samba-ca5accf224dc3ef998235603797b519866b57b1c.tar.bz2
samba-ca5accf224dc3ef998235603797b519866b57b1c.zip
r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified. Some minor fixed and removal of unused code. (This used to be commit b52e5d6a0cb1a32e62759eaa49ce3e4cc804cc92)
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h4
-rw-r--r--source4/lib/ldb/include/ldb_private.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 56eed3ab24..644f74385f 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -658,6 +658,7 @@ struct ldb_request {
int (*callback)(struct ldb_context *, void *, struct ldb_async_result *);
int timeout;
+ time_t starttime;
struct ldb_async_handle *handle;
} async;
};
@@ -666,6 +667,9 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *request);
int ldb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type);
+int ldb_set_timeout(struct ldb_context *ldb, struct ldb_request *req, int timeout);
+int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *oldreq, struct ldb_request *newreq);
+
/**
Initialise ldbs' global information
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index d8f9aa417d..14f0403697 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -113,6 +113,8 @@ struct ldb_context {
int transaction_active;
+ int default_timeout;
+
/* a backend supplied highestCommittedUSN function */
uint64_t (*sequence_number)(struct ldb_context *);
};