client: add accessor function ctdb_header_from_record_handle().
authorMichael Adam <obnox@samba.org>
Tue, 21 Dec 2010 14:29:23 +0000 (15:29 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 9 Mar 2011 23:56:34 +0000 (00:56 +0100)
client/ctdb_client.c
include/ctdb_private.h

index 99ff72d2b1c6d69dfe903d8e679dd696170acab6..a43710f9aa58882107de3e0f4ce5a88e49332191 100644 (file)
@@ -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;
+}
index 6e5911204cbec7b62e4232c7642a513f0e68b6e5..48e9ccaf78448f4d8bc6a68964c58d9b2c00feb4 100644 (file)
@@ -1402,4 +1402,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