diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-02-21 17:30:53 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2012-03-05 02:47:36 +0100 |
commit | 5c5111ca0319ad3fdd2c27a0bd3c06b576921d08 (patch) | |
tree | a525ea8eac2f854fe41a1dfbe0b69e63753a40bb /source3/lib/ctdbd_conn.c | |
parent | 5bda06877303b4ac01081b12f889db1409c0a6f6 (diff) | |
download | samba-5c5111ca0319ad3fdd2c27a0bd3c06b576921d08.tar.gz samba-5c5111ca0319ad3fdd2c27a0bd3c06b576921d08.tar.bz2 samba-5c5111ca0319ad3fdd2c27a0bd3c06b576921d08.zip |
s3-ctdb: Enable CTDB readonly support only if CTDB supports it
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar 5 02:47:36 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/lib/ctdbd_conn.c')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 47090a5412..b5c8280c4d 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1400,6 +1400,13 @@ NTSTATUS ctdbd_fetch(struct ctdbd_connection *conn, uint32 db_id, struct ctdb_req_call req; struct ctdb_reply_call *reply; NTSTATUS status; + uint32_t flags; + +#ifdef HAVE_CTDB_WANT_READONLY_DECL + flags = local_copy ? CTDB_WANT_READONLY : 0; +#else + flags = 0; +#endif ZERO_STRUCT(req); @@ -1408,7 +1415,7 @@ NTSTATUS ctdbd_fetch(struct ctdbd_connection *conn, uint32 db_id, req.hdr.ctdb_version = CTDB_VERSION; req.hdr.operation = CTDB_REQ_CALL; req.hdr.reqid = ctdbd_next_reqid(conn); - req.flags = local_copy ? CTDB_WANT_READONLY : 0; + req.flags = flags; req.callid = CTDB_FETCH_FUNC; req.db_id = db_id; req.keylen = key.dsize; |