From 80a98a100bd934fc73f90f1153de78fe0df93847 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 14 Jun 2010 16:43:06 +0100 Subject: EXT-7853: Made LLMutex destructor virtual. This fixes a potential resource leak whereby the destructor for LLCondition, which derives from LLMutex, is never called. --- indra/llcommon/llthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index adef1a9192..dbb8ec5231 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -135,7 +135,7 @@ class LL_COMMON_API LLMutex { public: LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex - ~LLMutex(); + virtual ~LLMutex(); void lock(); // blocks void unlock(); -- cgit v1.2.3 From b3fc9c79f559c84893dede3ce643ac0dfd1f3d65 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Mon, 14 Jun 2010 23:49:30 +0100 Subject: EXT-7524 FIXED Save snapshot to inventory results in crash Moved confirmSavingTexture() and onSavingTextureConfirmed() from LLSnapshotLivePreview to LLFloaterSnapshot::Impl so that the notification confirmation completes before LLFloaterSnapshot is closed. --- indra/llcommon/lldate.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index de7f2ead74..a7ef28b431 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -248,8 +248,27 @@ bool LLDate::fromStream(std::istream& s) s >> fractional; seconds_since_epoch += fractional; } - c = s.get(); // skip the Z - if (c != 'Z') { return false; } + + c = s.peek(); // check for offset + if (c == '+' || c == '-') + { + S32 offset_sign = (c == '+') ? 1 : -1; + S32 offset_hours = 0; + S32 offset_minutes = 0; + S32 offset_in_seconds = 0; + + s >> offset_hours; + + c = s.get(); // skip the colon a get the minutes if there are any + if (c == ':') + { + s >> offset_minutes; + } + + offset_in_seconds = (offset_hours * 60 + offset_sign * offset_minutes) * 60; + seconds_since_epoch -= offset_in_seconds; + } + else if (c != 'Z') { return false; } // skip the Z mSecondsSinceEpoch = seconds_since_epoch; return true; -- cgit v1.2.3