Commit Graph

112 Commits (cfe0ba90352c48a2b9f5006c4c8e824dc472cdc9)

Author SHA1 Message Date
Andrey Kleshchev 1935d25c78 Revert "SL-11215: Add release notes URLs to update-related notifications."
This reverts commit bf999f2f84 due to revert of updater, this will be moved to separate 'epic' instead
2020-08-06 20:06:02 +03:00
Nat Goodspeed ca6f092929 DRTVWR-476: Merge branch 'master' of lindenlab/viewer into DRTVWR-476-boost-1.72 2020-05-06 16:06:26 -04:00
Nat Goodspeed bf999f2f84 SL-11215: Add release notes URLs to update-related notifications.
Add code to login-fail handler to provide release notes URL from
SLVersionChecker handshake event.
2020-03-25 16:08:43 -04:00
Nat Goodspeed 5a260e0cc3 SL-11216: Convert LLVersionInfo to an LLSingleton.
This changeset is meant to exemplify how to convert a "namespace" class whose
methods are static -- and whose data are module-static -- to an LLSingleton.
LLVersionInfo has no initClass() or cleanupClass() methods, but the general
idea is the same.

* Derive the class from LLSingleton<T>:
  class LLSomeSingleton: public LLSingleton<LLSomeSingleton> { ... };
* Add LLSINGLETON(LLSomeSingleton); in the private section of the class. This
  usage implies a separate LLSomeSingleton::LLSomeSingleton() definition, as
  described in indra/llcommon/llsingleton.h.
* Move module-scope data in the .cpp file to non-static class members. Change
  any sVariableName to mVariableName to avoid being outright misleading.
* Make static class methods non-static. Remove '//static' comments from method
  definitions as needed.
* For LLVersionInfo specifically, the 'const std::string&' return type was
  replaced with 'std::string'. Returning a reference to a static or a member,
  const or otherwise, is an anti-pattern: the interface constrains the
  implementation, prohibiting possibly later returning a temporary (an
  expression).
* For LLVersionInfo specifically, 'const S32' return type was replaced with
  simple 'S32'. 'const' is just noise in that usage.
* Simple member initialization (e.g. the original initializer expressions for
  static variables) can be done with member{ value } initializers (no examples
  here though).
* Delete initClass() method.
* LLSingleton's forté is of course lazy initialization. It might work to
  simply delete any calls to initClass(). But if there are side effects that
  must happen at that moment, replace LLSomeSingleton::initClass() with
  (void)LLSomeSingleton::instance();
* Most initClass() initialization can be done in the constructor, as would
  normally be the case.
* Initialization that might cause a circular LLSingleton reference should be
  moved to initSingleton(). Override 'void initSingleton();' should be private.
* For LLVersionInfo specifically, certain initialization that used to be
  lazily performed was made unconditional, due to its low cost.
* For LLVersionInfo specifically, certain initialization involved calling
  methods that have become non-static. This was moved to initSingleton()
  because, in a constructor body, 'this' does not yet point to the enclosing
  class.
* Delete cleanupClass() method.
* There is already a generic LLSingletonBase::deleteAll() call in
  LLAppViewer::cleanup(). It might work to let this new LLSingleton be cleaned
  up with all the rest. But if there are side effects that must happen at that
  moment, replace LLSomeSingleton::cleanupClass() with
  LLSomeSingleton::deleteSingleton(). That said, much of the benefit of
  converting to LLSingleton is deleteAll()'s guarantee that cross-LLSingleton
  dependencies will be properly honored: we're trying to migrate the code base
  away from the present fragile manual cleanup sequence.
* Most cleanupClass() cleanup can be done in the destructor, as would normally
  be the case.
* Cleanup that might throw an exception should be moved to cleanupSingleton().
  Override 'void cleanupSingleton();' should be private.
* Within LLSomeSingleton methods, remove any existing
  LLSomeSingleton::methodName() qualification: simple methodName() is better.
* In the rest of the code base, convert most LLSomeSingleton::methodName()
  references to LLSomeSingleton::instance().methodName(). (Prefer instance() to
  getInstance() because a reference does not admit the possibility of NULL.)
* Of course, LLSomeSingleton::ENUM_VALUE can remain unchanged.

In general, for many successive references to an LLSingleton instance, it
can be useful to capture the instance() as in:

auto& versionInfo{LLVersionInfo::instance()};
// ... versionInfo.getVersion() ...

We did not do that here only to simplify the code review.

The STRINGIZE(expression) macro encapsulates:
std::ostringstream out;
out << expression;
return out.str();
We used that in a couple places.

