* telnetd.c (main): Change variable sin to sin4.
authorEzra Peisach <epeisach@mit.edu>
Fri, 22 Jun 2001 15:42:19 +0000 (15:42 +0000)
committerEzra Peisach <epeisach@mit.edu>
Fri, 22 Jun 2001 15:42:19 +0000 (15:42 +0000)
(encrypt_failure): Change to not shadow global error_message.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13495 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnetd/ChangeLog
src/appl/telnet/telnetd/telnetd.c

index bcc94eff1393f8722e0c3e7b8c64e47a2f2a551f..d14399e0a75ade6df6b65be1769c0e25b7122e70 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-22  Ezra Peisach  <epeisach@mit.edu>
+
+       * telnetd.c (main): Change variable sin to sin4.
+       (encrypt_failure): Change to not shadow global error_message.
+
 2001-06-21  Ezra Peisach  <epeisach@mit.edu>
 
        * telnetd.c: Add prototypes for getent() and tgetent(). 
index bff309d761fee2a0dee75a11ee4dcd4755894e43..29c8f6aaa5c8938fb1f31530db8548b94d2a011a 100644 (file)
@@ -488,22 +488,22 @@ main(argc, argv)
        if (debug) {
            int s, ns, foo;
            struct servent *sp;
-           static struct sockaddr_in sin = { AF_INET };
+           static struct sockaddr_in sin4 = { AF_INET };
 
            if (argc > 1) {
                usage();
                /* NOT REACHED */
            } else if (argc == 1) {
                    if ((sp = getservbyname(*argv, "tcp"))) {
-                       sin.sin_port = sp->s_port;
+                       sin4.sin_port = sp->s_port;
                    } else {
-                       sin.sin_port = atoi(*argv);
-                       if ((int)sin.sin_port <= 0) {
+                       sin4.sin_port = atoi(*argv);
+                       if ((int)sin4.sin_port <= 0) {
                            fprintf(stderr, "telnetd: %s: bad port #\n", *argv);
                            usage();
                            /* NOT REACHED */
                        }
-                       sin.sin_port = htons((u_short)sin.sin_port);
+                       sin4.sin_port = htons((u_short)sin4.sin_port);
                   }
            } else {
                sp = getservbyname("telnet", "tcp");
@@ -511,7 +511,7 @@ main(argc, argv)
                    fprintf(stderr, "telnetd: tcp/telnet: unknown service\n");
                    exit(1);
                }
-               sin.sin_port = sp->s_port;
+               sin4.sin_port = sp->s_port;
            }
 
            s = socket(AF_INET, SOCK_STREAM, 0);
@@ -521,7 +521,7 @@ main(argc, argv)
            }
            (void) setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
                                (char *)&on, sizeof(on));
-           if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+           if (bind(s, (struct sockaddr *)&sin4, sizeof(sin4)) < 0) {
                perror("bind");
                exit(1);
            }
@@ -529,8 +529,8 @@ main(argc, argv)
                perror("listen");
                exit(1);
            }
-           foo = sizeof(sin);
-           ns = accept(s, (struct sockaddr *)&sin, &foo);
+           foo = sizeof(sin4);
+           ns = accept(s, (struct sockaddr *)&sin4, &foo);
            if (ns < 0) {
                perror("accept");
                exit(1);
@@ -689,10 +689,10 @@ usage()
 
 static void encrypt_failure()
 {
-    char *error_message =
+    char *lerror_message =
        "Encryption was not successfully negotiated.  Goodbye.\r\n\r\n";
 
-    writenet(error_message, strlen(error_message));
+    writenet(lerror_message, strlen(lerror_message));
     netflush();
     exit(1);
 }