Commit Graph

32 Commits (8a13530ce4eeb481ee467fd3ec54f1ed7e9f632a)

Author SHA1 Message Date
Nat Goodspeed 0c7bc67814 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
andreykproductengine a2f71a242a MAINT-7820 Fixed crash in LLEventPump 2017-09-19 16:36:00 +03:00
Nat Goodspeed c1458713de DRTVWR-418: Make LLEventPumps an LLHandleProvider for LLEventPump.
LLEventPump's destructor was using LLEventPumps::instance() to unregister the
LLEventPump instance from LLEventPumps. Evidently, though, there are lingering
LLEventPump instances that persist even after the LLSingletonBase::deleteAll()
call destroys the LLEventPumps LLSingleton instance. These were resurrecting
LLEventPumps -- pointlessly, since a newly-resurrected LLEventPumps instance
can have no knowledge of the LLEventPump instance! Unregistering is
unnecessary!

What we want is a reference we can bind into each LLEventPump instance that
allows us to safely test whether the LLEventPumps instance still exists.
LLHandle is exactly that. Make LLEventPumps an LLHandleProvider and bind its
LLHandle in each LLEventPump's constructor; then the destructor can unregister
only when LLEventPumps still exists.
2017-03-13 14:31:38 -04:00
AndreyL ProductEngine 4617e07b37 Merged in lindenlab/viewer-release 2016-10-10 23:26:58 +03:00
Nat Goodspeed 5e9d2f57c8 MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if
desired.
2016-08-17 11:36:24 -04:00
Nat Goodspeed 9c49a6c91d MAINT-5011: Introduce LLException base class for viewer exceptions.
This also introduces LLContinueError for exceptions which should interrupt
some part of viewer processing (e.g. the current coroutine) but should attempt
to let the viewer session proceed.

Derive all existing viewer exception classes from LLException rather than from
std::runtime_error or std::logic_error.

Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown
exception with source file, line number and containing function.
2016-07-19 16:25:25 -04:00
Rider Linden c8f8bbf75f MAINT-6521: A compare against a static const empty string causes segfault in integration tests on Mac and Linux. Use empty() test instead. 2016-06-24 10:22:18 -07:00
Rider Linden d161651cdb MAINT-6521: Allow anonymous connections to bypass the dependency and order tracking. 2016-06-23 15:03:39 -07:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Rider Linden ae1c75c1c8 MAINT-5976: Removed temp code to simulate Nat's fix. Now redundant. 2015-12-22 10:17:44 -08:00
Rider Linden 6851dd30ca MAINT-5977: Check get_consuming() as well as listener return when draining queue. 2015-12-17 14:53:21 -08:00
Rider Linden 2c9097aa28 MAINT-5977: Finish implementation of MailBox event pump type for guaranteed delivery 2015-12-17 14:09:51 -08:00
rider 83c9c6df07 MAINT-5976: Adding MailDrop type event Queue 2015-12-17 09:06:19 -08:00
Rider Linden 2763bbd975 Initial changes for Vivox/Azumarill merge. Lots of temporary code and conditional compile switches. Begin switch from statemachine to coroutine. 2015-12-04 14:27:22 -08:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Richard Linden 2facd63745 SH-3406 WIP convert fast timers to lltrace system
improved LLUnit compile time errors
removed cassert in favor of llstatic_assert
2012-12-06 14:30:56 -08:00
Richard Linden 5a14a67e06 converted a bunch of narrowing implicit conversions to explicit 2012-02-01 13:03:46 -08:00
Nat Goodspeed 5fb224bb81 CHOP-763: make sendReply() treat replyKey as optional.
It's not worth bothering to tweak reply LLSD or attempt to send it if the
incoming request has no replyKey, in effect not requesting a reply. This
supports LLEventAPI operations for which the caller might or might not care
about a reply, invoked using either send() (fire and forget) or request()
(send request, wait for response). This logic should be central, instead of
having to perform that test in every caller that cares.
The major alternative would have been to treat missing replyKey as an error
(whether LL_ERRS or exception). But since there's already a mechanism by which
an LLEventAPI operation method can stipulate its replyKey as required, at this
level we can let it be optional.
2011-08-30 09:52:25 -04:00
Nat Goodspeed 4ef02bc1b6 Introduce and use new sendReply() function for LLEventAPI methods.
Each LLEventAPI method that generates a reply needs to extract the name of the
reply LLEventPump from the request, typically from a ["reply"] key, copy the
["reqid"] value from request to reply, locate the reply LLEventPump and send
the enriched reply object. Encapsulate in sendReply() function before we
proliferate doing all that by hand too many more times.
2011-02-18 10:56:26 -05:00
Andrew A. de Laix 62b9513353 permit flush when disabled. 2010-12-13 12:37:34 -08:00
Andrew A. de Laix 56a39aa914 fix possible crash on shutdown in event queue flush. 2010-12-10 16:15:18 -08:00
Andrew A. de Laix dbcb6b4fa5 fix crash if posting event during shutdown. 2010-12-10 12:06:43 -08:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Nat Goodspeed 7b6ddb4106 DEV-43463: Keep LLEventPump's LLStandardSignal alive during post()
Replace LLEventPump's boost::scoped_ptr<LLStandardSignal> 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.
2009-11-30 12:57:45 -05:00
brad kittenbrink 0fc5ab7f18 Workaround for DEV-35406 lleventhost crash on shutdown.
The fix deletes all LLEventPumps boost::signal objects prior to unloading any dlls.
reviewed by Nat.
2009-10-21 19:08:25 -07:00
Nat Goodspeed c3e8c1f738 Disable MSVC "fatal warning" 4702 for boost::lexical_cast in Release build 2009-09-24 13:46:02 -04:00
brad kittenbrink 843036a7d2 Fix for lllogin_tests crash on shutdown.
RegisterFlush destructor was dereferencing a dangling reference to the mainloop EventPump which had already been destructed.
2009-08-06 15:01:26 -07:00
Nat Goodspeed f910157c16 DEV-31979: Introduce LLReqID, a class to help individual event API listeners
implement the ["reqid"] convention. This convention dictates that a response
LLSD from each such API should contain a ["reqid"] key whose value echoes the
["reqid"] value, if any, in the request LLSD.
Add LLReqID support to LLAresListener's "rewriteURI" service, LLSDMessage,
LLCapabilityListener and LLXMLRPCListener.
2009-05-27 21:17:22 +00:00
Nat Goodspeed dc93462991 svn merge -r113003:119136 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-2 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-3 2009-05-11 20:05:46 +00:00
Nat Goodspeed 3800c0df91 svn merge -r114679:114681 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-7 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-8 2009-05-08 21:08:08 +00:00