diff options
author | Michael Adam <obnox@samba.org> | 2010-12-21 15:29:23 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-03-14 13:35:50 +0100 |
commit | a6b13b21c1e52ad49b2629d2610bef59858b9fd9 (patch) | |
tree | 2c3c2be5b6e767295e197a80e888b379ef7dc726 | |
parent | 50bd2499903615a31166d55551d110f07f682351 (diff) | |
download | samba-a6b13b21c1e52ad49b2629d2610bef59858b9fd9.tar.gz samba-a6b13b21c1e52ad49b2629d2610bef59858b9fd9.tar.xz samba-a6b13b21c1e52ad49b2629d2610bef59858b9fd9.zip |
client: add accessor function ctdb_header_from_record_handle().
(This used to be ctdb commit cf57efd440ccc3db381386f4749bfcbf8ac5ecae)
-rw-r--r-- | ctdb/client/ctdb_client.c | 9 | ||||
-rw-r--r-- | ctdb/include/ctdb_private.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 99ff72d2b1..a43710f9aa 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -4234,3 +4234,12 @@ int ctdb_ctrl_getstathistory(struct ctdb_context *ctdb, struct timeval timeout, return 0; } + +struct ctdb_ltdb_header *ctdb_header_from_record_handle(struct ctdb_record_handle *h) +{ + if (h == NULL) { + return NULL; + } + + return &h->header; +} diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 6ba0c18080..e3f77e905e 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -1403,4 +1403,6 @@ int32_t ctdb_local_schedule_for_deletion(struct ctdb_db_context *ctdb_db, const struct ctdb_ltdb_header *hdr, TDB_DATA key); +struct ctdb_ltdb_header *ctdb_header_from_record_handle(struct ctdb_record_handle *h); + #endif |