[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/phonon-pcmio/platform_kde
From: Matthias Kretz <kretz () kde ! org>
Date: 2008-04-10 19:20:14
Message-ID: 1207855214.015739.25270.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 795562 by mkretz:
fix race condition:
- if a FileJob reached the end
- then the backend requests a seek
- then the result signal is delivered
- the job was cleaned up, but the seek would never finish
M +9 -2 kiomediastream.cpp
--- branches/work/phonon-pcmio/platform_kde/kiomediastream.cpp #795561:795562
@@ -134,11 +134,10 @@
Q_ASSERT(d->kiojob);
kDebug(600) << position << " = " << qulonglong(position);
d->seeking = true;
+ d->seekPosition = position;
if (d->open) {
KIO::FileJob *filejob = qobject_cast<KIO::FileJob *>(d->kiojob);
filejob->seek(position);
- } else {
- d->seekPosition = position;
}
}
@@ -194,7 +193,15 @@
}
// go to ErrorState - NormalError
q->error(NormalError, kioErrorString);
+ } else if (seeking) {
+ open = false;
+ kiojob = 0;
+ endOfDataSent = false;
+ reading = false;
+ q->reset();
+ return;
}
+ open = false;
kiojob = 0;
kDebug(600) << "KIO Job is done (will delete itself) and d->kiojob reset to 0";
endOfDataSent = true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic