Commit b165cfea authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/externals/single-application/SingleApplication): coding style

parent 32e737fc
......@@ -389,10 +389,12 @@ SingleApplication::SingleApplication (int &argc, char *argv[], bool allowSeconda
if (d->memory->create(sizeof(InstancesInfo))) {
d->startPrimary(true);
return;
} else {
}
// Attempt to attach to the memory segment
if (d->memory->attach()) {
d->memory->lock();
InstancesInfo *inst = static_cast<InstancesInfo *>(d->memory->data());
if (!inst->primary) {
......@@ -405,17 +407,18 @@ SingleApplication::SingleApplication (int &argc, char *argv[], bool allowSeconda
if (allowSecondary) {
inst->secondary += 1;
d->instanceNumber = inst->secondary;
d->startSecondary();
if (d->options & Mode::SecondaryNotification) {
if (d->options & Mode::SecondaryNotification)
d->connectToPrimary(timeout, SecondaryInstance);
}
d->memory->unlock();
return;
}
d->memory->unlock();
}
}
d->connectToPrimary(timeout, NewInstance);
delete d;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment