Thank you for the comment. I fixed the patch(I also fixed PATCH 1/2, please discard the old one) I'll resent them soon.
Thanks (2014/08/06 15:29), FUJITA Tomonori wrote: > On Wed, 6 Aug 2014 15:18:59 +0900 > ISHIDA Wataru <[email protected]> wrote: > >> >> Signed-off-by: ISHIDA Wataru <[email protected]> >> --- >> ryu/app/bmpstation.py | 11 +++++++---- >> 1 file changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/ryu/app/bmpstation.py b/ryu/app/bmpstation.py >> index da94d40..19072b4 100644 >> --- a/ryu/app/bmpstation.py >> +++ b/ryu/app/bmpstation.py >> @@ -53,10 +53,13 @@ class BMPStation(app_manager.RyuApp): >> >> _, len_, _ = BMPMessage.parse_header(buf) >> >> - body = sock.recv(len_ - BMPMessage._HDR_LEN) >> - if len(body) == 0: >> - self.is_active = False >> - break >> + if len_ > BMPMessage._HDR_LEN: >> + body = sock.recv(len_ - BMPMessage._HDR_LEN) > > len(body) could be smaller than len_ - BMPMessage._HDR_LEN if all the > data is not delivered yet? > >> + if len(body) == 0: >> + self.is_active = False >> + break >> + else: >> + body = '' >> >> msg, rest = BMPMessage.parser(buf + body) >> assert len(rest) == 0 >> -- >> 1.7.10.4 >> >> >> ------------------------------------------------------------------------------ >> Infragistics Professional >> Build stunning WinForms apps today! >> Reboot your WinForms applications with our WinForms controls. >> Build a bridge from your legacy apps to the future. >> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk >> _______________________________________________ >> Ryu-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/ryu-devel ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
