[Ocfs2-commits] zab commits r2288 - trunk/fs/ocfs2/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 19 15:36:31 CDT 2005
Author: zab
Signed-off-by: mfasheh
Date: 2005-05-19 15:36:29 -0500 (Thu, 19 May 2005)
New Revision: 2288
Modified:
trunk/fs/ocfs2/cluster/tcp.c
Log:
o don't get tied up in u32/int cast confusion when comparing net handlers..
this cures a lot of -92 errors we were getting when hosts couldn't find their
handlers.
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/cluster/tcp.c
===================================================================
--- trunk/fs/ocfs2/cluster/tcp.c 2005-05-19 20:31:15 UTC (rev 2287)
+++ trunk/fs/ocfs2/cluster/tcp.c 2005-05-19 20:36:29 UTC (rev 2288)
@@ -472,13 +472,14 @@
return 0;
}
-static int net_handler_cmp(struct net_msg_handler *nmh,
- u32 msg_type, u32 key)
+static int net_handler_cmp(struct net_msg_handler *nmh, u32 msg_type, u32 key)
{
- if (nmh->nh_msg_type != msg_type)
- return nmh->nh_msg_type - msg_type;
+ int ret = memcmp(&nmh->nh_key, &key, sizeof(key));
- return nmh->nh_key - key;
+ if (ret == 0)
+ ret = memcmp(&nmh->nh_msg_type, &msg_type, sizeof(msg_type));
+
+ return ret;
}
static struct net_msg_handler *
More information about the Ocfs2-commits
mailing list