X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=remote%2Fsource%2Fxinemacontrol.cpp;h=f793e3bb0f1a271fcb69e119fc4692d29ae75b1c;hp=db349e73685a7d0472a9a9b7dd9cd0dba860389b;hb=5bb8258cd0c2a5600bc90ac9f7dc06b4746a16f9;hpb=5649d49616296df01f821e03a064c6966561bc99 diff --git a/remote/source/xinemacontrol.cpp b/remote/source/xinemacontrol.cpp index db349e7..f793e3b 100644 --- a/remote/source/xinemacontrol.cpp +++ b/remote/source/xinemacontrol.cpp @@ -64,12 +64,16 @@ void XinemaControl::send_request(const QString &req) void XinemaControl::data_available() { - char rbuf[1024]; - int len = socket.read(rbuf, sizeof(rbuf)); - if(len<0) - return; + while(socket.bytesAvailable()) + { + char rbuf[1024]; + int len = socket.read(rbuf, sizeof(rbuf)); + if(len<0) + break; + + buffer.append(rbuf, len); + } - buffer.append(rbuf, len); unsigned start = 0; while(1) {