summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-drc.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src/rpc-drc.c')
-rw-r--r--rpc/rpc-lib/src/rpc-drc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c
index 7e77e03..bc37324 100644
--- a/rpc/rpc-lib/src/rpc-drc.c
+++ b/rpc/rpc-lib/src/rpc-drc.c
@@ -127,14 +127,14 @@ int
drc_compare_reqs (const void *item, const void *rb_node_data, void *param)
{
int ret = -1;
- rpcsvc_request_t *req = NULL;
+ drc_cached_op_t *req = NULL;
drc_cached_op_t *reply = NULL;
GF_ASSERT (item);
GF_ASSERT (rb_node_data);
GF_ASSERT (param);
- req = (rpcsvc_request_t *)item;
+ req = (drc_cached_op_t *)item;
reply = (drc_cached_op_t *)rb_node_data;
ret = req->xid - reply->xid;
@@ -143,7 +143,7 @@ drc_compare_reqs (const void *item, const void *rb_node_data, void *param)
if (req->prognum == reply->prognum &&
req->procnum == reply->procnum &&
- req->progver == reply->progversion)
+ req->progversion == reply->progversion)
return 0;
return 1;
@@ -331,6 +331,12 @@ rpcsvc_drc_lookup (rpcsvc_request_t *req)
{
drc_client_t *client = NULL;
drc_cached_op_t *reply = NULL;
+ drc_cached_op_t new = {
+ .xid = req->xid,
+ .prognum = req->prognum,
+ .progversion = req->progver,
+ .procnum = req->procnum,
+ };
GF_ASSERT (req);
@@ -347,7 +353,7 @@ rpcsvc_drc_lookup (rpcsvc_request_t *req)
if (client->op_count == 0)
goto out;
- reply = rb_find (client->rbtree, req);
+ reply = rb_find (client->rbtree, &new);
out:
if (client)
@@ -460,7 +466,7 @@ rpcsvc_vacate_drc_entries (rpcsvc_drc_globals_t *drc)
client = reply->client;
- (void *)rb_delete (client->rbtree, reply);
+ rb_delete (client->rbtree, reply);
rpcsvc_drc_op_destroy (drc, reply);
rpcsvc_drc_client_unref (drc, client);