For LLVersionInfo specifically, lllogininstance_test.cpp used to dummy out a
couple specific static methods. It's harder to dummy out
LLSingleton::instance() references, so we add the real class to that test.
2020-03-25 16:01:31 -04:00
Andrey Kleshchev bfcb558f90 SL-12678 Remove automatic retry of login 2020-02-21 23:38:39 +02:00
Andrey Kleshchev 88ae7dcb29 SL-12678 Remove automatic retry of login 2020-02-12 17:30:30 +02:00
AndreyL ProductEngine 1470e82c89 Merged in lindenlab/viewer-release 2019-04-02 21:51:54 +03:00
AndreyL ProductEngine 5715cda6e0 Merged in lindenlab/viewer-release 2019-03-01 10:55:47 +02:00
AndreyL ProductEngine 36cb6933e6 Merged in lindenlab/viewer-release 2019-03-01 02:24:00 +02:00
andreykproductengine d785c87d62 SL-2364 Fixed Viewer Caches Login Host DNS Entries Indefinetely 2019-01-29 21:33:31 +02:00
Nat Goodspeed 05068186c3 DRTVWR-474: Make login coroutine sync with updater process on failure.
Specifically, introduce an LLEventMailDrop("LoginSync"). When the updater
detects that an update is required, it will post to that rendezvous point.

When login.cgi responds with login failure, make the login coroutine wait (a
few seconds) for that ping from the updater.

If we receive that ping and if it contains a "reply" key, make the fail.login
listener respond to the updater with an indication of whether to proceed with
update.

If both login.cgi and the updater concur that an update is required, produce a
new confirmation message for the user and then (once user responds) tell the
updater to proceed. Otherwise, produce the usual login-failure message and
tell the updater never mind.

