Edits to accomodate with abstracted semaphore class

This commit is contained in:
Erik Zandvliet 2014-04-23 13:07:01 +02:00 committed by Thulinma
parent ee93e80b8d
commit 10ce807f6f
5 changed files with 80 additions and 54 deletions

View file

@ -82,7 +82,7 @@ namespace Mist {
return;
}
isInitialized = true;
streamIndex.init(streamName,0);
streamIndex.init(streamName,8 * 1024 * 1024);
if (!streamIndex.mapped){
DEBUG_MSG(DLVL_FAIL, "Could not connect to server for %s\n", streamName.c_str());
onFail();
@ -239,7 +239,7 @@ namespace Mist {
if (!indexPages.count(trackId)){
char id[100];
sprintf(id, "%s%lu", streamName.c_str(), trackId);
indexPages[trackId].init(id, 8192);
indexPages[trackId].init(id, 8 * 1024);
}
while (pageNum == -1 || keyAmount == -1){
for (int i = 0; i < indexPages[trackId].len / 8; i++){
@ -285,7 +285,7 @@ namespace Mist {
}
char id[100];
sprintf(id, "%s%lu_%d", streamName.c_str(), trackId, pageNum);
curPages[trackId].init(std::string(id),0);
curPages[trackId].init(std::string(id),26 * 1024 * 1024);
if (!(curPages[trackId].mapped)){
DEBUG_MSG(DLVL_FAIL, "Initializing page %s failed", curPages[trackId].name.c_str());
return;