changeset 300:baea1d43e7eb

Some cleanups/fixes for various TRACE statements
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 Mar 2006 12:57:37 +0000
parents 55a99934db87
children fb3678bdb8c7
files cli-auth.c cli-chansession.c common-channel.c svr-auth.c
diffstat 4 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/cli-auth.c	Thu Mar 09 15:03:22 2006 +0000
+++ b/cli-auth.c	Sat Mar 25 12:57:37 2006 +0000
@@ -236,8 +236,8 @@
 
 void cli_auth_try() {
 
+	int finished = 0;
 	TRACE(("enter cli_auth_try"))
-	int finished = 0;
 
 	CHECKCLEARTOWRITE();
 	
--- a/cli-chansession.c	Thu Mar 09 15:03:22 2006 +0000
+++ b/cli-chansession.c	Sat Mar 25 12:57:37 2006 +0000
@@ -162,14 +162,14 @@
 
 static void put_termcodes() {
 
-	TRACE(("enter put_termcodes"))
-
 	struct termios tio;
 	unsigned int sshcode;
 	const struct TermCode *termcode;
 	unsigned int value;
 	unsigned int mapcode;
 
+	TRACE(("enter put_termcodes"))
+
 	unsigned int bufpos1, bufpos2;
 
 	if (tcgetattr(STDIN_FILENO, &tio) == -1) {
--- a/common-channel.c	Thu Mar 09 15:03:22 2006 +0000
+++ b/common-channel.c	Sat Mar 25 12:57:37 2006 +0000
@@ -236,7 +236,7 @@
 	TRACE(("checkclose: writefd %d, readfd %d, errfd %d, sentclosed %d, recvclosed %d",
 				channel->writefd, channel->readfd,
 				channel->errfd, channel->sentclosed, channel->recvclosed))
-	TRACE(("writebuf %d extrabuf %s extrabuf %d",
+	TRACE(("writebuf size %d extrabuf ptr 0x%x extrabuf size %d",
 				cbuf_getused(channel->writebuf),
 				channel->writebuf,
 				channel->writebuf ? 0 : cbuf_getused(channel->extrabuf)))
--- a/svr-auth.c	Thu Mar 09 15:03:22 2006 +0000
+++ b/svr-auth.c	Sat Mar 25 12:57:37 2006 +0000
@@ -315,14 +315,15 @@
 	buf_setpos(typebuf, 0);
 	buf_putstring(ses.writepayload, buf_getptr(typebuf, typebuf->len),
 			typebuf->len);
+
+	TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
+				buf_getptr(typebuf, typebuf->len)));
+
 	buf_free(typebuf);
 
 	buf_putbyte(ses.writepayload, partial ? 1 : 0);
 	encrypt_packet();
 
-	TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
-				buf_getptr(typebuf, typebuf->len)));
-
 	if (incrfail) {
 		usleep(300000); /* XXX improve this */
 		ses.authstate.failcount++;