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 <[email protected]>

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);

Reply via email to