[PATCH] Print errno information in write_packet

ronny.meeus at gmail.com ronny.meeus at gmail.com
Mon May 19 14:20:27 WST 2014


This patch put the error information into the log output to have a better view
on the reason of a packet write failure.

Signed-off-by: Ronny Meeus <ronny.meeus at gmail.com>

diff --git a/packet.c b/packet.c
--- a/packet.c
+++ b/packet.c
@@ -90,7 +90,7 @@ void write_packet() {
 			TRACE2(("leave write_packet: EINTR"))
 			return;
 		} else {
-			dropbear_exit("Error writing");
+			dropbear_exit("Error writing %s", strerror(errno));
 		}
 	}
 
@@ -131,7 +131,7 @@ void write_packet() {
 			TRACE2(("leave writepacket: EINTR"))
 			return;
 		} else {
-			dropbear_exit("Error writing");
+			dropbear_exit("Error writing %s", strerror(errno));
 		}
 	} 
 	all_ignore = (packet_type == SSH_MSG_IGNORE);


More information about the Dropbear mailing list