]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-viced-host-logging-20060505
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 1 Jun 2006 16:35:40 +0000 (16:35 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 1 Jun 2006 16:35:40 +0000 (16:35 +0000)
another place where dotted notation and port numbers were not being used
in log output.

(cherry picked from commit ada9819fd630f6cbe6fb8d442e79326df1fcdcad)

src/viced/host.c

index 23f1eedb2fb2ef3597e74f565da57afc539f6f10..9014e94264debdb374b997d1ad9a65d6814a4cb2 100644 (file)
@@ -3065,22 +3065,23 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
     afs_uint16 myPort;
     int found;
     struct Interface *interface;
+    char hoststr[16];
 
     assert(host);
     assert(interf);
 
-    ViceLog(125,
-           ("initInterfaceAddr : host %x numAddr %d\n", host->host,
-            interf->numberOfInterfaces));
-
     number = interf->numberOfInterfaces;
     myAddr = host->host;       /* current interface address */
     myPort = host->port;       /* current port */
 
+    ViceLog(125,
+           ("initInterfaceAddr : host %s:%d numAddr %d\n", 
+             afs_inet_ntoa_r(myAddr, hoststr), ntohs(myPort), number));
+
     /* validation checks */
     if (number < 0 || number > AFS_MAX_INTERFACE_ADDR) {
        ViceLog(0,
-               ("Number of alternate addresses returned is %d\n", number));
+               ("Invalid number of alternate addresses is %d\n", number));
        return -1;
     }
 
@@ -3136,7 +3137,6 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
     host->interface = interface;
 
     for (i = 0; i < host->interface->numberOfInterfaces; i++) {
-       char hoststr[16];
        ViceLog(125, ("--- alt address %s:%d\n", 
                       afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
                       ntohs(host->interface->interface[i].port)));