Added support for stream enabledness checking.
This commit is contained in:
parent
87a2f50dc9
commit
af5ad26668
1 changed files with 4 additions and 1 deletions
|
@ -76,11 +76,14 @@ namespace Mist {
|
||||||
if (streamIndex.mapped){
|
if (streamIndex.mapped){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!Util::Stream::getStream(streamName)){
|
||||||
|
DEBUG_MSG(DLVL_FAIL, "Opening stream disallowed - aborting initalization");
|
||||||
|
return;
|
||||||
|
}
|
||||||
isInitialized = true;
|
isInitialized = true;
|
||||||
streamIndex.init(streamName,0,false,false);
|
streamIndex.init(streamName,0,false,false);
|
||||||
if (!streamIndex.mapped){
|
if (!streamIndex.mapped){
|
||||||
sem_t * waiting = sem_open(std::string("/wait_" + streamName).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 0);
|
sem_t * waiting = sem_open(std::string("/wait_" + streamName).c_str(), O_CREAT | O_RDWR, ACCESSPERMS, 0);
|
||||||
Util::Stream::getStream(streamName);
|
|
||||||
if (waiting == SEM_FAILED){
|
if (waiting == SEM_FAILED){
|
||||||
DEBUG_MSG(DLVL_FAIL, "Failed to open semaphore - cancelling");
|
DEBUG_MSG(DLVL_FAIL, "Failed to open semaphore - cancelling");
|
||||||
onFail();
|
onFail();
|
||||||
|
|
Loading…
Add table
Reference in a new issue