]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
the checks for srcnode and destnode from the client are redundant since the daemon...
authorRonnie sahlberg <ronniesahlberg@gmail.com>
Thu, 19 Apr 2007 02:48:19 +0000 (12:48 +1000)
committerRonnie sahlberg <ronniesahlberg@gmail.com>
Thu, 19 Apr 2007 02:48:19 +0000 (12:48 +1000)
(This used to be ctdb commit 9175d49ba1ce2af99907fa227b50d281f85c98ae)

ctdb/common/ctdb_daemon.c
ctdb/direct/ctdbd_test.c

index 531cf448268c1f817b9ab62b24f3ffeef8e248c7..a3ad4448bfc0a03c6c9f7265d8dfebf752dcd7ef 100644 (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",
index bd26376a0dd26bf70f7afa2dc7b68ef7338de24d..00b9f967dfef983783054f6051e0cdd198936ea4 100644 (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");