]> granicus.if.org Git - strace/commitdiff
fix sockaddr display
authorJohn Hughes <john@Calva.COM>
Tue, 18 Sep 2001 15:56:53 +0000 (15:56 +0000)
committerJohn Hughes <john@Calva.COM>
Tue, 18 Sep 2001 15:56:53 +0000 (15:56 +0000)
ChangeLog
net.c

index 1e924e0e69365b92c0968c08121f995b3c95de1f..f8c9be5902118d09e7efdc3c91e2d062cd65506a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-18   John Hughes <john@Calva.COM>
+
+  * net.c: fix display of sockaddr structures, sometimes too many "}",
+    sometimes too few.  Fix suggested by Richard Kettlewell.
+
 2001-08-19   Wichert Akkerman <wakkerma@debian.org>
 
   * signal.c: do not include asm/sigcontext.h on IA64 since it gets
diff --git a/net.c b/net.c
index 2e312f23a03d7197fb6a3e2a17bf84f5c2e2a991..0cbf48e230fd1de81daa96db7d9871e899f47e68 100644 (file)
--- a/net.c
+++ b/net.c
@@ -613,7 +613,7 @@ int addrlen;
                return;
        }
 
-       tprintf("{sin_family=");
+       tprintf("{sa_family=");
        printxval(addrfams, addrbuf.sa.sa_family, "AF_???");
        tprintf(", ");
 
@@ -628,7 +628,7 @@ int addrlen;
                }
                break;
        case AF_INET:
-               tprintf("sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}",
+               tprintf("sin_port=htons(%u), sin_addr=inet_addr(\"%s\")",
                        ntohs(addrbuf.sin.sin_port), inet_ntoa(addrbuf.sin.sin_addr));
                break;
 #ifdef HAVE_INET_NTOP
@@ -663,7 +663,7 @@ int addrlen;
        case AF_IPX:
                {
                        int i;
-                       tprintf("{sipx_port=htons(%u), ",
+                       tprintf("sipx_port=htons(%u), ",
                                        ntohs(addrbuf.sipx.sipx_port));
                        /* Yes, I know, this does not look too
                         * strace-ish, but otherwise the IPX
@@ -703,7 +703,7 @@ int addrlen;
        AF_X25 AF_ROSE etc. still need to be done */
 
        default:
-               tprintf("{sa_family=%u, sa_data=", addrbuf.sa.sa_family);
+               tprintf("sa_data=");
                printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data,
                        sizeof addrbuf.sa.sa_data);
                break;