[OpenAFS-devel] make a couple diagnostic messages more user friendly (ip instead of hex)

nneul@umr.edu nneul@umr.edu
Thu, 31 May 2001 12:56:34 -0500


Index: viced/host.c
===================================================================
RCS file: /cvs/openafs/src/viced/host.c,v
retrieving revision 1.2
diff -u -r1.2 host.c
--- viced/host.c	2000/11/04 10:06:16	1.2
+++ viced/host.c	2001/05/31 17:56:33
@@ -986,8 +986,8 @@
 		    goto retry;
 		}
 	} else {
-	   	ViceLog(0,("CB: WhoAreYou failed for %x.%d, error %d\n", 
-			host->host, host->port, code));
+	   	ViceLog(0,("CB: WhoAreYou failed for %s:%d, error %d\n", 
+			afs_inet_ntoa(host->host), ntohs(host->port), code));
 	        host->hostFlags |= VENUSDOWN;
 	}
 	host->hostFlags |= ALTADDR;
@@ -1085,8 +1085,8 @@
 		}
 	   }
 	   if (code) {
-	   	ViceLog(0,("CB: RCallBackConnectBack failed for %x.%d\n", 
-			host->host, host->port));
+	   	ViceLog(0,("CB: RCallBackConnectBack failed for %s:%d\n", 
+			afs_inet_ntoa(host->host), ntohs(host->port)));
 	        host->hostFlags |= VENUSDOWN;
 	    }
 	    else
@@ -1906,8 +1906,8 @@
 		    if ( code )
 		    {
 		    	ViceLog(0,
-			    ("CB: RCallBackConnectBack (host.c) failed for host %x.%d\n",
-			    host->host, host->port));
+			    ("CB: RCallBackConnectBack (host.c) failed for host %s:%d\n",
+			    afs_inet_ntoa(host->host), ntohs(host->port)));
 		    	host->hostFlags |= VENUSDOWN;
 		     }
 		    /* Note:  it's safe to delete hosts even if they have call
@@ -1928,8 +1928,8 @@
 			if(code) {
 			    if ( MultiProbeAlternateAddress_r(host) ) {
 		    		ViceLog(0,
-					("ProbeUuid failed for host %x.%d\n",
-					 host->host, host->port));
+					("ProbeUuid failed for host %s:%d\n",
+					 afs_inet_ntoa(host->host), ntohs(host->port)));
 		        	host->hostFlags |= VENUSDOWN;
 			    }
 			}
@@ -1938,8 +1938,8 @@
 			code = RXAFSCB_Probe(host->callback_rxcon);
 			H_LOCK
 			if (code) {
-		    	    ViceLog(0, ("ProbeUuid failed for host %x.%d\n",
-				    host->host, host->port));
+		    	    ViceLog(0, ("ProbeUuid failed for host %s:%d\n",
+				    afs_inet_ntoa(host->host), ntohs(host->port)));
 		            host->hostFlags |= VENUSDOWN;
 			}
 		    }
Index: viced/viced.c
===================================================================
RCS file: /cvs/openafs/src/viced/viced.c,v
retrieving revision 1.5
diff -u -r1.5 viced.c
--- viced/viced.c	2001/05/14 21:41:12	1.5
+++ viced/viced.c	2001/05/31 17:56:33
@@ -601,8 +601,8 @@
     else {
       bcopy(he->h_addr, &FS_HostAddr_NBO, 4);
       FS_HostAddr_HBO = ntohl(FS_HostAddr_NBO);
-      ViceLog(0,("FileServer %s has address 0x%x (0x%x in host byte order)\n",
-		 FS_HostName, FS_HostAddr_NBO, FS_HostAddr_HBO));
+      ViceLog(0,("FileServer %s has address %s (0x%x or 0x%x in host byte order)\n",
+		 FS_HostName, afs_inet_ntoa(FS_HostAddr_NBO), FS_HostAddr_NBO, FS_HostAddr_HBO));
     }
 
     /* Install handler to catch the shutdown signal */
Index: tviced/Makefile
===================================================================
RCS file: /cvs/openafs/src/tviced/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- tviced/Makefile	2001/05/18 01:22:16	1.7
+++ tviced/Makefile	2001/05/31 17:56:33
@@ -45,7 +45,8 @@
 	 ${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS}
 
 LIBS=	${SRCDIR}lib/libafsauthent.a	\
-	${SRCDIR}lib/libafsrpc.a
+	${SRCDIR}lib/libafsrpc.a \
+	${SRCDIR}lib/afs/util.a
 
 include ../config/Makefile.version