From b86e197210ac37dd61a96fe15985f6ae31b6c107 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 10 Oct 2013 19:26:38 -0400 Subject: [PATCH] Change SOL code to not send empty data to caller If a SOL target sends a packet with no new data (e.g. spurious retry), do not bother the caller with such empty data. It's a waste of their attention at best and if the caller is doing something like trying to write the data straight to a TLS socket, it will trigger EOF exception. Change-Id: I1d751331bc0fa0087bf671de12507b7fe011f5fa --- pyghmi/ipmi/console.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index 012e74b8..c8e12523 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -226,7 +226,8 @@ class Console(object): else: # TODO(jbjohnso) what if remote sequence number is wrong?? self.remseq = newseq self.lastsize = remdatalen - self._print_data(remdata) + if remdata: # Do not subject callers to empty data + self._print_data(remdata) ackpayload = (0, self.remseq, remdatalen, 0) #Why not put pending data into the ack? because it's rare #and might be hard to decide what to do in the context of