Introduce LLCoro::OverrideConsuming to provide temporary save/restore of the
set_consuming() / get_consuming() flag. It's a good idea to set the consuming
flag when retrieving data from an LLEventMailDrop.
2018-10-04 16:35:38 -04:00
Graham Linden 27679824ff Handle grids.xml w/ single entry instead of an array.
Fix crash when no login URIs are found for a given grid
(does not happen after fixing above, but should not crash either).
2018-06-29 00:16:32 +01:00
andreykproductengine 87b6a05ba6 MAINT-8372 Fixed doubled error messages 2018-03-16 19:17:44 +02:00
Nat Goodspeed eafb0a32e3 DRTVWR-418: Remove redundant assignment per Ansariel Hiller. 2017-10-12 08:25:12 -04:00
Nat Goodspeed 0c7bc67814 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
AndreyL ProductEngine 65bf63c973 Merged in lindenlab/viewer-bear 2019-04-02 22:12:55 +03:00
Oz Linden 545b03da71 MAINT-7827: suppress doubled notices on various login problems 2017-09-22 15:33:33 -04:00
Oz Linden f938ee99d1 additional logging to help with MAINT 7807 2017-09-15 12:03:05 -04:00
Oz Linden bd08855ec5 merge changes for MAINT-7594 2017-08-23 13:27:05 -04:00
Oz Linden 6980f5bcc2 MAINT-7594: add platform name string to login request (and add request parameter logging at DEBUG) 2017-08-22 16:38:15 -04:00
Oz Linden 4cc6d44ef8 fix indenting 2017-08-14 11:55:31 -04:00
Oz Linden 4d71ffb430 MAINT-7640: code review fixes 2017-08-14 11:52:41 -04:00
Oz Linden 612ff7b6b3 MAINT-7640: Notify the user if login is blocked for a required viewer update 2017-08-14 07:15:18 -04:00
AndreyL ProductEngine 5bcdbd976d Merged in oz_linden/viewer-maint-7594 2017-08-27 22:33:41 +03:00
Oz Linden b3ceeb6d9c MAINT-7594: add platform name string and address size to login request for crash stats (and add request parameter logging at DEBUG) 2017-08-24 10:37:59 -04:00
andreykproductengine 1a5fa01fb8 MAINT-7495 Viewer retries too many time apon 504 from login.cgi 2017-07-24 17:06:12 +03:00
coyot@coyot-sager-PC.hsd1.ca.comcast.net a1194ce6e9 pull from gate 2017-05-05 18:07:00 +01:00
Nat Goodspeed 7a6a2db289 DRTVWR-418: Send address_size with login and viewer stats. 2017-04-21 15:27:10 -04:00
Glenn Glazer 01ee14c0fc SL-323: put back mac addr hash 2016-08-19 12:12:48 -07:00
Glenn Glazer c8c143e774 SL-323: first pass at ripping out old updater 2016-08-18 13:05:30 -07:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nat Goodspeed c93648e3d2 Make MandatoryUpdateMachine use LLLoginInstance's LLNotificationsInterface.
LLLoginInstance has a test hook setNotificationsInterface(), used by
lllogininstance_test.cpp to redirect notifications through a dummy
LLNotificationsInterface implementation. Certain of LLLoginInstance's
MandatoryUpdateMachine state classes need to post notifications too; but until
now they directly called LLNotificationsUtil::add(). In the production viewer,
this should (!) be the same as calling through LLLoginInstance::mNotifications
-- but it broke two of the LLLoginInstance unit tests, so they were skipped.
Since MandatoryUpdateMachine's constructor is already passed the invoking
LLLoginInstance&, make it store the reference. Add MandatoryUpdateMachine::
getNotificationsInterface(), which forwards to new LLLoginInstance::
getNotificationsInterface(). Change LLNotificationsUtil::add() calls in
MandatoryUpdateMachine state classes to call through mMachine's
getNotificationInterface() instead.
This allows us to remove #include "llnotificationsutil.h" from
lllogininstance.cpp, also that #include plus stub LLNotificationsUtil::add()
implementation from lllogininstance_test.cpp.
Finally, it allows us to remove the skip() calls from the two unit tests.
2015-01-23 04:09:17 -08:00
callum_linden 1f283b5bbb Update to build on Xcode 6.0: removal on unused variable(s) need more thought from Nat 2014-10-19 15:41:03 -07:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Graham Madarasz 7c72222823 NORSPEC-158 fix issues with loading of bumpmaps on clean install 2013-05-30 17:43:14 -07:00
Graham Madarasz c19200eb00 BUG-2707 add some logging to help narrow down what part of login instance handling is going awry 2013-05-30 17:01:28 -07:00
Oz Linden 3bb708d706 merge up to latest viewer-development for merge to 3.5.2 2013-04-19 14:42:56 -04:00
Oz Linden ce0dbbd8a5 Add reporting of last_exec_duration
(and clean up logic around multiple instances)
2013-04-02 12:57:09 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Oz Linden f9ef7ba13a change login to pass only the version instead of channel+version in the version parameter (channel is passed separately) 2013-03-27 15:06:25 -04:00
Oz Linden c17db85e73 add platform and platform version to login request parameters for new version manager query 2013-03-27 13:20:48 -04:00
Oz Linden 49ed1a4e32 finish changes to update handling, including notices of channel changes 2013-02-27 17:40:39 -05:00
Oz Linden cf1019859d add use of v1.1 update request protocol, with fallback to v1.0 2013-02-21 16:47:52 -05:00
Richard Linden bc3f0e0a81 EXP-1230 FIX As a resident, I want to not have to choose a UI mode
removed all references to basic mode
2011-09-20 18:47:13 -07:00
Richard Nelson 5a6f07ab64 disabled basic inventory root creation
reviewed by Stone
2011-08-26 14:01:30 -07:00
Aaron Stone dfcd11e51e CHOP-757 Ask for the inventory-basic login option and dump its return id to llinfo. 2011-08-10 11:55:05 -07:00
Joshua Bell e54e9b4eed WIP: viewer side of ER-864: Include message ids and args in login.cgi responses
* Look for message_id and message_args in XMLRPC response, look up localized string in strings.xml
* Support sub-maps in XMLRPC response conversion to LLSD
* Explicitly request extended error info during login (since including sub-maps breaks older viewers)
* Support LLSD-based substitutions in LLTrans::getString/findString
2011-05-11 17:36:11 -07:00
Leyla Farazha 09594214f5 EXP-679 As a linden executive, I would like to evaluate the success of basic mode against various metrics 2011-04-15 18:11:04 -07:00
Nat Goodspeed 2bafe0dc8a Extend LLEventAPI to directly call other functions & methods.
Until now, LLEventAPI has only been able to register functions specifically
accepting(const LLSD&). Typically you add a wrapper method to your LLEventAPI
subclass, register that, have it extract desired params from the incoming LLSD
and then call the actual function of interest.
With help from Alain, added new LLEventAPI::add() methods capable of
registering functions/methods with arbitrary parameter signatures. The code
uses boost::fusion magic to implicitly match incoming LLSD arguments to the
function's formal parameter list, bypassing the need for an explicit helper
method.
New add() methods caused an ambiguity with a previous convenience overload.
Removed that overload and fixed the one existing usage.
Replaced LLEventDispatcher::get() with try_call() -- it's no longer easy to
return a Callable for caller to call directly. But the one known use of that
feature simply used it to avoid fatal LL_ERRS on unknown function-name string,
hence the try_call() approach actually addresses that case more directly.
Added indra/common/lleventdispatcher_test.cpp to exercise new functionality.
2011-01-28 20:18:10 -05:00
Oz Linden 4f3953763d merge changes from viewer-beta 2011-01-20 20:48:16 -05:00