From 806d09b1143894ad66cea2c228f467e8c39a8adf Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 30 Apr 2013 19:50:05 -0700 Subject: Merge 3.5.1 into Materials --- indra/viewer_components/login/CMakeLists.txt | 4 ++++ indra/viewer_components/updater/CMakeLists.txt | 3 +++ 2 files changed, 7 insertions(+) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 7720619df3..658f167c2e 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -15,6 +15,10 @@ include_directories( ${LLMATH_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ${LLXML_SYSTEM_INCLUDE_DIRS} + ) set(login_SOURCE_FILES lllogin.cpp diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt index ef82290b47..de7e336341 100644 --- a/indra/viewer_components/updater/CMakeLists.txt +++ b/indra/viewer_components/updater/CMakeLists.txt @@ -20,6 +20,9 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) set(updater_service_SOURCE_FILES llupdaterservice.cpp -- cgit v1.2.3 From 842a6c6e46ff14bca4bd142b6edcd8b2964f2587 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Sun, 2 Jun 2013 14:41:57 -0700 Subject: BUG-2707 disable more login/update-sequence specific logging --- indra/viewer_components/login/lllogin.cpp | 26 +++++++++++++++------- .../viewer_components/updater/llupdaterservice.cpp | 12 +++++++++- 2 files changed, 29 insertions(+), 9 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 3357ad812d..27c91e2c14 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -117,14 +117,17 @@ private: void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) { - LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; + // BUG-2707? + //LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; // Launch a coroutine with our login_() method. Run the coroutine until // its first wait; at that point, return here. std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", boost::bind(&Impl::login_, this, _1, uri, login_params)); - LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; + + // BUG-2707? + //LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params) @@ -137,8 +140,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para //{ // printable_params["params"]["passwd"] = "*******"; //} - LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) - << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; + // + // +// BUG-2707? +// LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) +// << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; // Arriving in SRVRequest state LLEventStream replyPump("SRVreply", true); @@ -150,7 +156,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para sendProgressEvent("offline", "srvrequest"); // Request SRV record. - LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; + // BUG-2707? + //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; @@ -230,8 +238,9 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para // Still Downloading -- send progress update. sendProgressEvent("offline", "downloading"); } - - LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL; + + // BUG-2707? + //LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL; status = mAuthResponse["status"].asString(); // Okay, we've received our final status event for this @@ -276,7 +285,8 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para */ if( status == "Started") { - LL_DEBUGS("LLLogin") << mAuthResponse << LL_ENDL; + // BUG-2707? + //LL_DEBUGS("LLLogin") << mAuthResponse << LL_ENDL; continue; } diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 1bd9fa4fc0..1882e39a88 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -206,6 +206,8 @@ void LLUpdaterServiceImpl::initialize(const std::string& url, mPlatformVersion = platform_version; memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE); mWillingToTest = willing_to_test; + +#if BUG_2707 LL_DEBUGS("UpdaterService") << "\n url: " << mUrl << "\n path: " << mPath @@ -214,6 +216,7 @@ void LLUpdaterServiceImpl::initialize(const std::string& url, << "\n uniqueid: " << mUniqueId << "\n willing: " << ( mWillingToTest ? "testok" : "testno" ) << LL_ENDL; +#endif } void LLUpdaterServiceImpl::setCheckPeriod(unsigned int seconds) @@ -431,12 +434,15 @@ void LLUpdaterServiceImpl::response(LLSD const & content) BOOL required = content["required"].asBoolean(); LLURI url(content["url"].asString()); std::string more_info = content["more_info"].asString(); + + #if BUG_2707 LL_DEBUGS("UpdaterService") << "Starting download of " << ( required ? "required" : "optional" ) << " update" << " to channel '" << mNewChannel << "' version " << mNewVersion << " more info '" << more_info << "'" << LL_ENDL; + #endif mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required); } } @@ -459,6 +465,8 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) payload["channel"] = mNewChannel; payload["info_url"] = data["info_url"]; event["payload"] = payload; + + #if BUG_2707 LL_DEBUGS("UpdaterService") << "Download complete " << ( data["required"].asBoolean() ? "required" : "optional" ) @@ -466,6 +474,7 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) << " version " << mNewVersion << " info " << data["info_url"].asString() << LL_ENDL; + #endif LLEventPumps::instance().obtain("mainlooprepeater").post(event); @@ -542,7 +551,8 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event) // Check for failed install. if(LLFile::isfile(ll_install_failed_marker_path())) { - LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;; + // BUG-2707? + //LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;; int requiredValue = 0; { llifstream stream(ll_install_failed_marker_path()); -- cgit v1.2.3 From ea246125619aca35ac6672d6be4b8aa08123666f Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 07:51:27 -0700 Subject: BUG-2707 make use of OsOutputDebugString _DEBUG only on Windows to avoid throwing unhandlable exceptions in coroutines in RelWithDebInfo builds --- indra/viewer_components/login/lllogin.cpp | 46 ++++++++++------------ .../viewer_components/updater/llupdaterservice.cpp | 10 +---- 2 files changed, 23 insertions(+), 33 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 27c91e2c14..ae327a26d2 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -117,8 +117,7 @@ private: void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) { - // BUG-2707? - //LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; + LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL; // Launch a coroutine with our login_() method. Run the coroutine until // its first wait; at that point, return here. @@ -126,8 +125,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) LLCoros::instance().launch("LLLogin::Impl::login_", boost::bind(&Impl::login_, this, _1, uri, login_params)); - // BUG-2707? - //LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; + LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_params) @@ -142,9 +140,8 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para //} // // -// BUG-2707? -// LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) -// << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; + LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) + << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; // Arriving in SRVRequest state LLEventStream replyPump("SRVreply", true); @@ -152,25 +149,24 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para LLSD rewrittenURIs; { - LLEventTimeout filter(replyPump); - sendProgressEvent("offline", "srvrequest"); + LLEventTimeout filter(replyPump); + sendProgressEvent("offline", "srvrequest"); - // Request SRV record. - // BUG-2707? - //LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; + // Request SRV record. + LL_DEBUGS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL; - - // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. + // *NOTE:Mani - Completely arbitrary default timeout value for SRV request. F32 seconds_to_timeout = 5.0f; if(login_params.has("cfg_srv_timeout")) { seconds_to_timeout = login_params["cfg_srv_timeout"].asReal(); } - // If the SRV request times out (e.g. EXT-3934), simulate response: an - // array containing our original URI. - LLSD fakeResponse(LLSD::emptyArray()); - fakeResponse.append(uri); + // If the SRV request times out (e.g. EXT-3934), simulate response: an + // array containing our original URI. + LLSD fakeResponse(LLSD::emptyArray()); + fakeResponse.append(uri); + filter.eventAfter(seconds_to_timeout, fakeResponse); std::string srv_pump_name = "LLAres"; @@ -180,13 +176,13 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para } // Make request - LLSD request; - request["op"] = "rewriteURI"; - request["uri"] = uri; - request["reply"] = replyPump.getName(); - rewrittenURIs = postAndWait(self, request, srv_pump_name, filter); - // EXP-772: If rewrittenURIs fail, try original URI as a fallback. - rewrittenURIs.append(uri); + LLSD request; + request["op"] = "rewriteURI"; + request["uri"] = uri; + request["reply"] = replyPump.getName(); + rewrittenURIs = postAndWait(self, request, srv_pump_name, filter); + // EXP-772: If rewrittenURIs fail, try original URI as a fallback. + rewrittenURIs.append(uri); } // we no longer need the filter LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction")); diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 1882e39a88..7dd88fadb8 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -207,7 +207,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url, memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE); mWillingToTest = willing_to_test; -#if BUG_2707 LL_DEBUGS("UpdaterService") << "\n url: " << mUrl << "\n path: " << mPath @@ -216,7 +215,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url, << "\n uniqueid: " << mUniqueId << "\n willing: " << ( mWillingToTest ? "testok" : "testno" ) << LL_ENDL; -#endif } void LLUpdaterServiceImpl::setCheckPeriod(unsigned int seconds) @@ -435,14 +433,13 @@ void LLUpdaterServiceImpl::response(LLSD const & content) LLURI url(content["url"].asString()); std::string more_info = content["more_info"].asString(); - #if BUG_2707 LL_DEBUGS("UpdaterService") << "Starting download of " << ( required ? "required" : "optional" ) << " update" << " to channel '" << mNewChannel << "' version " << mNewVersion << " more info '" << more_info << "'" << LL_ENDL; - #endif + mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required); } } @@ -466,7 +463,6 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) payload["info_url"] = data["info_url"]; event["payload"] = payload; - #if BUG_2707 LL_DEBUGS("UpdaterService") << "Download complete " << ( data["required"].asBoolean() ? "required" : "optional" ) @@ -474,7 +470,6 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) << " version " << mNewVersion << " info " << data["info_url"].asString() << LL_ENDL; - #endif LLEventPumps::instance().obtain("mainlooprepeater").post(event); @@ -551,8 +546,7 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event) // Check for failed install. if(LLFile::isfile(ll_install_failed_marker_path())) { - // BUG-2707? - //LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;; + LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;; int requiredValue = 0; { llifstream stream(ll_install_failed_marker_path()); -- cgit v1.2.3 From 50689a13baf07bcd68bfb77b111b066da972f076 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 5 Jun 2013 06:14:27 -0700 Subject: BOOG2707 uncomment cleared suspects --- indra/viewer_components/login/lllogin.cpp | 10 ++-------- indra/viewer_components/updater/llupdaterservice.cpp | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index ae327a26d2..8f33b2ad58 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -124,7 +124,6 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", boost::bind(&Impl::login_, this, _1, uri, login_params)); - LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } @@ -138,8 +137,6 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para //{ // printable_params["params"]["passwd"] = "*******"; //} - // - // LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << " with uri '" << uri << "', parameters " << printable_params << LL_ENDL; @@ -166,7 +163,6 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para // array containing our original URI. LLSD fakeResponse(LLSD::emptyArray()); fakeResponse.append(uri); - filter.eventAfter(seconds_to_timeout, fakeResponse); std::string srv_pump_name = "LLAres"; @@ -235,8 +231,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para sendProgressEvent("offline", "downloading"); } - // BUG-2707? - //LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL; + LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL; status = mAuthResponse["status"].asString(); // Okay, we've received our final status event for this @@ -281,8 +276,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para */ if( status == "Started") { - // BUG-2707? - //LL_DEBUGS("LLLogin") << mAuthResponse << LL_ENDL; + LL_DEBUGS("LLLogin") << mAuthResponse << LL_ENDL; continue; } diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 7dd88fadb8..1bd9fa4fc0 100755 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -206,7 +206,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url, mPlatformVersion = platform_version; memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE); mWillingToTest = willing_to_test; - LL_DEBUGS("UpdaterService") << "\n url: " << mUrl << "\n path: " << mPath @@ -432,14 +431,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content) BOOL required = content["required"].asBoolean(); LLURI url(content["url"].asString()); std::string more_info = content["more_info"].asString(); - LL_DEBUGS("UpdaterService") << "Starting download of " << ( required ? "required" : "optional" ) << " update" << " to channel '" << mNewChannel << "' version " << mNewVersion << " more info '" << more_info << "'" << LL_ENDL; - mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required); } } @@ -462,7 +459,6 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data) payload["channel"] = mNewChannel; payload["info_url"] = data["info_url"]; event["payload"] = payload; - LL_DEBUGS("UpdaterService") << "Download complete " << ( data["required"].asBoolean() ? "required" : "optional" ) -- cgit v1.2.3