[2437] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: telnet/171: "toggle netdata" should display ASCII data

daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Nov 11 11:07:48 1996

Date: Mon, 11 Nov 1996 11:07:27 -0500 (EST)
To: krb5-bugs@MIT.EDU
Cc: krb5-prs@rt-11.mit.edu
From: John Hawkinson <jhawk@bbnplanet.com>


Rapidly this is becoming a misc. telnet nits PR.

"enc status" currently reports nothing if you've never
turned on encryption. This patch fixes it to at least
note cleartext. Also corrects an inconsistancy in the
way statement blocks surround if predicates.

--jhawk

--- libtelnet/encrypt.c	1996/11/11 15:58:02	1.1
+++ encrypt.c		1996/11/11 16:04:48
@@ -402,18 +402,20 @@
 	if (encrypt_output)
 		printf("Currently encrypting output with %s\r\n",
 			ENCTYPE_NAME(encrypt_mode));
-	else if (encrypt_mode) {
-		printf("Currently output is clear text.\r\n");
-		printf("Last encryption mode was %s\r\n",
-			ENCTYPE_NAME(encrypt_mode));
+	else {
+	        printf("Currently output is clear text.\r\n");
+	        if (encrypt_mode)
+		        printf("Last encryption mode was %s\r\n",
+		            ENCTYPE_NAME(encrypt_mode));
 	}
-	if (decrypt_input) {
+	if (decrypt_input)
 		printf("Currently decrypting input with %s\r\n",
 			ENCTYPE_NAME(decrypt_mode));
-	} else if (decrypt_mode) {
-		printf("Currently input is clear text.\r\n");
-		printf("Last decryption mode was %s\r\n",
-			ENCTYPE_NAME(decrypt_mode));
+	else {
+	        printf("Currently input is clear text.\r\n");
+	        if (decrypt_mode)
+		        printf("Last decryption mode was %s\r\n",
+			       ENCTYPE_NAME(decrypt_mode));
 	}
 	return 1;
 }

home help back first fref pref prev next nref lref last post