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
1641bdd5
Commit
1641bdd5
authored
9 years ago
by
Rider Linden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-5788: Do not call set active if TOS window closed before site alive test returns.
parent
f0034557
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfloatertos.cpp
+12
-4
12 additions, 4 deletions
indra/newview/llfloatertos.cpp
indra/newview/llfloatertos.h
+1
-1
1 addition, 1 deletion
indra/newview/llfloatertos.h
with
13 additions
and
5 deletions
indra/newview/llfloatertos.cpp
+
12
−
4
View file @
1641bdd5
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include
"message.h"
#include
"message.h"
#include
"llstartup.h"
// login_alert_done
#include
"llstartup.h"
// login_alert_done
#include
"llcorehttputil.h"
#include
"llcorehttputil.h"
#include
"llfloaterreg.h"
LLFloaterTOS
::
LLFloaterTOS
(
const
LLSD
&
data
)
LLFloaterTOS
::
LLFloaterTOS
(
const
LLSD
&
data
)
:
LLModalDialog
(
data
[
"message"
].
asString
()
),
:
LLModalDialog
(
data
[
"message"
].
asString
()
),
...
@@ -196,7 +197,7 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
...
@@ -196,7 +197,7 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
std
::
string
url
(
getString
(
"real_url"
));
std
::
string
url
(
getString
(
"real_url"
));
LLCoros
::
instance
().
launch
(
"LLFloaterTOS::testSiteIsAliveCoro"
,
LLCoros
::
instance
().
launch
(
"LLFloaterTOS::testSiteIsAliveCoro"
,
boost
::
bind
(
&
LLFloaterTOS
::
testSiteIsAliveCoro
,
this
,
url
));
boost
::
bind
(
&
LLFloaterTOS
::
testSiteIsAliveCoro
,
url
));
}
}
else
if
(
mRealNavigateBegun
)
else
if
(
mRealNavigateBegun
)
{
{
...
@@ -216,18 +217,25 @@ void LLFloaterTOS::testSiteIsAliveCoro(std::string url)
...
@@ -216,18 +217,25 @@ void LLFloaterTOS::testSiteIsAliveCoro(std::string url)
LLCore
::
HttpRequest
::
ptr_t
httpRequest
(
new
LLCore
::
HttpRequest
);
LLCore
::
HttpRequest
::
ptr_t
httpRequest
(
new
LLCore
::
HttpRequest
);
LLCore
::
HttpOptions
::
ptr_t
httpOpts
=
LLCore
::
HttpOptions
::
ptr_t
(
new
LLCore
::
HttpOptions
);
LLCore
::
HttpOptions
::
ptr_t
httpOpts
=
LLCore
::
HttpOptions
::
ptr_t
(
new
LLCore
::
HttpOptions
);
httpOpts
->
setWantHeaders
(
true
);
httpOpts
->
setWantHeaders
(
true
);
LL_INFOS
(
"HttpCoroutineAdapter"
,
"genericPostCoro"
)
<<
"Generic POST for "
<<
url
<<
LL_ENDL
;
LL_INFOS
(
"testSiteIsAliveCoro"
)
<<
"Generic POST for "
<<
url
<<
LL_ENDL
;
LLSD
result
=
httpAdapter
->
getAndSuspend
(
httpRequest
,
url
);
LLSD
result
=
httpAdapter
->
getAndSuspend
(
httpRequest
,
url
);
LLSD
httpResults
=
result
[
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
HTTP_RESULTS
];
LLSD
httpResults
=
result
[
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
HTTP_RESULTS
];
LLCore
::
HttpStatus
status
=
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
getStatusFromLLSD
(
httpResults
);
LLCore
::
HttpStatus
status
=
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
getStatusFromLLSD
(
httpResults
);
LLFloaterTOS
*
that
=
LLFloaterReg
::
findTypedInstance
<
LLFloaterTOS
>
(
"message_tos"
);
// double not.
// double not.
// First ! returns a boolean error status, second ! is true if success result.
if
(
that
)
setSiteIsAlive
(
!!
status
);
that
->
setSiteIsAlive
(
static_cast
<
bool
>
(
status
));
else
{
LL_WARNS
(
"testSiteIsAliveCoro"
)
<<
"Dialog canceled before response."
<<
LL_ENDL
;
}
}
}
This diff is collapsed.
Click to expand it.
indra/newview/llfloatertos.h
+
1
−
1
View file @
1641bdd5
...
@@ -62,7 +62,7 @@ class LLFloaterTOS :
...
@@ -62,7 +62,7 @@ class LLFloaterTOS :
/*virtual*/
void
handleMediaEvent
(
LLPluginClassMedia
*
self
,
EMediaEvent
event
);
/*virtual*/
void
handleMediaEvent
(
LLPluginClassMedia
*
self
,
EMediaEvent
event
);
private:
private:
void
testSiteIsAliveCoro
(
std
::
string
url
);
static
void
testSiteIsAliveCoro
(
std
::
string
url
);
std
::
string
mMessage
;
std
::
string
mMessage
;
bool
mLoadingScreenLoaded
;
bool
mLoadingScreenLoaded
;
...
...
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