[wpdev-commits] wolfpack/network asyncnetio.cpp,1.52,1.53
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-19 15:37:22
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv504/network Modified Files: asyncnetio.cpp Log Message: fixfix Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** asyncnetio.cpp 19 Sep 2004 15:34:29 -0000 1.52 --- asyncnetio.cpp 19 Sep 2004 15:37:13 -0000 1.53 *************** *** 272,275 **** --- 272,281 ---- bool cAsyncNetIOPrivate::consumeWriteBuf( Q_ULONG nbytes ) { + if ( nbytes > wsize ) + { + wsize = 0; + return false; + } + if ( nbytes <= 0 || nbytes > wsize ) return false; *************** *** 686,693 **** d->wba.setAutoDelete(TRUE); - if (d->ewba.count() == 0) { - return; - } - // Before we continue, we should guarantee no one writes packets to the buffer. QMutexLocker lock( &d->wmutex ); --- 692,695 ---- *************** *** 695,698 **** --- 697,705 ---- { QByteArray* a = d->ewba.first(); + + if (!a) { + break; + } + int nwritten; int i = 0; |