mirror of
https://opendev.org/x/pyghmi
synced 2025-01-16 04:38:19 +00:00
Fix large paste to SOL session
While pyghmi was recording the maximum size the BMC advertised as accepting, it was not honoring it. Correct this by having the sendpendingpayload function only send the first 'self.maxoutcount' bytes. This actually turns into a loop because the ACK coming back for the chunk of data triggers a send of pending data, which includes the leftovers of the last attempt. Change-Id: I8e443e08a6eb4ed89eb74412cca92e2138cf9d00
This commit is contained in:
parent
6e58eae301
commit
9eb13b9f8c
@ -154,8 +154,13 @@ class Console(object):
|
||||
return session.Session.wait_for_rsp(timeout=timeout)
|
||||
|
||||
def _sendpendingoutput(self):
|
||||
self._sendoutput(self.pendingoutput)
|
||||
self.pendingoutput = ""
|
||||
if len(self.pendingoutput) > self.maxoutcount:
|
||||
chunk = self.pendingoutput[:self.maxoutcount]
|
||||
self.pendingoutput = self.pendingoutput[self.maxoutcount:]
|
||||
else:
|
||||
chunk = self.pendingoutput
|
||||
self.pendingoutput = ""
|
||||
self._sendoutput(chunk)
|
||||
|
||||
def _sendoutput(self, output):
|
||||
self.myseq += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user