From: Derrick Brashear Date: Fri, 10 Feb 2006 16:50:39 +0000 (+0000) Subject: STABLE14-viced-debug-port-numbers-20060210 X-Git-Tag: openafs-stable-1_4_1-rc7~18 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4b44b8d75468bb8c784ce5d73f40e4dc51bff047;p=packages%2Fo%2Fopenafs.git STABLE14-viced-debug-port-numbers-20060210 fix port number printing to not print byteswapped port numbers (cherry picked from commit 3416916228624b6b446b5106f40c4d7e5fbd8cb0) --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index ffc75c417..bd73fe7d3 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -2123,7 +2123,7 @@ common_FetchData64(struct rx_call *acall, struct AFSFid *Fid, ViceLog(5, ("SRXAFS_FetchData, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); /* * Get volume/vnode for the fetched file; caller's access rights to * it are also returned @@ -2379,7 +2379,7 @@ SRXAFS_FetchACL(struct rx_call * acall, struct AFSFid * Fid, ViceLog(5, ("SAFS_FetchACL, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); AccessList->AFSOpaque_len = 0; AccessList->AFSOpaque_val = malloc(AFSOPAQUEMAX); @@ -2475,7 +2475,7 @@ SAFSS_FetchStatus(struct rx_call *acall, struct AFSFid *Fid, ViceLog(1, ("SAFS_FetchStatus, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.FetchStatus++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -2951,7 +2951,7 @@ common_StoreData64(struct rx_call *acall, struct AFSFid *Fid, ViceLog(5, ("StoreData: Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); /* * Get associated volume/vnode for the stored file; caller's rights @@ -3199,7 +3199,7 @@ SRXAFS_StoreACL(struct rx_call * acall, struct AFSFid * Fid, ViceLog(1, ("SAFS_StoreACL, Fid = %u.%u.%u, ACL=%s, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, AccessList->AFSOpaque_val, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.StoreACL++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -3300,7 +3300,7 @@ SAFSS_StoreStatus(struct rx_call *acall, struct AFSFid *Fid, ViceLog(1, ("SAFS_StoreStatus, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.StoreStatus++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -3447,7 +3447,7 @@ SAFSS_RemoveFile(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ViceLog(1, ("SAFS_RemoveFile %s, Did = %u.%u.%u, Host %s:%d, Id %d\n", Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.RemoveFile++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -3611,7 +3611,7 @@ SAFSS_CreateFile(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ViceLog(1, ("SAFS_CreateFile %s, Did = %u.%u.%u, Host %s:%d, Id %d\n", Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.CreateFile++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -3798,7 +3798,7 @@ SAFSS_Rename(struct rx_call *acall, struct AFSFid *OldDirFid, char *OldName, ("SAFS_Rename %s to %s, Fid = %u.%u.%u to %u.%u.%u, Host %s:%d, Id %d\n", OldName, NewName, OldDirFid->Volume, OldDirFid->Vnode, OldDirFid->Unique, NewDirFid->Volume, NewDirFid->Vnode, - NewDirFid->Unique, inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + NewDirFid->Unique, inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.Rename++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -4272,7 +4272,7 @@ SAFSS_Symlink(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ViceLog(1, ("SAFS_Symlink %s to %s, Did = %u.%u.%u, Host %s:%d, Id %d\n", Name, LinkContents, DirFid->Volume, DirFid->Vnode, DirFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.Symlink++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -4476,7 +4476,7 @@ SAFSS_Link(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ("SAFS_Link %s, Did = %u.%u.%u, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique, ExistingFid->Volume, ExistingFid->Vnode, ExistingFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.Link++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -4681,7 +4681,7 @@ SAFSS_MakeDir(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ViceLog(1, ("SAFS_MakeDir %s, Did = %u.%u.%u, Host %s:%d, Id %d\n", Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.MakeDir++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -4875,7 +4875,7 @@ SAFSS_RemoveDir(struct rx_call *acall, struct AFSFid *DirFid, char *Name, ViceLog(1, ("SAFS_RemoveDir %s, Did = %u.%u.%u, Host %s:%d, Id %d\n", Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.RemoveDir++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -5034,7 +5034,7 @@ SAFSS_SetLock(struct rx_call *acall, struct AFSFid *Fid, ViceLockType type, ViceLog(1, ("SAFS_SetLock type = %s Fid = %u.%u.%u, Host %s:%d, Id %d\n", locktype[(int)type], Fid->Volume, Fid->Vnode, Fid->Unique, - inet_ntoa(logHostAddr), rxr_PortOf(tcon), t_client->ViceId)); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.SetLock++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -5159,7 +5159,7 @@ SAFSS_ExtendLock(struct rx_call *acall, struct AFSFid *Fid, ViceLog(1, ("SAFS_ExtendLock Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.ExtendLock++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -5285,7 +5285,7 @@ SAFSS_ReleaseLock(struct rx_call *acall, struct AFSFid *Fid, ViceLog(1, ("SAFS_ReleaseLock Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr), - rxr_PortOf(tcon), t_client->ViceId)); + ntohs(rxr_PortOf(tcon)), t_client->ViceId)); FS_LOCK; AFSCallStats.ReleaseLock++, AFSCallStats.TotalCalls++; FS_UNLOCK; @@ -7027,7 +7027,7 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid, ("StoreData_RXStyle : Inode non-existent Fid = %u.%u.%u, inode = %llu, Pos %llu Host %s:%d\n", Fid->Volume, Fid->Vnode, Fid->Unique, (afs_uintmax_t) VN_GET_INO(targetptr), (afs_uintmax_t) Pos, - inet_ntoa(logHostAddr), rxr_PortOf(rx_ConnectionOf(Call)))); + inet_ntoa(logHostAddr), ntohs(rxr_PortOf(rx_ConnectionOf(Call))))); return ENOENT; /* is this proper error code? */ } else { /* diff --git a/src/viced/host.c b/src/viced/host.c index 7347f179c..d85651564 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1812,7 +1812,7 @@ GetClient(struct rx_connection *tcon, struct client **cp) if (client == NULL || client->tcon == NULL) { ViceLog(0, ("GetClient: no client in conn %x (host %x:%d), VBUSYING\n", - tcon, rxr_HostOf(tcon),rxr_PortOf(tcon))); + tcon, rxr_HostOf(tcon),ntohs(rxr_PortOf(tcon)))); H_UNLOCK; return VBUSY; }