1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

merge from ronnie

(This used to be ctdb commit 257af5c31a311217315e07d6a194c3f96c8dfa80)
This commit is contained in:
Andrew Tridgell 2007-04-19 12:54:51 +10:00
commit 49458c5946
2 changed files with 2 additions and 16 deletions

View File

@ -306,18 +306,6 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
struct daemon_call_state *dstate;
struct ctdb_call *call;
/* check that the client filled in the correct vnn for the local node */
if (ctdb_get_vnn(client->ctdb) != c->hdr.srcnode) {
DEBUG(0, (__location__ "Wrong srcnode in CTDB_REQ_CALL from client was:%d should be :%d\n", c->hdr.srcnode, ctdb_get_vnn(client->ctdb)));
return;
}
/* verify that the destnode makes sense */
if (c->hdr.destnode >= client->ctdb->num_nodes) {
DEBUG(0, (__location__ "Wrong dstnode in CTDB_REQ_CALL from client was:%d but there are only %d nodes in the cluster\n", c->hdr.destnode, client->ctdb->num_nodes));
return;
}
ctdb_db = find_ctdb_db(client->ctdb, c->db_id);
if (!ctdb_db) {
DEBUG(0, (__location__ " Unknown database in request. db_id==0x%08x",

View File

@ -188,7 +188,7 @@ uint32_t ctdb_hash(const TDB_DATA *key)
when the daemon has responded this node should be the dmaster (unless it has migrated off again)
*/
void fetch_record(int fd, uint32_t db_id, TDB_DATA key, int thisnode, int destnode)
void fetch_record(int fd, uint32_t db_id, TDB_DATA key)
{
struct ctdb_req_call *req;
struct ctdb_reply_call *rep;
@ -202,8 +202,6 @@ void fetch_record(int fd, uint32_t db_id, TDB_DATA key, int thisnode, int destno
req->hdr.ctdb_magic = CTDB_MAGIC;
req->hdr.ctdb_version = CTDB_VERSION;
req->hdr.operation = CTDB_REQ_CALL;
req->hdr.destnode = destnode;
req->hdr.srcnode = thisnode;
req->hdr.reqid = 1;
req->flags = CTDB_IMMEDIATE_MIGRATION;
@ -298,7 +296,7 @@ int main(int argc, const char *argv[])
key.dsize=strlen((const char *)(key.dptr));
printf("fetch the test key:[%s]\n",key.dptr);
fetch_record(fd, db_id, key, 0, 1);
fetch_record(fd, db_id, key);
printf("\n");