[pve-devel] [PATCH 1/2] qmp_read_available : correctly handle end of response
Alexandre Derumier
aderumier at odiso.com
Fri Jun 29 12:34:55 CEST 2012
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6a8108a..89b8454 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2691,7 +2691,7 @@ my $qmp_read_avail = sub {
my $count;
if ($count = $fh->sysread($buf, 8192)) {
$res .= $buf;
- last;
+ last if $buf =~ (m/}\r\n$/);
} else {
if (!defined($count)) {
die "$!\n";
--
1.7.2.5
More information about the pve-devel
mailing list