Fixed buffer incorrectly nulling indexes for live streams.

This commit is contained in:
Thulinma 2015-11-16 16:15:52 +01:00
parent c194396215
commit f268988354
2 changed files with 2 additions and 2 deletions

View file

@ -111,7 +111,7 @@ namespace Mist {
//Find page in indexpage and null it
for (int i = 0; i < 8192; i += 8) {
unsigned int thisKeyNum = ((((long long int *)(metaPages[tid].mapped + i))[0]) >> 32) & 0xFFFFFFFF;
if (thisKeyNum == htonl(pagesByTrack[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)) {
if (thisKeyNum == htonl(bufferLocations[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)){
(((long long int *)(metaPages[tid].mapped + i))[0]) = 0;
}
}