diff options
author | Martin Schwenke <martin@meltin.net> | 2014-08-15 16:12:43 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-09-10 01:36:15 +0200 |
commit | b831829cedefd7fb614b8631cc25339a00192ec1 (patch) | |
tree | 2b3ea62ce827e405a5c96bce66883f8e4c5eaef5 | |
parent | cd2b1662a65627ec90f71f0f6f708fe88bb7cf58 (diff) | |
download | samba-b831829cedefd7fb614b8631cc25339a00192ec1.tar.gz samba-b831829cedefd7fb614b8631cc25339a00192ec1.tar.xz samba-b831829cedefd7fb614b8631cc25339a00192ec1.zip |
ctdb-client: Rename static function server_id_equal()
Otherwise it conflicts with the same function provided by Samba's
lib/util. Using the Samba one drags in too many dependencies, so
rename the CTDB version to avoid a declaration clash when CTDB starts
including samba_util.h.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r-- | ctdb/client/ctdb_client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index df57302de0..3e19d10b95 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -3798,7 +3798,10 @@ static struct server_id server_id_get(struct ctdb_context *ctdb, uint32_t reqid) return id; } -static bool server_id_equal(struct server_id *id1, struct server_id *id2) +/* This is basically a copy from Samba's server_id.*. However, a + * dependency chain stops us from using Samba's version, so use a + * renamed copy until a better solution is found. */ +static bool ctdb_server_id_equal(struct server_id *id1, struct server_id *id2) { if (id1->pid != id2->pid) { return false; @@ -3936,7 +3939,7 @@ again: i = 0; while (i < locks->num) { - if (server_id_equal(&locks->lock[i].id, &id)) { + if (ctdb_server_id_equal(&locks->lock[i].id, &id)) { /* Internal error */ talloc_free(h); return false; @@ -4024,7 +4027,7 @@ static bool g_lock_unlock(TALLOC_CTX *mem_ctx, id = server_id_get(ctdb_db->ctdb, reqid); for (i=0; i<locks->num; i++) { - if (server_id_equal(&locks->lock[i].id, &id)) { + if (ctdb_server_id_equal(&locks->lock[i].id, &id)) { if (i < locks->num-1) { locks->lock[i] = locks->lock[locks->num-1]; } |