From 7b6ddb4106726f1d4f39a98cc5d7b49e39abc907 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 30 Nov 2009 12:57:45 -0500 Subject: DEV-43463: Keep LLEventPump's LLStandardSignal alive during post() Replace LLEventPump's boost::scoped_ptr with boost::shared_ptr. Take a local stack copy of that shared_ptr in post() methods, and invoke the signal through that copy. This guards against scenario in which LLEventPump gets destroyed during signal invocation. (See Jira for details.) Re-enable Mani's test case that used to crash. Introduce ll_template_cast<> to allow a template function to recognize a parameter of a particular type. Introduce LLListenerWrapper mechanism to support wrapper objects for LLEventPump listeners. You instantiate an LLListenerWrapper subclass object inline in the listen() call (typically with llwrap<>), passing it the real listener, trusting it to forward the eventual call. Introduce prototypical LLCoutListener and LLLogListener subclasses for illustrative and diagnostic purposes. Test that LLLogListener doesn't block recognizing LLEventTrackable base class bound into wrapped listener. --- indra/viewer_components/login/tests/lllogin_test.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 99ea796ad0..56c21016bd 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -416,7 +416,6 @@ namespace tut ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline"); } -/* template<> template<> void llviewerlogin_object::test<5>() { @@ -452,5 +451,4 @@ namespace tut ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login"); } -*/ } -- cgit v1.2.3 From 5729a0a6a3ea3f024f37b15d223a8c317e5032fd Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 3 Dec 2009 13:11:35 -0800 Subject: Fix to windows build breakages. Reviewed by Brad --- indra/viewer_components/login/tests/lllogin_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 56c21016bd..6255f7ed15 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -231,6 +231,7 @@ namespace tut ensure_equals("Online state", listener.lastEvent()["state"].asString(), "online"); } + /* template<> template<> void llviewerlogin_object::test<2>() { @@ -416,7 +417,8 @@ namespace tut ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline"); } - template<> template<> + *FIX:Mani Disabled unit boost::coro is patched + template<> template<> void llviewerlogin_object::test<5>() { DEBUG; @@ -451,4 +453,5 @@ namespace tut ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login"); } +*/ } -- cgit v1.2.3 From be9480ab7708f8e4bce8855558b4d78a03bf1917 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 4 Dec 2009 16:38:12 -0500 Subject: DEV-43463: skip() instead of commenting out lllogin_tests --- .../viewer_components/login/tests/lllogin_test.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 6255f7ed15..c2b86d3a1c 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -29,6 +29,20 @@ #include "llevents.h" #include "stringize.h" +#if LL_WINDOWS +#define skipwin(arg) skip(arg) +#define skipmac(arg) +#define skiplinux(arg) +#elif LL_DARWIN +#define skipwin(arg) +#define skipmac(arg) skip(arg) +#define skiplinux(arg) +#elif LL_LINUX +#define skipwin(arg) +#define skipmac(arg) +#define skiplinux(arg) skip(arg) +#endif + /***************************************************************************** * Helper classes *****************************************************************************/ @@ -231,10 +245,10 @@ namespace tut ensure_equals("Online state", listener.lastEvent()["state"].asString(), "online"); } - /* template<> template<> void llviewerlogin_object::test<2>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Tests a successful login in with delayed responses. // Also includes 'failure' that cause the login module @@ -327,6 +341,7 @@ namespace tut template<> template<> void llviewerlogin_object::test<3>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test completed response, that fails to login. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -374,6 +389,7 @@ namespace tut template<> template<> void llviewerlogin_object::test<4>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test incomplete response, that end the attempt. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -417,10 +433,10 @@ namespace tut ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline"); } - *FIX:Mani Disabled unit boost::coro is patched template<> template<> void llviewerlogin_object::test<5>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test SRV request timeout. set_test_name("LLLogin SRV timeout testing"); @@ -453,5 +469,4 @@ namespace tut ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login"); } -*/ } -- cgit v1.2.3 From fde12f0204436dd924203231d4a2eaa2e230de06 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 4 Dec 2009 17:32:09 -0500 Subject: DEV-43463: use fixed Boost package on Windows --- indra/viewer_components/login/tests/lllogin_test.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index c2b86d3a1c..69a8424e87 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -248,7 +248,6 @@ namespace tut template<> template<> void llviewerlogin_object::test<2>() { - skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Tests a successful login in with delayed responses. // Also includes 'failure' that cause the login module @@ -341,7 +340,6 @@ namespace tut template<> template<> void llviewerlogin_object::test<3>() { - skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test completed response, that fails to login. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -389,7 +387,6 @@ namespace tut template<> template<> void llviewerlogin_object::test<4>() { - skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test incomplete response, that end the attempt. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -436,7 +433,6 @@ namespace tut template<> template<> void llviewerlogin_object::test<5>() { - skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test SRV request timeout. set_test_name("LLLogin SRV timeout testing"); -- cgit v1.2.3 From be49b8bed5fbd6cde63d8c5b6de432dc1f4b123d Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 8 Dec 2009 16:57:45 -0800 Subject: EXT-3158 - Removing logging of users password hash from new login code. Reviewed by Brad --- indra/viewer_components/login/lllogin.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index b14c59ab9a..02c13716ed 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -133,9 +133,16 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials) void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credentials) { - LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) - << " with uri '" << uri << "', credentials " << credentials << LL_ENDL; - // Arriving in SRVRequest state + LLSD printable_credentials = credentials; + if(printable_credentials.has("params") + && printable_credentials["params"].has("passwd")) + { + printable_credentials["params"]["passwd"] = "*******"; + } + LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) + << " with uri '" << uri << "', credentials " << printable_credentials << LL_ENDL; + + // Arriving in SRVRequest state LLEventStream replyPump("reply", true); // Should be an array of one or more uri strings. LLSD rewrittenURIs; @@ -144,7 +151,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential sendProgressEvent("offline", "srvrequest"); // Request SRV record. - LL_INFOS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; + LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. F32 seconds_to_timeout = 5.0f; @@ -193,6 +200,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential LLSD progress_data; progress_data["attempt"] = attempts; progress_data["request"] = request; + if(progress_data["request"].has("params") + && progress_data["request"]["params"].has("passwd")) + { + progress_data["request"]["params"]["passwd"] = "*******"; + } sendProgressEvent("offline", "authenticating", progress_data); // We expect zero or more "Downloading" status events, followed by -- cgit v1.2.3