Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
b165cfea
Commit
b165cfea
authored
May 15, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src/externals/single-application/SingleApplication): coding style
parent
32e737fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
SingleApplication.cpp
...op/src/externals/single-application/SingleApplication.cpp
+25
-22
No files found.
linphone-desktop/src/externals/single-application/SingleApplication.cpp
View file @
b165cfea
...
@@ -389,32 +389,35 @@ SingleApplication::SingleApplication (int &argc, char *argv[], bool allowSeconda
...
@@ -389,32 +389,35 @@ SingleApplication::SingleApplication (int &argc, char *argv[], bool allowSeconda
if
(
d
->
memory
->
create
(
sizeof
(
InstancesInfo
)))
{
if
(
d
->
memory
->
create
(
sizeof
(
InstancesInfo
)))
{
d
->
startPrimary
(
true
);
d
->
startPrimary
(
true
);
return
;
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
)
{
d
->
startPrimary
(
false
);
d
->
memory
->
unlock
();
return
;
}
// Check if another instance can be started
// Attempt to attach to the memory segment
if
(
allowSecondary
)
{
if
(
d
->
memory
->
attach
())
{
inst
->
secondary
+=
1
;
d
->
memory
->
lock
();
d
->
instanceNumber
=
inst
->
secondary
;
d
->
startSecondary
();
InstancesInfo
*
inst
=
static_cast
<
InstancesInfo
*>
(
d
->
memory
->
data
());
if
(
d
->
options
&
Mode
::
SecondaryNotification
)
{
d
->
connectToPrimary
(
timeout
,
SecondaryInstance
);
}
d
->
memory
->
unlock
();
return
;
}
if
(
!
inst
->
primary
)
{
d
->
startPrimary
(
false
);
d
->
memory
->
unlock
();
d
->
memory
->
unlock
();
return
;
}
}
// Check if another instance can be started
if
(
allowSecondary
)
{
inst
->
secondary
+=
1
;
d
->
instanceNumber
=
inst
->
secondary
;
d
->
startSecondary
();
if
(
d
->
options
&
Mode
::
SecondaryNotification
)
d
->
connectToPrimary
(
timeout
,
SecondaryInstance
);
d
->
memory
->
unlock
();
return
;
}
d
->
memory
->
unlock
();
}
}
d
->
connectToPrimary
(
timeout
,
NewInstance
);
d
->
connectToPrimary
(
timeout
,
NewInstance
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment