libafscp fixes
authorDerrick Brashear <shadow@dementia.org>
Fri, 15 Apr 2011 17:34:14 +0000 (13:34 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sat, 16 Apr 2011 20:27:42 +0000 (13:27 -0700)
fix callback package in libafscp to track addresses correctly (use
correct byte order)

Change-Id: I58207492389869591e38e582f332c910cd53f169
Reviewed-on: http://gerrit.openafs.org/4474
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/libafscp/afscp_callback.c
src/libafscp/afscp_server.c

index 0bd158b..b01c522 100644 (file)
@@ -307,7 +307,7 @@ SRXAFSCB_CallBack(struct rx_call * rxcall, AFSCBFids * Fids_Array,
 {
     struct rx_connection *rxconn = rx_ConnectionOf(rxcall);
     struct rx_peer *rxpeer = rx_PeerOf(rxconn);
-    struct afscp_server *server = afscp_AnyServerByAddr(rxpeer->host);
+    struct afscp_server *server = afscp_AnyServerByAddr(rx_HostOf(rxpeer));
     struct afscp_callback *cb;
     struct afscp_venusfid f;
     struct AFSFid *fid;
@@ -351,7 +351,7 @@ SRXAFSCB_InitCallBackState(struct rx_call * rxcall)
 {
     struct rx_connection *rxconn = rx_ConnectionOf(rxcall);
     struct rx_peer *rxpeer = rx_PeerOf(rxconn);
-    struct afscp_server *server = afscp_AnyServerByAddr(rxpeer->host);
+    struct afscp_server *server = afscp_AnyServerByAddr(rx_HostOf(rxpeer));
     struct afscp_callback *cb;
     struct afscp_venusfid f;
     int i;
@@ -594,7 +594,7 @@ SRXAFSCB_InitCallBackState3(struct rx_call * rxcall, afsUUID * serverUuid)
 {
     struct rx_connection *rxconn = rx_ConnectionOf(rxcall);
     struct rx_peer *rxpeer = rx_PeerOf(rxconn);
-    struct afscp_server *server = afscp_AnyServerByAddr(rxpeer->host);
+    struct afscp_server *server = afscp_AnyServerByAddr(rx_HostOf(rxpeer));
     struct afscp_callback *cb;
     struct afscp_venusfid f;
     int i;
index 89ac813..2223d7b 100644 (file)
@@ -334,6 +334,7 @@ afscp_ServerById(struct afscp_cell *thecell, afsUUID * u)
     return ret;
 }
 
+/* takes server in host byte order */
 struct afscp_server *
 afscp_ServerByAddr(struct afscp_cell *thecell, afs_uint32 addr)
 {
@@ -435,6 +436,7 @@ afscp_ServerByAddr(struct afscp_cell *thecell, afs_uint32 addr)
     return ret;
 }
 
+/* takes server in host byte order */
 struct afscp_server *
 afscp_AnyServerByAddr(afs_uint32 addr)
 {