Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
6bbb80dd
Commit
6bbb80dd
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Trivial cleanup
parent
2d387957
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llplugin/llpluginprocessparent.cpp
+36
-20
36 additions, 20 deletions
indra/llplugin/llpluginprocessparent.cpp
with
36 additions
and
20 deletions
indra/llplugin/llpluginprocessparent.cpp
+
36
−
20
View file @
6bbb80dd
...
@@ -468,8 +468,8 @@ void LLPluginProcessParent::idle(void)
...
@@ -468,8 +468,8 @@ void LLPluginProcessParent::idle(void)
// If we got here, we're listening.
// If we got here, we're listening.
setState
(
STATE_LISTENING
);
setState
(
STATE_LISTENING
);
break
;
}
}
break
;
case
STATE_LISTENING
:
case
STATE_LISTENING
:
{
{
...
@@ -512,28 +512,28 @@ void LLPluginProcessParent::idle(void)
...
@@ -512,28 +512,28 @@ void LLPluginProcessParent::idle(void)
mHeartbeat
.
setTimerExpirySec
(
mPluginLaunchTimeout
);
mHeartbeat
.
setTimerExpirySec
(
mPluginLaunchTimeout
);
setState
(
STATE_LAUNCHED
);
setState
(
STATE_LAUNCHED
);
}
}
break
;
}
}
break
;
case
STATE_LAUNCHED
:
case
STATE_LAUNCHED
:
{
// waiting for the plugin to connect
// waiting for the plugin to connect
if
(
pluginLockedUpOrQuit
())
if
(
pluginLockedUpOrQuit
())
{
{
errorState
();
errorState
();
}
}
else
// Check for the incoming connection.
else
if
(
accept
())
{
{
// Check for the incoming connection.
// Stop listening on the server port
if
(
accept
())
mListenSocket
.
reset
();
{
setState
(
STATE_CONNECTED
);
// Stop listening on the server port
mListenSocket
.
reset
();
setState
(
STATE_CONNECTED
);
}
}
}
break
;
break
;
}
case
STATE_CONNECTED
:
case
STATE_CONNECTED
:
{
// waiting for hello message from the plugin
// waiting for hello message from the plugin
if
(
pluginLockedUpOrQuit
())
if
(
pluginLockedUpOrQuit
())
...
@@ -541,8 +541,10 @@ void LLPluginProcessParent::idle(void)
...
@@ -541,8 +541,10 @@ void LLPluginProcessParent::idle(void)
errorState
();
errorState
();
}
}
break
;
break
;
}
case
STATE_HELLO
:
case
STATE_HELLO
:
{
LL_DEBUGS
(
"Plugin"
)
<<
"received hello message"
<<
LL_ENDL
;
LL_DEBUGS
(
"Plugin"
)
<<
"received hello message"
<<
LL_ENDL
;
// Send the message to load the plugin
// Send the message to load the plugin
...
@@ -555,32 +557,40 @@ void LLPluginProcessParent::idle(void)
...
@@ -555,32 +557,40 @@ void LLPluginProcessParent::idle(void)
setState
(
STATE_LOADING
);
setState
(
STATE_LOADING
);
break
;
break
;
}
case
STATE_LOADING
:
case
STATE_LOADING
:
{
// The load_plugin_response message will kick us from here into STATE_RUNNING
// The load_plugin_response message will kick us from here into STATE_RUNNING
if
(
pluginLockedUpOrQuit
())
if
(
pluginLockedUpOrQuit
())
{
{
errorState
();
errorState
();
}
}
break
;
break
;
}
case
STATE_RUNNING
:
case
STATE_RUNNING
:
{
if
(
pluginLockedUpOrQuit
())
if
(
pluginLockedUpOrQuit
())
{
{
errorState
();
errorState
();
}
}
break
;
break
;
}
case
STATE_GOODBYE
:
case
STATE_GOODBYE
:
{
{
{
LLPluginMessage
message
(
LLPLUGIN_MESSAGE_CLASS_INTERNAL
,
"shutdown_plugin"
);
LLPluginMessage
message
(
LLPLUGIN_MESSAGE_CLASS_INTERNAL
,
"shutdown_plugin"
);
sendMessage
(
message
);
sendMessage
(
message
);
}
}
setState
(
STATE_EXITING
);
setState
(
STATE_EXITING
);
break
;
break
;
}
case
STATE_EXITING
:
case
STATE_EXITING
:
if
(
!
LLProcess
::
isRunning
(
mProcess
))
{
if
(
!
LLProcess
::
isRunning
(
mProcess
))
{
{
setState
(
STATE_CLEANUP
);
setState
(
STATE_CLEANUP
);
}
}
...
@@ -590,36 +600,44 @@ void LLPluginProcessParent::idle(void)
...
@@ -590,36 +600,44 @@ void LLPluginProcessParent::idle(void)
errorState
();
errorState
();
}
}
break
;
break
;
}
case
STATE_LAUNCH_FAILURE
:
case
STATE_LAUNCH_FAILURE
:
{
if
(
mOwner
!=
NULL
)
if
(
mOwner
!=
NULL
)
{
{
mOwner
->
pluginLaunchFailed
();
mOwner
->
pluginLaunchFailed
();
}
}
setState
(
STATE_CLEANUP
);
setState
(
STATE_CLEANUP
);
break
;
break
;
}
case
STATE_ERROR
:
case
STATE_ERROR
:
{
if
(
mOwner
!=
NULL
)
if
(
mOwner
!=
NULL
)
{
{
mOwner
->
pluginDied
();
mOwner
->
pluginDied
();
}
}
setState
(
STATE_CLEANUP
);
setState
(
STATE_CLEANUP
);
break
;
break
;
}
case
STATE_CLEANUP
:
case
STATE_CLEANUP
:
{
LLProcess
::
kill
(
mProcess
);
LLProcess
::
kill
(
mProcess
);
killSockets
();
killSockets
();
setState
(
STATE_DONE
);
setState
(
STATE_DONE
);
dirtyPollSet
();
dirtyPollSet
();
break
;
break
;
}
case
STATE_DONE
:
case
STATE_DONE
:
// just sit here.
// just sit here.
break
;
break
;
}
}
}
while
(
idle_again
);
}
while
(
idle_again
);
}
}
bool
LLPluginProcessParent
::
isLoading
(
void
)
bool
LLPluginProcessParent
::
isLoading
(
void
)
...
@@ -760,11 +778,9 @@ void LLPluginProcessParent::updatePollset()
...
@@ -760,11 +778,9 @@ void LLPluginProcessParent::updatePollset()
sPollSet
=
NULL
;
sPollSet
=
NULL
;
}
}
mapInstances_t
::
iterator
iter
;
int
count
=
0
;
// Count the number of instances that want to be in the pollset
// Count the number of instances that want to be in the pollset
for
(
iter
=
sInstances
.
begin
();
iter
!=
sInstances
.
end
();
iter
++
)
S32
count
=
0
;
for
(
auto
iter
=
sInstances
.
begin
();
iter
!=
sInstances
.
end
();
iter
++
)
{
{
(
*
iter
).
second
->
mPolledInput
=
false
;
(
*
iter
).
second
->
mPolledInput
=
false
;
if
((
*
iter
).
second
->
wantsPolling
())
if
((
*
iter
).
second
->
wantsPolling
())
...
@@ -793,9 +809,9 @@ void LLPluginProcessParent::updatePollset()
...
@@ -793,9 +809,9 @@ void LLPluginProcessParent::updatePollset()
LL_DEBUGS
(
"PluginPoll"
)
<<
"created pollset "
<<
sPollSet
<<
LL_ENDL
;
LL_DEBUGS
(
"PluginPoll"
)
<<
"created pollset "
<<
sPollSet
<<
LL_ENDL
;
// Pollset was created, add all instances to it.
// Pollset was created, add all instances to it.
for
(
iter
=
sInstances
.
begin
();
iter
!=
sInstances
.
end
();
iter
++
)
for
(
auto
iter
=
sInstances
.
begin
();
iter
!=
sInstances
.
end
();
iter
++
)
{
{
if
(
(
*
iter
).
second
->
wantsPolling
())
if
(
iter
->
second
->
wantsPolling
())
{
{
status
=
apr_pollset_add
(
sPollSet
,
&
((
*
iter
).
second
->
mPollFD
));
status
=
apr_pollset_add
(
sPollSet
,
&
((
*
iter
).
second
->
mPollFD
));
if
(
status
==
APR_SUCCESS
)
if
(
status
==
APR_SUCCESS
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment