Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
commit
c2f8517118
|
|
@ -14,7 +14,7 @@ build_docs = true
|
|||
build_Linux_Doxygen = true
|
||||
|
||||
# Need viewer-build-variables as well as other shared repositories
|
||||
buildscripts_shared_more_NAMEs="build_secrets build_variables"
|
||||
buildscripts_shared_more_NAMEs="build_secrets build_variables git_hooks"
|
||||
|
||||
################################################################
|
||||
#### Examples of how to set the viewer_channel ####
|
||||
|
|
|
|||
|
|
@ -848,9 +848,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>45dedb5b09995cd794304150e94fcf21</string>
|
||||
<string>2653c3627fd8687ff9e003425fd14834</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87950/806969/dullahan-1.12.2.202109170444_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-563968.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90199/821852/dullahan-1.12.3.202111032211_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-565428.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -860,9 +860,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>d0fd9d7086699da4bb5ccc935622a717</string>
|
||||
<string>b4003772562a5dd40bc112eec7cba5f5</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/88276/809277/dullahan-1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-563968.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90201/821871/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-565428.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -872,9 +872,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>7e8c3ccd420ff5aef24ff72d609ba394</string>
|
||||
<string>d9030d7a7390b3bda7de2adcc27e535a</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/88275/809281/dullahan-1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-563968.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90200/821876/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-565428.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -893,7 +893,7 @@
|
|||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114</string>
|
||||
<string>1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114</string>
|
||||
</map>
|
||||
<key>elfio</key>
|
||||
<map>
|
||||
|
|
@ -2349,18 +2349,18 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>0a6349b11c8e9d34f0c80b8081736e75</string>
|
||||
<string>35f42f538f4dc3abdfc2b2c4a915d004</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/79438/751815/llca-202104010215.557744-common-557744.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87228/802959/llca-202109010216.563493-common-563493.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>202104010215.557744</string>
|
||||
<string>202109010216.563493</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
|
|
@ -3408,9 +3408,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>6989053898b8e81e904e75553e378820</string>
|
||||
<string>97fac6d88480445c856083ed20d78093</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77523/735051/viewer_manager-2.0.556340-darwin64-556340.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85206/790666/viewer_manager-2.0.562101-darwin64-562101.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3444,9 +3444,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3446c1e54bb32542677caad0ec0d42ac</string>
|
||||
<string>3f6271ec0e2e2f0cc1067d4c4102bb4c</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77525/735058/viewer_manager-2.0.556340-windows-556340.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85208/790681/viewer_manager-2.0.562101-windows-562101.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3457,7 +3457,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>source_type</key>
|
||||
<string>hg</string>
|
||||
<key>version</key>
|
||||
<string>2.0.556340</string>
|
||||
<string>2.0.562101</string>
|
||||
</map>
|
||||
<key>vlc-bin</key>
|
||||
<map>
|
||||
|
|
@ -3476,9 +3476,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>5e553a4358203f283c74744aed2fcd8c</string>
|
||||
<string>738688816ebd76958e49772712a6b972</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/54836/510036/vlc_bin-2.2.8.538966-darwin64-538966.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90004/820701/vlc_bin-3.0.16.565299-darwin64-565299.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3512,9 +3512,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>ca84b7c5f86e702fb35727eed8f0c8c4</string>
|
||||
<string>6801f91f3f27e626898bab90d40fc1c3</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/54958/511725/vlc_bin-2.2.8.538966-windows-538966.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90005/820712/vlc_bin-3.0.16.565299-windows-565299.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3524,9 +3524,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>93cd88d90cb8aedbed5cd90ff9262409</string>
|
||||
<string>7f66982d6edf3c38f3493e28826d58e8</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/54954/511718/vlc_bin-2.2.8.538966-windows64-538966.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90006/820713/vlc_bin-3.0.16.565299-windows64-565299.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
|
|||
16
build.sh
16
build.sh
|
|
@ -306,6 +306,22 @@ python_cmd "$helpers/codeticket.py" addinput "Viewer Channel" "${viewer_channel}
|
|||
|
||||
initialize_version # provided by buildscripts build.sh; sets version id
|
||||
|
||||
begin_section "coding policy check"
|
||||
# On our TC Windows build hosts, the GitPython library underlying our
|
||||
# coding_policy_git.py script fails to run git for reasons we have not tried
|
||||
# to diagnose. Clearly git works fine on those hosts, or we would never get
|
||||
# this far. Running coding policy checks on one platform *should* suffice...
|
||||
if [[ "$arch" == "Darwin" ]]
|
||||
then
|
||||
# install the git-hooks dependencies
|
||||
pip install -r "$(native_path "$git_hooks_checkout/requirements.txt")" || \
|
||||
fatal "pip install git-hooks failed"
|
||||
# validate the branch we're about to build
|
||||
python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \
|
||||
fatal "coding policy check failed"
|
||||
fi
|
||||
end_section "coding policy check"
|
||||
|
||||
# Now run the build
|
||||
succeeded=true
|
||||
last_built_variant=
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
secondlife-viewer (0.3) unstable; urgency=low
|
||||
|
||||
* Initial debian configuration
|
||||
|
||||
-- Don Kjer <don@lindenlab.com> Wed, 04 Jul 2012 00:43:03 +0000
|
||||
|
||||
secondlife-viewer (0.2) unstable; urgency=low
|
||||
|
||||
* Adding default LSB headers for squeeze
|
||||
|
||||
-- Tyler Kohler <tyler@lindenlab.com> Thu, 24 Mar 2011 09:43:36 -0700
|
||||
|
||||
secondlife-viewer (0.1) unstable; urgency=low
|
||||
|
||||
* Cloned from debian package skeleton.
|
||||
|
||||
-- Lex Linden <lex@lindenlab.com> Mon, 20 Sep 2010 08:01:59 -0700
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
5
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
Source: secondlife-viewer
|
||||
Section: unknown
|
||||
Priority: extra
|
||||
Maintainer: Don Linden <don@lindenlab.com>
|
||||
Build-Depends: debhelper (>= 5)
|
||||
Homepage: http://secondlife.com
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: secondlife-viewer
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
ia32-libs,
|
||||
ia32-libs-gtk
|
||||
Description: Second Life Viewer
|
||||
Second Life is an online virtual world developed by Linden Lab.
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
Second Life Viewer Copyright: 2000-2012 Linden Research, Inc.
|
||||
|
||||
License:
|
||||
|
||||
3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion
|
||||
APR Copyright (C) 2011 The Apache Software Foundation
|
||||
Collada DOM Copyright 2006 Sony Computer Entertainment Inc.
|
||||
cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se)
|
||||
DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
|
||||
expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
|
||||
FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
GL Copyright (C) 1999-2004 Brian Paul.
|
||||
GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia.
|
||||
google-perftools Copyright (c) 2005, Google Inc.
|
||||
Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
|
||||
jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
|
||||
jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
ogg/vorbis Copyright (C) 2002, Xiphophorus
|
||||
OpenSSL Copyright (C) 1998-2008 The OpenSSL Project.
|
||||
PCRE Copyright (c) 1997-2012 University of Cambridge
|
||||
SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
|
||||
SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
|
||||
zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
|
||||
|
||||
Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
|
||||
|
||||
This software contains source code provided by NVIDIA Corporation.
|
||||
|
||||
All rights reserved. See licenses.txt for details.
|
||||
|
||||
Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postinst script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postrm script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh
|
||||
# preinst script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/sh
|
||||
# prerm script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
BASEDIR=opt/linden
|
||||
|
||||
VIEWER_PKG=secondlife-viewer
|
||||
VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged
|
||||
VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG)
|
||||
VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //')
|
||||
VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION)
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
|
||||
touch configure-stamp
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: configure-stamp
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
#$(MAKE)
|
||||
#docbook-to-man debian/secondlife-viewer.sgml > secondlife-viewer.1
|
||||
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
#-$(MAKE) clean
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/secondlife-viewer.
|
||||
for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \
|
||||
# create containing directory \
|
||||
install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \
|
||||
PERM=644; \
|
||||
if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
|
||||
PERM=755; \
|
||||
fi; \
|
||||
if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
|
||||
REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \
|
||||
RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \
|
||||
echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
|
||||
dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
|
||||
else \
|
||||
install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \
|
||||
fi; \
|
||||
done
|
||||
dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/secondlife /usr/bin/secondlife
|
||||
dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/SecondLife
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
|
||||
# To add an init script, uncomment this line and edit debian/init.d and
|
||||
# customize debian/secondlife-viewer.default to suit your needs.
|
||||
# dh_installinit
|
||||
|
||||
# To add cron jobs, uncomment this line and make a crontab file named
|
||||
# debian/cron.d, and it will be installed in /etc/cron.d/
|
||||
# dh_installcron
|
||||
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
# dh_strip
|
||||
dh_compress
|
||||
# dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# Linden packages install in opt/linden
|
||||
secondlife-viewer: dir-or-file-in-opt
|
||||
secondlife-viewer: section-is-dh_make-template
|
||||
secondlife-viewer: binary-without-manpage
|
||||
secondlife-viewer: maintainer-script-empty postrm
|
||||
secondlife-viewer: maintainer-script-empty preinst
|
||||
secondlife-viewer: maintainer-script-empty prerm
|
||||
secondlife-viewer: unstripped-binary-or-object
|
||||
|
|
@ -272,6 +272,7 @@ Beq Janus
|
|||
SL-13583
|
||||
SL-14766
|
||||
SL-14927
|
||||
SL-11300
|
||||
SL-15709
|
||||
SL-16021
|
||||
SL-16027
|
||||
|
|
@ -815,6 +816,7 @@ Jonathan Yap
|
|||
STORM-2142
|
||||
STORM-2145
|
||||
SL-10089
|
||||
BUG-229818
|
||||
Kadah Coba
|
||||
STORM-1060
|
||||
STORM-1843
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
|
|
@ -60,7 +60,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
|||
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
|
||||
set(TEMPLATE_VERIFIER_MASTER_URL "https://bitbucket.org/lindenlab/master-message-template-git/raw/HEAD/message_template.msg" CACHE STRING "Location of the master message template")
|
||||
set(TEMPLATE_VERIFIER_MASTER_URL "https://bitbucket.org/lindenlab/master-message-template-git/raw/master/message_template.msg" CACHE STRING "Location of the master message template")
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
euclid 5/29/2020
|
||||
euclid 7/23/2020
|
||||
euclid 4/29/2021
|
||||
euclid 10/5/2021 DRTVWR-546
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable");
|
||||
if( node->getFastAttributeString( wearable_string, wearable) )
|
||||
{
|
||||
mWearableType = LLWearableType::typeNameToType( wearable );
|
||||
mWearableType = LLWearableType::getInstance()->typeNameToType( wearable );
|
||||
}
|
||||
|
||||
static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group");
|
||||
|
|
|
|||
|
|
@ -76,17 +76,17 @@ LLWearable::~LLWearable()
|
|||
|
||||
const std::string& LLWearable::getTypeLabel() const
|
||||
{
|
||||
return LLWearableType::getTypeLabel(mType);
|
||||
return LLWearableType::getInstance()->getTypeLabel(mType);
|
||||
}
|
||||
|
||||
const std::string& LLWearable::getTypeName() const
|
||||
{
|
||||
return LLWearableType::getTypeName(mType);
|
||||
return LLWearableType::getInstance()->getTypeName(mType);
|
||||
}
|
||||
|
||||
LLAssetType::EType LLWearable::getAssetType() const
|
||||
{
|
||||
return LLWearableType::getAssetType(mType);
|
||||
return LLWearableType::getInstance()->getAssetType(mType);
|
||||
}
|
||||
|
||||
BOOL LLWearable::exportFile(const std::string& filename) const
|
||||
|
|
|
|||
|
|
@ -241,10 +241,11 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou
|
|||
U32 LLWearableData::getClothingLayerCount() const
|
||||
{
|
||||
U32 count = 0;
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
for (S32 i = 0; i < LLWearableType::WT_COUNT; i++)
|
||||
{
|
||||
LLWearableType::EType type = (LLWearableType::EType)i;
|
||||
if (LLWearableType::getAssetType(type)==LLAssetType::AT_CLOTHING)
|
||||
if (wr_inst->getAssetType(type)==LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
count += getWearableCount(type);
|
||||
}
|
||||
|
|
@ -254,7 +255,7 @@ U32 LLWearableData::getClothingLayerCount() const
|
|||
|
||||
BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
|
||||
{
|
||||
LLAssetType::EType a_type = LLWearableType::getAssetType(type);
|
||||
LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type);
|
||||
if (a_type==LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
if (type == LLWearableType::WT_PHYSICS) return (getWearableCount(type) < 1); // <FS:Ansariel> Don't add physics layer
|
||||
|
|
|
|||
|
|
@ -30,162 +30,101 @@
|
|||
#include "llinventorydefines.h"
|
||||
|
||||
|
||||
struct WearableEntry : public LLDictionaryEntry
|
||||
LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans)
|
||||
{
|
||||
WearableEntry(LLWearableType& wtype,
|
||||
const std::string &name,
|
||||
const std::string& default_new_name,
|
||||
LLAssetType::EType assetType,
|
||||
LLInventoryType::EIconName iconName,
|
||||
BOOL disable_camera_switch = FALSE,
|
||||
BOOL allow_multiwear = TRUE) :
|
||||
LLDictionaryEntry(name),
|
||||
mAssetType(assetType),
|
||||
mDefaultNewName(default_new_name),
|
||||
mLabel(wtype.mTrans->getString(name)),
|
||||
mIconName(iconName),
|
||||
mDisableCameraSwitch(disable_camera_switch),
|
||||
mAllowMultiwear(allow_multiwear)
|
||||
{
|
||||
|
||||
}
|
||||
const LLAssetType::EType mAssetType;
|
||||
const std::string mLabel;
|
||||
const std::string mDefaultNewName; //keep mLabel for backward compatibility
|
||||
LLInventoryType::EIconName mIconName;
|
||||
BOOL mDisableCameraSwitch;
|
||||
BOOL mAllowMultiwear;
|
||||
};
|
||||
|
||||
class LLWearableDictionary : public LLParamSingleton<LLWearableDictionary>,
|
||||
public LLDictionary<LLWearableType::EType, WearableEntry>
|
||||
{
|
||||
LLSINGLETON(LLWearableDictionary, LLWearableType&);
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
protected:
|
||||
// The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType
|
||||
virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; }
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
LLWearableDictionary::LLWearableDictionary(LLWearableType& wtype)
|
||||
{
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(wtype, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry(wtype, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry(wtype, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry(wtype, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(wtype, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry(wtype, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry(wtype, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(wtype, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry(wtype, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(wtype, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(wtype, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(wtype, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(wtype, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(wtype, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(wtype, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(wtype, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
|
||||
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(wtype, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
// [/SL:KB]
|
||||
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(wtype, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry(wtype, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry(wtype, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
}
|
||||
|
||||
|
||||
// class LLWearableType
|
||||
|
||||
LLWearableType::LLWearableType(LLTranslationBridge* trans)
|
||||
LLWearableType::LLWearableType(LLTranslationBridge::ptr_t &trans)
|
||||
: mDictionary(trans)
|
||||
{
|
||||
// LLTranslationBridge exists, but is not ready at this point in time since strings.xml is not yet loaded
|
||||
mTrans = trans;
|
||||
}
|
||||
|
||||
LLWearableType::~LLWearableType()
|
||||
{
|
||||
delete mTrans;
|
||||
}
|
||||
|
||||
void LLWearableType::initSingleton()
|
||||
{
|
||||
// To make sure all wrapping functions will crash without initing LLWearableType;
|
||||
LLWearableDictionary::initParamSingleton(*this);
|
||||
|
||||
// Todo: consider merging LLWearableType and LLWearableDictionary
|
||||
}
|
||||
|
||||
// static
|
||||
LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const LLWearableType::EType wearable = dict->lookup(type_name);
|
||||
const LLWearableType::EType wearable = mDictionary.lookup(type_name);
|
||||
return wearable;
|
||||
}
|
||||
|
||||
// static
|
||||
const std::string& LLWearableType::getTypeName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeName(WT_INVALID);
|
||||
return entry->mName;
|
||||
}
|
||||
|
||||
//static
|
||||
const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeDefaultNewName(WT_INVALID);
|
||||
return entry->mDefaultNewName;
|
||||
}
|
||||
|
||||
// static
|
||||
const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeLabel(WT_INVALID);
|
||||
return entry->mLabel;
|
||||
}
|
||||
|
||||
// static
|
||||
LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getAssetType(WT_INVALID);
|
||||
return entry->mAssetType;
|
||||
}
|
||||
|
||||
// static
|
||||
LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getIconName(WT_INVALID);
|
||||
return entry->mIconName;
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return FALSE;
|
||||
return entry->mDisableCameraSwitch;
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return FALSE;
|
||||
return entry->mAllowMultiwear;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,10 +35,9 @@
|
|||
|
||||
class LLWearableType : public LLParamSingleton<LLWearableType>
|
||||
{
|
||||
LLSINGLETON(LLWearableType, LLTranslationBridge* trans);
|
||||
LLSINGLETON(LLWearableType, LLTranslationBridge::ptr_t &trans);
|
||||
~LLWearableType();
|
||||
void initSingleton();
|
||||
friend struct WearableEntry;
|
||||
public:
|
||||
enum EType
|
||||
{
|
||||
|
|
@ -67,20 +66,59 @@ public:
|
|||
|
||||
// Most methods are wrappers for dictionary, but if LLWearableType is not initialized,
|
||||
// they will crash. Whole LLWearableType is just wrapper for convinient calls.
|
||||
static const std::string& getTypeName(EType type);
|
||||
static const std::string& getTypeDefaultNewName(EType type);
|
||||
static const std::string& getTypeLabel(EType type);
|
||||
static LLAssetType::EType getAssetType(EType type);
|
||||
static EType typeNameToType(const std::string& type_name);
|
||||
static LLInventoryType::EIconName getIconName(EType type);
|
||||
static BOOL getDisableCameraSwitch(EType type);
|
||||
static BOOL getAllowMultiwear(EType type);
|
||||
const std::string& getTypeName(EType type);
|
||||
const std::string& getTypeDefaultNewName(EType type);
|
||||
const std::string& getTypeLabel(EType type);
|
||||
LLAssetType::EType getAssetType(EType type);
|
||||
EType typeNameToType(const std::string& type_name);
|
||||
LLInventoryType::EIconName getIconName(EType type);
|
||||
BOOL getDisableCameraSwitch(EType type);
|
||||
BOOL getAllowMultiwear(EType type);
|
||||
|
||||
static EType inventoryFlagsToWearableType(U32 flags);
|
||||
|
||||
protected:
|
||||
private:
|
||||
struct WearableEntry : public LLDictionaryEntry
|
||||
{
|
||||
WearableEntry(LLTranslationBridge::ptr_t& trans,
|
||||
const std::string &name,
|
||||
const std::string& default_new_name,
|
||||
LLAssetType::EType assetType,
|
||||
LLInventoryType::EIconName iconName,
|
||||
BOOL disable_camera_switch = FALSE,
|
||||
BOOL allow_multiwear = TRUE) :
|
||||
LLDictionaryEntry(name),
|
||||
mAssetType(assetType),
|
||||
mDefaultNewName(default_new_name),
|
||||
mLabel(trans->getString(name)),
|
||||
mIconName(iconName),
|
||||
mDisableCameraSwitch(disable_camera_switch),
|
||||
mAllowMultiwear(allow_multiwear)
|
||||
{
|
||||
|
||||
LLTranslationBridge* mTrans;
|
||||
}
|
||||
const LLAssetType::EType mAssetType;
|
||||
const std::string mLabel;
|
||||
const std::string mDefaultNewName;
|
||||
LLInventoryType::EIconName mIconName;
|
||||
BOOL mDisableCameraSwitch;
|
||||
BOOL mAllowMultiwear;
|
||||
};
|
||||
|
||||
class LLWearableDictionary : public LLDictionary<LLWearableType::EType, WearableEntry>
|
||||
{
|
||||
public:
|
||||
LLWearableDictionary(LLTranslationBridge::ptr_t& trans);
|
||||
~LLWearableDictionary() {}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
protected:
|
||||
// The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType
|
||||
virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; }
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
LLWearableDictionary mDictionary;
|
||||
};
|
||||
|
||||
#endif // LL_LLWEARABLETYPE_H
|
||||
|
|
|
|||
|
|
@ -213,9 +213,9 @@ set(llcommon_HEADER_FILES
|
|||
llqueuedthread.h
|
||||
llrand.h
|
||||
llrefcount.h
|
||||
llregex.h
|
||||
llregistry.h
|
||||
llrun.h
|
||||
llrefcount.h
|
||||
llsafehandle.h
|
||||
llsd.h
|
||||
llsdjson.h
|
||||
|
|
|
|||
|
|
@ -134,6 +134,13 @@ LLCoros::LLCoros():
|
|||
|
||||
LLCoros::~LLCoros()
|
||||
{
|
||||
}
|
||||
|
||||
void LLCoros::cleanupSingleton()
|
||||
{
|
||||
// Some of the coroutines (like voice) will depend onto
|
||||
// origin singletons, so clean coros before deleting those
|
||||
|
||||
printActiveCoroutines("at entry to ~LLCoros()");
|
||||
// Other LLApp status-change listeners do things like close
|
||||
// work queues and inject the Stop exception into pending
|
||||
|
|
@ -149,6 +156,8 @@ LLCoros::~LLCoros()
|
|||
{
|
||||
// don't use llcoro::suspend() because that module depends
|
||||
// on this one
|
||||
// This will yield current(main) thread and will let active
|
||||
// corutines run once
|
||||
boost::this_fiber::yield();
|
||||
}
|
||||
printActiveCoroutines("after pumping");
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
|
|||
{
|
||||
LLSINGLETON(LLCoros);
|
||||
~LLCoros();
|
||||
|
||||
void cleanupSingleton();
|
||||
public:
|
||||
/// The viewer's use of the term "coroutine" became deeply embedded before
|
||||
/// the industry term "fiber" emerged to distinguish userland threads from
|
||||
|
|
|
|||
|
|
@ -488,6 +488,62 @@ namespace
|
|||
typedef std::vector<LLError::RecorderPtr> Recorders;
|
||||
typedef std::vector<LLError::CallSite*> CallSiteVector;
|
||||
|
||||
class SettingsConfig : public LLRefCount
|
||||
{
|
||||
friend class Globals;
|
||||
|
||||
public:
|
||||
virtual ~SettingsConfig();
|
||||
|
||||
LLError::ELevel mDefaultLevel;
|
||||
|
||||
bool mLogAlwaysFlush;
|
||||
|
||||
U32 mEnabledLogTypesMask;
|
||||
|
||||
LevelMap mFunctionLevelMap;
|
||||
LevelMap mClassLevelMap;
|
||||
LevelMap mFileLevelMap;
|
||||
LevelMap mTagLevelMap;
|
||||
std::map<std::string, unsigned int> mUniqueLogMessages;
|
||||
|
||||
LLError::FatalFunction mCrashFunction;
|
||||
LLError::TimeFunction mTimeFunction;
|
||||
|
||||
Recorders mRecorders;
|
||||
LLMutex mRecorderMutex;
|
||||
|
||||
int mShouldLogCallCounter;
|
||||
|
||||
private:
|
||||
SettingsConfig();
|
||||
};
|
||||
|
||||
typedef LLPointer<SettingsConfig> SettingsConfigPtr;
|
||||
|
||||
SettingsConfig::SettingsConfig()
|
||||
: LLRefCount(),
|
||||
mDefaultLevel(LLError::LEVEL_DEBUG),
|
||||
mLogAlwaysFlush(true),
|
||||
mEnabledLogTypesMask(255),
|
||||
mFunctionLevelMap(),
|
||||
mClassLevelMap(),
|
||||
mFileLevelMap(),
|
||||
mTagLevelMap(),
|
||||
mUniqueLogMessages(),
|
||||
mCrashFunction(NULL),
|
||||
mTimeFunction(NULL),
|
||||
mRecorders(),
|
||||
mRecorderMutex(),
|
||||
mShouldLogCallCounter(0)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsConfig::~SettingsConfig()
|
||||
{
|
||||
mRecorders.clear();
|
||||
}
|
||||
|
||||
class Globals
|
||||
{
|
||||
public:
|
||||
|
|
@ -495,16 +551,28 @@ namespace
|
|||
protected:
|
||||
Globals();
|
||||
public:
|
||||
std::ostringstream messageStream;
|
||||
bool messageStreamInUse;
|
||||
std::string mFatalMessage;
|
||||
|
||||
void addCallSite(LLError::CallSite&);
|
||||
void invalidateCallSites();
|
||||
|
||||
SettingsConfigPtr getSettingsConfig();
|
||||
|
||||
void resetSettingsConfig();
|
||||
LLError::SettingsStoragePtr saveAndResetSettingsConfig();
|
||||
void restore(LLError::SettingsStoragePtr pSettingsStorage);
|
||||
private:
|
||||
CallSiteVector callSites;
|
||||
SettingsConfigPtr mSettingsConfig;
|
||||
};
|
||||
|
||||
Globals::Globals() {}
|
||||
Globals::Globals()
|
||||
: mSettingsConfig(new SettingsConfig())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Globals* Globals::getInstance()
|
||||
{
|
||||
|
|
@ -532,120 +600,31 @@ namespace
|
|||
|
||||
callSites.clear();
|
||||
}
|
||||
}
|
||||
|
||||
namespace LLError
|
||||
{
|
||||
class SettingsConfig : public LLRefCount
|
||||
{
|
||||
friend class Settings;
|
||||
|
||||
public:
|
||||
virtual ~SettingsConfig();
|
||||
|
||||
LLError::ELevel mDefaultLevel;
|
||||
|
||||
bool mLogAlwaysFlush;
|
||||
|
||||
U32 mEnabledLogTypesMask;
|
||||
|
||||
LevelMap mFunctionLevelMap;
|
||||
LevelMap mClassLevelMap;
|
||||
LevelMap mFileLevelMap;
|
||||
LevelMap mTagLevelMap;
|
||||
std::map<std::string, unsigned int> mUniqueLogMessages;
|
||||
|
||||
LLError::FatalFunction mCrashFunction;
|
||||
LLError::TimeFunction mTimeFunction;
|
||||
|
||||
Recorders mRecorders;
|
||||
|
||||
int mShouldLogCallCounter;
|
||||
|
||||
private:
|
||||
SettingsConfig();
|
||||
};
|
||||
|
||||
typedef LLPointer<SettingsConfig> SettingsConfigPtr;
|
||||
|
||||
class Settings
|
||||
{
|
||||
public:
|
||||
static Settings* getInstance();
|
||||
protected:
|
||||
Settings();
|
||||
public:
|
||||
SettingsConfigPtr getSettingsConfig();
|
||||
|
||||
void reset();
|
||||
SettingsStoragePtr saveAndReset();
|
||||
void restore(SettingsStoragePtr pSettingsStorage);
|
||||
|
||||
private:
|
||||
SettingsConfigPtr mSettingsConfig;
|
||||
};
|
||||
|
||||
SettingsConfig::SettingsConfig()
|
||||
: LLRefCount(),
|
||||
mDefaultLevel(LLError::LEVEL_DEBUG),
|
||||
mLogAlwaysFlush(true),
|
||||
mEnabledLogTypesMask(255),
|
||||
mFunctionLevelMap(),
|
||||
mClassLevelMap(),
|
||||
mFileLevelMap(),
|
||||
mTagLevelMap(),
|
||||
mUniqueLogMessages(),
|
||||
mCrashFunction([](const std::string&){}),
|
||||
mTimeFunction(NULL),
|
||||
mRecorders(),
|
||||
mShouldLogCallCounter(0)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsConfig::~SettingsConfig()
|
||||
{
|
||||
mRecorders.clear();
|
||||
}
|
||||
|
||||
Settings::Settings():
|
||||
mSettingsConfig(new SettingsConfig())
|
||||
{
|
||||
}
|
||||
|
||||
Settings* Settings::getInstance()
|
||||
SettingsConfigPtr Globals::getSettingsConfig()
|
||||
{
|
||||
// According to C++11 Function-Local Initialization
|
||||
// of static variables is supposed to be thread safe
|
||||
// without risk of deadlocks.
|
||||
static Settings inst;
|
||||
|
||||
return &inst;
|
||||
return mSettingsConfig;
|
||||
}
|
||||
|
||||
SettingsConfigPtr Settings::getSettingsConfig()
|
||||
{
|
||||
return mSettingsConfig;
|
||||
}
|
||||
void Globals::resetSettingsConfig()
|
||||
{
|
||||
invalidateCallSites();
|
||||
mSettingsConfig = new SettingsConfig();
|
||||
}
|
||||
|
||||
void Settings::reset()
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
mSettingsConfig = new SettingsConfig();
|
||||
}
|
||||
LLError::SettingsStoragePtr Globals::saveAndResetSettingsConfig()
|
||||
{
|
||||
LLError::SettingsStoragePtr oldSettingsConfig(mSettingsConfig.get());
|
||||
resetSettingsConfig();
|
||||
return oldSettingsConfig;
|
||||
}
|
||||
|
||||
SettingsStoragePtr Settings::saveAndReset()
|
||||
{
|
||||
SettingsStoragePtr oldSettingsConfig(mSettingsConfig.get());
|
||||
reset();
|
||||
return oldSettingsConfig;
|
||||
}
|
||||
|
||||
void Settings::restore(SettingsStoragePtr pSettingsStorage)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr newSettingsConfig(dynamic_cast<SettingsConfig *>(pSettingsStorage.get()));
|
||||
mSettingsConfig = newSettingsConfig;
|
||||
}
|
||||
void Globals::restore(LLError::SettingsStoragePtr pSettingsStorage)
|
||||
{
|
||||
invalidateCallSites();
|
||||
SettingsConfigPtr newSettingsConfig(dynamic_cast<SettingsConfig *>(pSettingsStorage.get()));
|
||||
mSettingsConfig = newSettingsConfig;
|
||||
}
|
||||
}
|
||||
|
||||
namespace LLError
|
||||
|
|
@ -775,7 +754,7 @@ namespace
|
|||
|
||||
void commonInit(const std::string& user_dir, const std::string& app_dir, bool log_to_stderr = true)
|
||||
{
|
||||
LLError::Settings::getInstance()->reset();
|
||||
Globals::getInstance()->resetSettingsConfig();
|
||||
|
||||
LLError::setDefaultLevel(LLError::LEVEL_INFO);
|
||||
LLError::setAlwaysFlush(true);
|
||||
|
|
@ -816,13 +795,13 @@ namespace LLError
|
|||
|
||||
void setFatalFunction(const FatalFunction& f)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
s->mCrashFunction = f;
|
||||
}
|
||||
|
||||
FatalFunction getFatalFunction()
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
return s->mCrashFunction;
|
||||
}
|
||||
|
||||
|
|
@ -833,72 +812,77 @@ namespace LLError
|
|||
|
||||
void setTimeFunction(TimeFunction f)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
s->mTimeFunction = f;
|
||||
}
|
||||
|
||||
void setDefaultLevel(ELevel level)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
s->mDefaultLevel = level;
|
||||
}
|
||||
|
||||
ELevel getDefaultLevel()
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
return s->mDefaultLevel;
|
||||
}
|
||||
|
||||
void setAlwaysFlush(bool flush)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
s->mLogAlwaysFlush = flush;
|
||||
}
|
||||
|
||||
bool getAlwaysFlush()
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
return s->mLogAlwaysFlush;
|
||||
}
|
||||
|
||||
void setEnabledLogTypesMask(U32 mask)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
s->mEnabledLogTypesMask = mask;
|
||||
}
|
||||
|
||||
U32 getEnabledLogTypesMask()
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
return s->mEnabledLogTypesMask;
|
||||
}
|
||||
|
||||
void setFunctionLevel(const std::string& function_name, ELevel level)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
s->mFunctionLevelMap[function_name] = level;
|
||||
}
|
||||
|
||||
void setClassLevel(const std::string& class_name, ELevel level)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
s->mClassLevelMap[class_name] = level;
|
||||
}
|
||||
|
||||
void setFileLevel(const std::string& file_name, ELevel level)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
s->mFileLevelMap[file_name] = level;
|
||||
}
|
||||
|
||||
void setTagLevel(const std::string& tag_name, ELevel level)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
s->mTagLevelMap[tag_name] = level;
|
||||
}
|
||||
|
||||
|
|
@ -943,8 +927,9 @@ namespace LLError
|
|||
{
|
||||
void configure(const LLSD& config)
|
||||
{
|
||||
Globals::getInstance()->invalidateCallSites();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
g->invalidateCallSites();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
|
||||
s->mFunctionLevelMap.clear();
|
||||
s->mClassLevelMap.clear();
|
||||
|
|
@ -1071,7 +1056,8 @@ namespace LLError
|
|||
{
|
||||
return;
|
||||
}
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
s->mRecorders.push_back(recorder);
|
||||
}
|
||||
|
||||
|
|
@ -1081,7 +1067,8 @@ namespace LLError
|
|||
{
|
||||
return;
|
||||
}
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
s->mRecorders.erase(std::remove(s->mRecorders.begin(), s->mRecorders.end(), recorder),
|
||||
s->mRecorders.end());
|
||||
}
|
||||
|
|
@ -1093,11 +1080,12 @@ namespace LLError
|
|||
// with a Recorders::iterator indicating the position of that entry in
|
||||
// mRecorders. The shared_ptr might be empty (operator!() returns true) if
|
||||
// there was no such RECORDER subclass instance in mRecorders.
|
||||
//
|
||||
// NOTE!!! Requires external mutex lock!!!
|
||||
template <typename RECORDER>
|
||||
std::pair<boost::shared_ptr<RECORDER>, Recorders::iterator>
|
||||
findRecorderPos()
|
||||
findRecorderPos(SettingsConfigPtr &s)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
// Since we promise to return an iterator, use a classic iterator
|
||||
// loop.
|
||||
auto end{s->mRecorders.end()};
|
||||
|
|
@ -1128,7 +1116,9 @@ namespace LLError
|
|||
template <typename RECORDER>
|
||||
boost::shared_ptr<RECORDER> findRecorder()
|
||||
{
|
||||
return findRecorderPos<RECORDER>().first;
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
return findRecorderPos<RECORDER>(s).first;
|
||||
}
|
||||
|
||||
// Remove an entry from SettingsConfig::mRecorders whose RecorderPtr
|
||||
|
|
@ -1137,10 +1127,11 @@ namespace LLError
|
|||
template <typename RECORDER>
|
||||
bool removeRecorder()
|
||||
{
|
||||
auto found = findRecorderPos<RECORDER>();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
auto found = findRecorderPos<RECORDER>(s);
|
||||
if (found.first)
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
s->mRecorders.erase(found.second);
|
||||
}
|
||||
return bool(found.first);
|
||||
|
|
@ -1239,10 +1230,11 @@ namespace
|
|||
{
|
||||
LL_PROFILE_ZONE_SCOPED
|
||||
LLError::ELevel level = site.mLevel;
|
||||
LLError::SettingsConfigPtr s = LLError::Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
|
||||
std::string escaped_message;
|
||||
|
||||
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
for (Recorders::const_iterator i = s->mRecorders.begin();
|
||||
i != s->mRecorders.end();
|
||||
++i)
|
||||
|
|
@ -1385,7 +1377,8 @@ namespace LLError
|
|||
return false;
|
||||
}
|
||||
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
Globals *g = Globals::getInstance();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
|
||||
s->mShouldLogCallCounter++;
|
||||
|
||||
|
|
@ -1415,7 +1408,7 @@ namespace LLError
|
|||
: false);
|
||||
|
||||
site.mCached = true;
|
||||
Globals::getInstance()->addCallSite(site);
|
||||
g->addCallSite(site);
|
||||
return site.mShouldLog = site.mLevel >= compareLevel;
|
||||
}
|
||||
|
||||
|
|
@ -1430,7 +1423,7 @@ namespace LLError
|
|||
}
|
||||
|
||||
Globals* g = Globals::getInstance();
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = g->getSettingsConfig();
|
||||
|
||||
std::string message = out.str();
|
||||
|
||||
|
|
@ -1475,12 +1468,12 @@ namespace LLError
|
|||
{
|
||||
SettingsStoragePtr saveAndResetSettings()
|
||||
{
|
||||
return Settings::getInstance()->saveAndReset();
|
||||
return Globals::getInstance()->saveAndResetSettingsConfig();
|
||||
}
|
||||
|
||||
void restoreSettings(SettingsStoragePtr pSettingsStorage)
|
||||
{
|
||||
return Settings::getInstance()->restore(pSettingsStorage);
|
||||
return Globals::getInstance()->restore(pSettingsStorage);
|
||||
}
|
||||
|
||||
std::string removePrefix(std::string& s, const std::string& p)
|
||||
|
|
@ -1526,7 +1519,7 @@ namespace LLError
|
|||
|
||||
int shouldLogCallCount()
|
||||
{
|
||||
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
return s->mShouldLogCallCounter;
|
||||
}
|
||||
|
||||
|
|
@ -1638,8 +1631,8 @@ bool debugLoggingEnabled(const std::string& tag)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLError::SettingsConfigPtr s = LLError::Settings::getInstance()->getSettingsConfig();
|
||||
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLError::ELevel level = LLError::LEVEL_DEBUG;
|
||||
bool res = checkLevelMap(s->mTagLevelMap, tag, level);
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
#include <cctype>
|
||||
// external library headers
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#if LL_WINDOWS
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
|
||||
|
|
@ -285,7 +284,7 @@ LLEventPump::LLEventPump(const std::string& name, bool tweak):
|
|||
// Register every new instance with LLEventPumps
|
||||
mRegistry(LLEventPumps::instance().getHandle()),
|
||||
mName(mRegistry.get()->registerNew(*this, name, tweak)),
|
||||
mSignal(boost::make_shared<LLStandardSignal>()),
|
||||
mSignal(std::make_shared<LLStandardSignal>()),
|
||||
mEnabled(true)
|
||||
{}
|
||||
|
||||
|
|
@ -317,14 +316,24 @@ void LLEventPump::clear()
|
|||
{
|
||||
// Destroy the original LLStandardSignal instance, replacing it with a
|
||||
// whole new one.
|
||||
mSignal = boost::make_shared<LLStandardSignal>();
|
||||
mSignal = std::make_shared<LLStandardSignal>();
|
||||
mConnections.clear();
|
||||
}
|
||||
|
||||
void LLEventPump::reset()
|
||||
{
|
||||
mSignal.reset();
|
||||
// Resetting mSignal is supposed to disconnect everything on its own
|
||||
// But due to crash on 'reset' added explicit cleanup to get more data
|
||||
ConnectionMap::const_iterator iter = mConnections.begin();
|
||||
ConnectionMap::const_iterator end = mConnections.end();
|
||||
while (iter!=end)
|
||||
{
|
||||
iter->second.disconnect();
|
||||
iter++;
|
||||
}
|
||||
mConnections.clear();
|
||||
|
||||
mSignal.reset();
|
||||
//mDeps.clear();
|
||||
}
|
||||
|
||||
|
|
@ -543,7 +552,7 @@ bool LLEventStream::post(const LLSD& event)
|
|||
// *stack* instance of the shared_ptr, ensuring that our heap
|
||||
// LLStandardSignal object will live at least until post() returns, even
|
||||
// if 'this' gets destroyed during the call.
|
||||
boost::shared_ptr<LLStandardSignal> signal(mSignal);
|
||||
std::shared_ptr<LLStandardSignal> signal(mSignal);
|
||||
// Let caller know if any one listener handled the event. This is mostly
|
||||
// useful when using LLEventStream as a listener for an upstream
|
||||
// LLEventPump.
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@
|
|||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/utility.hpp> // noncopyable
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/visit_each.hpp>
|
||||
|
|
@ -573,7 +571,7 @@ protected:
|
|||
const NameList& before);
|
||||
|
||||
/// implement the dispatching
|
||||
boost::shared_ptr<LLStandardSignal> mSignal;
|
||||
std::shared_ptr<LLStandardSignal> mSignal;
|
||||
|
||||
/// valve open?
|
||||
bool mEnabled;
|
||||
|
|
@ -747,14 +745,4 @@ private:
|
|||
LL_COMMON_API bool sendReply(const LLSD& reply, const LLSD& request,
|
||||
const std::string& replyKey="reply");
|
||||
|
||||
// Somewhat to my surprise, passing boost::bind(...boost::weak_ptr<T>...) to
|
||||
// listen() fails in Boost code trying to instantiate LLEventListener (i.e.
|
||||
// LLStandardSignal::slot_type) because the boost::get_pointer() utility function isn't
|
||||
// specialized for boost::weak_ptr. This remedies that omission.
|
||||
namespace boost
|
||||
{
|
||||
template <typename T>
|
||||
T* get_pointer(const weak_ptr<T>& ptr) { return shared_ptr<T>(ptr).get(); }
|
||||
}
|
||||
|
||||
#endif /* ! defined(LL_LLEVENTS_H) */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
* @file llregex.h
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2021, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLREGEX_H
|
||||
#define LLREGEX_H
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
template <typename S, typename M, typename R>
|
||||
LL_COMMON_API bool ll_regex_match(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename R>
|
||||
LL_COMMON_API bool ll_regex_match(const S& string, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename M, typename R>
|
||||
bool ll_regex_search(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename R>
|
||||
bool ll_regex_search(const S& string, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // LLREGEX_H
|
||||
|
|
@ -43,12 +43,12 @@
|
|||
#include "llerrorcontrol.h"
|
||||
#include "llevents.h"
|
||||
#include "llformat.h"
|
||||
#include "llregex.h"
|
||||
#include "lltimer.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
|
@ -101,39 +101,6 @@ static const F32 MEM_INFO_THROTTLE = 20;
|
|||
// dropped below the login framerate, we'd have very little additional data.
|
||||
static const F32 MEM_INFO_WINDOW = 10*60;
|
||||
|
||||
// Wrap boost::regex_match() with a function that doesn't throw.
|
||||
template <typename S, typename M, typename R>
|
||||
static bool regex_match_no_exc(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS("LLMemoryInfo") << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap boost::regex_search() with a function that doesn't throw.
|
||||
template <typename S, typename M, typename R>
|
||||
static bool regex_search_no_exc(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS("LLMemoryInfo") << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LLOSInfo::LLOSInfo() :
|
||||
mMajorVer(0), mMinorVer(0), mBuild(0), mOSVersionString("")
|
||||
{
|
||||
|
|
@ -384,7 +351,7 @@ LLOSInfo::LLOSInfo() :
|
|||
boost::smatch matched;
|
||||
|
||||
std::string glibc_version(gnu_get_libc_version());
|
||||
if ( regex_match_no_exc(glibc_version, matched, os_version_parse) )
|
||||
if ( ll_regex_match(glibc_version, matched, os_version_parse) )
|
||||
{
|
||||
LL_INFOS("AppInit") << "Using glibc version '" << glibc_version << "' as OS version" << LL_ENDL;
|
||||
|
||||
|
|
@ -1060,7 +1027,7 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||
while (std::getline(meminfo, line))
|
||||
{
|
||||
LL_DEBUGS("LLMemoryInfo") << line << LL_ENDL;
|
||||
if (regex_match_no_exc(line, matched, stat_rx))
|
||||
if (ll_regex_match(line, matched, stat_rx))
|
||||
{
|
||||
// e.g. "MemTotal: 4108424 kB"
|
||||
LLSD::String key(matched[1].first, matched[1].second);
|
||||
|
|
|
|||
|
|
@ -343,6 +343,11 @@ const std::string &LLDir::getDumpDir() const
|
|||
return LLDir::sDumpDir;
|
||||
}
|
||||
|
||||
bool LLDir::dumpDirExists() const
|
||||
{
|
||||
return !sDumpDir.empty();
|
||||
}
|
||||
|
||||
const std::string &LLDir::getPerAccountChatLogsDir() const
|
||||
{
|
||||
return mPerAccountChatLogsDir;
|
||||
|
|
@ -953,6 +958,11 @@ std::string LLDir::getScrubbedFileName(const std::string uncleanFileName)
|
|||
return name;
|
||||
}
|
||||
|
||||
std::string LLDir::getDumpLogsDirPath(const std::string &file_name)
|
||||
{
|
||||
return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "dump_logs", file_name);
|
||||
}
|
||||
|
||||
// static
|
||||
std::string LLDir::getForbiddenFileChars()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ class LLDir
|
|||
const std::string &getLindenUserDir() const; // Location of the Linden user dir.
|
||||
const std::string &getChatLogsDir() const; // Location of the chat logs dir.
|
||||
const std::string &getDumpDir() const; // Location of the per-run dump dir.
|
||||
bool dumpDirExists() const;
|
||||
const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir.
|
||||
const std::string &getTempDir() const; // Common temporary directory
|
||||
const std::string getCacheDir(bool get_default = false) const; // Location of the cache.
|
||||
|
|
@ -218,6 +219,8 @@ class LLDir
|
|||
// random filename in common temporary directory
|
||||
std::string getTempFilename() const;
|
||||
|
||||
static std::string getDumpLogsDirPath(const std::string &file_name = "");
|
||||
|
||||
// For producing safe download file names from potentially unsafe ones
|
||||
static std::string getScrubbedFileName(const std::string uncleanFileName);
|
||||
static std::string getForbiddenFileChars();
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#include "lldiriterator.h"
|
||||
|
||||
#include "fix_macros.h"
|
||||
#include "llregex.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
|||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
found = boost::regex_match(name, match, mFilterExp);
|
||||
found = ll_regex_match(name, match, mFilterExp);
|
||||
if (found)
|
||||
{
|
||||
fname = name;
|
||||
|
|
|
|||
|
|
@ -1493,7 +1493,7 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
|||
setDataAndSize(new_data, new_width, new_height, components);
|
||||
}
|
||||
}
|
||||
else
|
||||
else try
|
||||
{
|
||||
// copy out existing image data
|
||||
S32 temp_data_size = old_width * old_height * components;
|
||||
|
|
@ -1527,6 +1527,11 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (std::bad_alloc&) // for temp_buffer
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate temporary image buffer" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ bool LLSettingsBase::validate()
|
|||
|
||||
LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial)
|
||||
{
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 63));
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, _2, 63));
|
||||
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
|
||||
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
|
||||
static Validator validateType(SETTING_TYPE, false, LLSD::TypeString);
|
||||
|
|
@ -534,7 +534,7 @@ bool LLSettingsBase::Validator::verify(LLSD &data, U32 flags)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!mVerify.empty() && !mVerify(data[mName]))
|
||||
if (!mVerify.empty() && !mVerify(data[mName], flags))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Setting '" << mName << "' fails validation." << LL_ENDL;
|
||||
return false;
|
||||
|
|
@ -543,17 +543,17 @@ bool LLSettingsBase::Validator::verify(LLSD &data, U32 flags)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyColor(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyColor(LLSD &value, U32)
|
||||
{
|
||||
return (value.size() == 3 || value.size() == 4);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVector(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyVector(LLSD &value, U32, S32 length)
|
||||
{
|
||||
return (value.size() == length);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, U32, S32 length)
|
||||
{
|
||||
if (value.size() != length)
|
||||
return false;
|
||||
|
|
@ -596,7 +596,7 @@ bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, S32 length)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, LLSD minvals, LLSD maxvals)
|
||||
bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, U32, LLSD minvals, LLSD maxvals)
|
||||
{
|
||||
for (S32 index = 0; index < value.size(); ++index)
|
||||
{
|
||||
|
|
@ -619,12 +619,12 @@ bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, LLSD minvals, LL
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyQuaternion(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyQuaternion(LLSD &value, U32)
|
||||
{
|
||||
return (value.size() == 4);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value, U32)
|
||||
{
|
||||
if (value.size() != 4)
|
||||
return false;
|
||||
|
|
@ -642,7 +642,7 @@ bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, LLSD range)
|
||||
bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, U32, LLSD range)
|
||||
{
|
||||
F64 real = value.asReal();
|
||||
|
||||
|
|
@ -655,7 +655,7 @@ bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, LLSD range)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, LLSD range)
|
||||
bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, U32, LLSD range)
|
||||
{
|
||||
S32 ival = value.asInteger();
|
||||
|
||||
|
|
@ -668,7 +668,7 @@ bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, LLSD range)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, U32, S32 length)
|
||||
{
|
||||
std::string sval = value.asString();
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public:
|
|||
public:
|
||||
static const U32 VALIDATION_PARTIAL;
|
||||
|
||||
typedef boost::function<bool(LLSD &)> verify_pr;
|
||||
typedef boost::function<bool(LLSD &, U32)> verify_pr;
|
||||
|
||||
Validator(std::string name, bool required, LLSD::Type type, verify_pr verify = verify_pr(), LLSD defval = LLSD()) :
|
||||
mName(name),
|
||||
|
|
@ -287,15 +287,15 @@ public:
|
|||
bool verify(LLSD &data, U32 flags);
|
||||
|
||||
// Some basic verifications
|
||||
static bool verifyColor(LLSD &value);
|
||||
static bool verifyVector(LLSD &value, S32 length);
|
||||
static bool verifyVectorMinMax(LLSD &value, LLSD minvals, LLSD maxvals);
|
||||
static bool verifyVectorNormalized(LLSD &value, S32 length);
|
||||
static bool verifyQuaternion(LLSD &value);
|
||||
static bool verifyQuaternionNormal(LLSD &value);
|
||||
static bool verifyFloatRange(LLSD &value, LLSD range);
|
||||
static bool verifyIntegerRange(LLSD &value, LLSD range);
|
||||
static bool verifyStringLength(LLSD &value, S32 length);
|
||||
static bool verifyColor(LLSD &value, U32 flags);
|
||||
static bool verifyVector(LLSD &value, U32 flags, S32 length);
|
||||
static bool verifyVectorMinMax(LLSD &value, U32 flags, LLSD minvals, LLSD maxvals);
|
||||
static bool verifyVectorNormalized(LLSD &value, U32 flags, S32 length);
|
||||
static bool verifyQuaternion(LLSD &value, U32 flags);
|
||||
static bool verifyQuaternionNormal(LLSD &value, U32 flags);
|
||||
static bool verifyFloatRange(LLSD &value, U32 flags, LLSD range);
|
||||
static bool verifyIntegerRange(LLSD &value, U32 flags, LLSD range);
|
||||
static bool verifyStringLength(LLSD &value, U32 flags, S32 length);
|
||||
|
||||
private:
|
||||
std::string mName;
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ void LLSettingsDay::blend(const LLSettingsBase::ptr_t &other, F64 mix)
|
|||
|
||||
namespace
|
||||
{
|
||||
bool validateDayCycleTrack(LLSD &value)
|
||||
bool validateDayCycleTrack(LLSD &value, U32 flags)
|
||||
{
|
||||
// Trim extra tracks.
|
||||
while (value.size() > LLSettingsDay::TRACK_MAX)
|
||||
|
|
@ -529,7 +529,7 @@ namespace
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateDayCycleFrames(LLSD &value)
|
||||
bool validateDayCycleFrames(LLSD &value, U32 flags)
|
||||
{
|
||||
bool hasSky(false);
|
||||
bool hasWater(false);
|
||||
|
|
@ -542,7 +542,7 @@ namespace
|
|||
if (ftype == "sky")
|
||||
{
|
||||
LLSettingsSky::validation_list_t valid_sky = LLSettingsSky::validationList();
|
||||
LLSD res_sky = LLSettingsBase::settingValidation(frame, valid_sky);
|
||||
LLSD res_sky = LLSettingsBase::settingValidation(frame, valid_sky, flags);
|
||||
|
||||
if (res_sky["success"].asInteger() == 0)
|
||||
{
|
||||
|
|
@ -555,7 +555,7 @@ namespace
|
|||
else if (ftype == "water")
|
||||
{
|
||||
LLSettingsWater::validation_list_t valid_h2o = LLSettingsWater::validationList();
|
||||
LLSD res_h2o = LLSettingsBase::settingValidation(frame, valid_h2o);
|
||||
LLSD res_h2o = LLSettingsBase::settingValidation(frame, valid_h2o, flags);
|
||||
if (res_h2o["success"].asInteger() == 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Water setting named '" << (*itf).first << "' validation failed!: " << res_h2o << LL_ENDL;
|
||||
|
|
@ -571,18 +571,20 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
if (!hasSky)
|
||||
if ((flags & LLSettingsBase::Validator::VALIDATION_PARTIAL) == 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No skies defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
if (!hasSky)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No skies defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!hasWater)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No waters defined." << LL_ENDL;
|
||||
return false;
|
||||
if (!hasWater)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No waters defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,29 +151,29 @@ LLSettingsSky::validation_list_t legacyHazeValidationList()
|
|||
if (legacyHazeValidation.empty())
|
||||
{
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_AMBIENT, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_BLUE_DENSITY, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_BLUE_HORIZON, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_DENSITY, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_HORIZON, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
// <FS:Beq> FIRE-29682 Allow full range density multipliers
|
||||
// legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
|
||||
// boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(2.0f)))));
|
||||
// boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0001f)(2.0f)))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0000001f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0000001f)(2.0f)))));
|
||||
// </FS:Beq>
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DISTANCE_MULTIPLIER, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(1000.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0001f)(1000.0f)))));
|
||||
}
|
||||
return legacyHazeValidation;
|
||||
}
|
||||
|
|
@ -184,19 +184,19 @@ LLSettingsSky::validation_list_t rayleighValidationList()
|
|||
if (rayleighValidation.empty())
|
||||
{
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return rayleighValidation;
|
||||
}
|
||||
|
|
@ -207,19 +207,19 @@ LLSettingsSky::validation_list_t absorptionValidationList()
|
|||
if (absorptionValidation.empty())
|
||||
{
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return absorptionValidation;
|
||||
}
|
||||
|
|
@ -230,31 +230,31 @@ LLSettingsSky::validation_list_t mieValidationList()
|
|||
if (mieValidation.empty())
|
||||
{
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return mieValidation;
|
||||
}
|
||||
|
||||
bool validateLegacyHaze(LLSD &value)
|
||||
bool validateLegacyHaze(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsSky::validation_list_t legacyHazeValidations = legacyHazeValidationList();
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, legacyHazeValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, legacyHazeValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Legacy Haze Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -268,7 +268,7 @@ bool validateLegacyHaze(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateRayleighLayers(LLSD &value)
|
||||
bool validateRayleighLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsSky::validation_list_t rayleighValidations = rayleighValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -279,24 +279,24 @@ bool validateRayleighLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateRayleighLayers(layerConfig))
|
||||
if (!validateRayleighLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateRayleighLayers(layerConfig);
|
||||
return validateRayleighLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, rayleighValidations);
|
||||
return LLSettingsBase::settingValidation(value, rayleighValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, rayleighValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, rayleighValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Rayleigh Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -310,7 +310,7 @@ bool validateRayleighLayers(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateAbsorptionLayers(LLSD &value)
|
||||
bool validateAbsorptionLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsBase::validation_list_t absorptionValidations = absorptionValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -321,24 +321,24 @@ bool validateAbsorptionLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateAbsorptionLayers(layerConfig))
|
||||
if (!validateAbsorptionLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateAbsorptionLayers(layerConfig);
|
||||
return validateAbsorptionLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, absorptionValidations);
|
||||
return LLSettingsBase::settingValidation(value, absorptionValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, absorptionValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, absorptionValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Absorption Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -352,7 +352,7 @@ bool validateAbsorptionLayers(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateMieLayers(LLSD &value)
|
||||
bool validateMieLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsBase::validation_list_t mieValidations = mieValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -363,23 +363,23 @@ bool validateMieLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateMieLayers(layerConfig))
|
||||
if (!validateMieLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateMieLayers(layerConfig);
|
||||
return validateMieLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, mieValidations);
|
||||
return LLSettingsBase::settingValidation(value, mieValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
LLSD result = LLSettingsBase::settingValidation(value, mieValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, mieValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Mie Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -559,80 +559,80 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
|
|||
validation.push_back(Validator(SETTING_HALO_TEXTUREID, false, LLSD::TypeUUID));
|
||||
|
||||
validation.push_back(Validator(SETTING_CLOUD_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY1, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(3.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY2, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SCALE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.001f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.001f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SCROLL_RATE, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-50.0f)(-50.0f)),
|
||||
LLSD(LLSDArray(50.0f)(50.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SHADOW, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_TEXTUREID, false, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_CLOUD_VARIANCE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_DOME_OFFSET, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_DOME_RADIUS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(2000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(2000.0f)))));
|
||||
validation.push_back(Validator(SETTING_GAMMA, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_GLOW, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.2f)("*")(-10.0f)("*")),
|
||||
LLSD(LLSDArray(40.0f)("*")(10.0f)("*")))));
|
||||
|
||||
validation.push_back(Validator(SETTING_MAX_Y, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(10000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(10000.0f)))));
|
||||
validation.push_back(Validator(SETTING_MOON_ROTATION, true, LLSD::TypeArray, &Validator::verifyQuaternionNormal));
|
||||
validation.push_back(Validator(SETTING_MOON_SCALE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
validation.push_back(Validator(SETTING_MOON_TEXTUREID, false, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_MOON_BRIGHTNESS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_STAR_BRIGHTNESS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(500.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(500.0f)))));
|
||||
validation.push_back(Validator(SETTING_SUNLIGHT_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_SUN_ROTATION, true, LLSD::TypeArray, &Validator::verifyQuaternionNormal));
|
||||
validation.push_back(Validator(SETTING_SUN_SCALE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
validation.push_back(Validator(SETTING_SUN_TEXTUREID, false, LLSD::TypeUUID));
|
||||
|
||||
validation.push_back(Validator(SETTING_PLANET_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_BOTTOM_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_TOP_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SUN_ARC_RADIANS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.1f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(0.1f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_MOISTURE_LEVEL, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_DROPLET_RADIUS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(5.0f)(1000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(5.0f)(1000.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_ICE_LEVEL, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_RAYLEIGH_CONFIG, true, LLSD::TypeArray, &validateRayleighLayers));
|
||||
validation.push_back(Validator(SETTING_ABSORPTION_CONFIG, true, LLSD::TypeArray, &validateAbsorptionLayers));
|
||||
|
|
|
|||
|
|
@ -228,34 +228,34 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList()
|
|||
// in deeply nested arrays like this [[[[[[[[[[v1,v2,v3]]]]]]]]]]
|
||||
|
||||
validation.push_back(Validator(SETTING_BLUR_MULTIPLIER, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(-0.5f)(0.5f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-0.5f)(0.5f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)(1.0f)),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_DENSITY, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(-10.0f)(10.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-10.0f)(10.0f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_MOD, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_FRESNEL_OFFSET, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_FRESNEL_SCALE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_NORMAL_MAP, true, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_NORMAL_SCALE, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)),
|
||||
LLSD(LLSDArray(10.0f)(10.0f)(10.0f)))));
|
||||
validation.push_back(Validator(SETTING_SCALE_ABOVE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_SCALE_BELOW, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_WAVE1_DIR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-20.0f)(-20.0f)),
|
||||
LLSD(LLSDArray(20.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_WAVE2_DIR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-20.0f)(-20.0f)),
|
||||
LLSD(LLSDArray(20.0f)(20.0f)))));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,6 +172,71 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name,
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPacker::unpackU16s(U16 *values, S32 count, const char *name)
|
||||
{
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
if (!unpackU16(values[idx], name))
|
||||
{
|
||||
LL_WARNS("DATAPACKER") << "Buffer overflow reading Unsigned 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLDataPacker::unpackS16s(S16 *values, S32 count, const char *name)
|
||||
{
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
if (!unpackS16(values[idx], name))
|
||||
{
|
||||
LL_WARNS("DATAPACKER") << "Buffer overflow reading Signed 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLDataPacker::unpackF32s(F32 *values, S32 count, const char *name)
|
||||
{
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
if (!unpackF32(values[idx], name))
|
||||
{
|
||||
LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLDataPacker::unpackColor4Us(LLColor4U *values, S32 count, const char *name)
|
||||
{
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
if (!unpackColor4U(values[idx], name))
|
||||
{
|
||||
LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name)
|
||||
{
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
if (!unpackUUID(values[idx], name))
|
||||
{
|
||||
LL_WARNS("DATAPACKER") << "Buffer overflow reading UUIDs \"" << name << "\" at index " << idx << "!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// LLDataPackerBinaryBuffer implementation
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -339,6 +404,29 @@ BOOL LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name)
|
||||
{
|
||||
BOOL success = verifyLength(sizeof(S16), name);
|
||||
|
||||
if (mWriteEnabled && success)
|
||||
{
|
||||
htolememcpy(mCurBufferp, &value, MVT_S16, 2);
|
||||
}
|
||||
mCurBufferp += 2;
|
||||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name)
|
||||
{
|
||||
BOOL success = verifyLength(sizeof(S16), name);
|
||||
|
||||
if (success)
|
||||
{
|
||||
htolememcpy(&value, mCurBufferp, MVT_S16, 2);
|
||||
}
|
||||
mCurBufferp += 2;
|
||||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name)
|
||||
{
|
||||
|
|
@ -939,6 +1027,52 @@ BOOL LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name)
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name)
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
writeIndentedName(name);
|
||||
int numCopied = 0;
|
||||
if (mWriteEnabled)
|
||||
{
|
||||
numCopied = snprintf(mCurBufferp, getBufferSize() - getCurrentSize(), "%d\n", value); /* Flawfinder: ignore */
|
||||
}
|
||||
else
|
||||
{
|
||||
numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */
|
||||
}
|
||||
|
||||
// snprintf returns number of bytes that would have been written
|
||||
// had the output not being truncated. In that case, it will
|
||||
// return either -1 or value >= passed in size value . So a check needs to be added
|
||||
// to detect truncation, and if there is any, only account for the
|
||||
// actual number of bytes written..and not what could have been
|
||||
// written.
|
||||
if(numCopied < 0 || numCopied > getBufferSize() - getCurrentSize())
|
||||
{
|
||||
numCopied = getBufferSize() - getCurrentSize();
|
||||
LL_WARNS() << "LLDataPackerAsciiBuffer::packS16: val truncated: " << LL_ENDL;
|
||||
}
|
||||
|
||||
mCurBufferp += numCopied;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name)
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */
|
||||
if (!getValueStr(name, valuestr, DP_BUFSIZE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
S32 in_val;
|
||||
sscanf(valuestr, "%d", &in_val);
|
||||
value = in_val;
|
||||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name)
|
||||
{
|
||||
|
|
@ -1642,6 +1776,36 @@ BOOL LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name)
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerAsciiFile::packS16(const S16 value, const char *name)
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
writeIndentedName(name);
|
||||
if (mFP)
|
||||
{
|
||||
fprintf(mFP, "%d\n", value);
|
||||
}
|
||||
else if (mOutputStream)
|
||||
{
|
||||
*mOutputStream << "" << value << "\n";
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name)
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */
|
||||
if (!getValueStr(name, valuestr, DP_BUFSIZE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
S32 in_val;
|
||||
sscanf(valuestr, "%d", &in_val);
|
||||
value = in_val;
|
||||
return success;
|
||||
}
|
||||
|
||||
BOOL LLDataPackerAsciiFile::packU32(const U32 value, const char *name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ public:
|
|||
|
||||
virtual BOOL packU16(const U16 value, const char *name) = 0;
|
||||
virtual BOOL unpackU16(U16 &value, const char *name) = 0;
|
||||
BOOL unpackU16s(U16 *value, S32 count, const char *name);
|
||||
|
||||
virtual BOOL packS16(const S16 value, const char *name) = 0;
|
||||
virtual BOOL unpackS16(S16 &value, const char *name) = 0;
|
||||
BOOL unpackS16s(S16 *value, S32 count, const char *name);
|
||||
|
||||
virtual BOOL packU32(const U32 value, const char *name) = 0;
|
||||
virtual BOOL unpackU32(U32 &value, const char *name) = 0;
|
||||
|
|
@ -71,6 +76,7 @@ public:
|
|||
|
||||
virtual BOOL packF32(const F32 value, const char *name) = 0;
|
||||
virtual BOOL unpackF32(F32 &value, const char *name) = 0;
|
||||
BOOL unpackF32s(F32 *values, S32 count, const char *name);
|
||||
|
||||
// Packs a float into an integer, using the given size
|
||||
// and picks the right U* data type to pack into.
|
||||
|
|
@ -84,6 +90,7 @@ public:
|
|||
|
||||
virtual BOOL packColor4U(const LLColor4U &value, const char *name) = 0;
|
||||
virtual BOOL unpackColor4U(LLColor4U &value, const char *name) = 0;
|
||||
BOOL unpackColor4Us(LLColor4U *values, S32 count, const char *name);
|
||||
|
||||
virtual BOOL packVector2(const LLVector2 &value, const char *name) = 0;
|
||||
virtual BOOL unpackVector2(LLVector2 &value, const char *name) = 0;
|
||||
|
|
@ -96,6 +103,7 @@ public:
|
|||
|
||||
virtual BOOL packUUID(const LLUUID &value, const char *name) = 0;
|
||||
virtual BOOL unpackUUID(LLUUID &value, const char *name) = 0;
|
||||
BOOL unpackUUIDs(LLUUID *values, S32 count, const char *name);
|
||||
U32 getPassFlags() const { return mPassFlags; }
|
||||
void setPassFlags(U32 flags) { mPassFlags = flags; }
|
||||
protected:
|
||||
|
|
@ -141,6 +149,9 @@ public:
|
|||
/*virtual*/ BOOL packU16(const U16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU16(U16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packS16(const S16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackS16(S16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packU32(const U32 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU32(U32 &value, const char *name);
|
||||
|
||||
|
|
@ -258,6 +269,9 @@ public:
|
|||
/*virtual*/ BOOL packU16(const U16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU16(U16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packS16(const S16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackS16(S16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packU32(const U32 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU32(U32 &value, const char *name);
|
||||
|
||||
|
|
@ -386,6 +400,9 @@ public:
|
|||
/*virtual*/ BOOL packU16(const U16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU16(U16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packS16(const S16 value, const char *name);
|
||||
/*virtual*/ BOOL unpackS16(S16 &value, const char *name);
|
||||
|
||||
/*virtual*/ BOOL packU32(const U32 value, const char *name);
|
||||
/*virtual*/ BOOL unpackU32(U32 &value, const char *name);
|
||||
|
||||
|
|
|
|||
|
|
@ -281,6 +281,13 @@ char const* const _PREHASH_PricePerMeter = LLMessageStringTable::getInstance()->
|
|||
char const* const _PREHASH_RegionFlags = LLMessageStringTable::getInstance()->getString("RegionFlags");
|
||||
char const* const _PREHASH_RegionFlagsExtended = LLMessageStringTable::getInstance()->getString("RegionFlagsExtended");
|
||||
char const* const _PREHASH_RegionProtocols = LLMessageStringTable::getInstance()->getString("RegionProtocols");
|
||||
char const* const _PREHASH_ChatWhisperRange = LLMessageStringTable::getInstance()->getString("ChatWhisperRange");
|
||||
char const* const _PREHASH_ChatNormalRange = LLMessageStringTable::getInstance()->getString("ChatNormalRange");
|
||||
char const* const _PREHASH_ChatShoutRange = LLMessageStringTable::getInstance()->getString("ChatShoutRange");
|
||||
char const* const _PREHASH_ChatWhisperOffset = LLMessageStringTable::getInstance()->getString("ChatWhisperOffset");
|
||||
char const* const _PREHASH_ChatNormalOffset = LLMessageStringTable::getInstance()->getString("ChatNormalOffset");
|
||||
char const* const _PREHASH_ChatShoutOffset = LLMessageStringTable::getInstance()->getString("ChatShoutOffset");
|
||||
char const* const _PREHASH_ChatFlags = LLMessageStringTable::getInstance()->getString("ChatFlags");
|
||||
char const* const _PREHASH_VoteResult = LLMessageStringTable::getInstance()->getString("VoteResult");
|
||||
char const* const _PREHASH_ParcelDirFeeEstimate = LLMessageStringTable::getInstance()->getString("ParcelDirFeeEstimate");
|
||||
char const* const _PREHASH_ModifyBlock = LLMessageStringTable::getInstance()->getString("ModifyBlock");
|
||||
|
|
@ -309,6 +316,7 @@ char const* const _PREHASH_DuplicateFlags = LLMessageStringTable::getInstance()-
|
|||
char const* const _PREHASH_RegionInfo2 = LLMessageStringTable::getInstance()->getString("RegionInfo2");
|
||||
char const* const _PREHASH_RegionInfo3 = LLMessageStringTable::getInstance()->getString("RegionInfo3");
|
||||
char const* const _PREHASH_RegionInfo4 = LLMessageStringTable::getInstance()->getString("RegionInfo4");
|
||||
char const* const _PREHASH_RegionInfo5 = LLMessageStringTable::getInstance()->getString("RegionInfo5");
|
||||
char const* const _PREHASH_TextColor = LLMessageStringTable::getInstance()->getString("TextColor");
|
||||
char const* const _PREHASH_SlaveID = LLMessageStringTable::getInstance()->getString("SlaveID");
|
||||
char const* const _PREHASH_Charter = LLMessageStringTable::getInstance()->getString("Charter");
|
||||
|
|
|
|||
|
|
@ -281,6 +281,13 @@ extern char const* const _PREHASH_PricePerMeter;
|
|||
extern char const* const _PREHASH_RegionFlags;
|
||||
extern char const* const _PREHASH_RegionFlagsExtended;
|
||||
extern char const* const _PREHASH_RegionProtocols;
|
||||
extern char const* const _PREHASH_ChatWhisperRange;
|
||||
extern char const* const _PREHASH_ChatNormalRange;
|
||||
extern char const* const _PREHASH_ChatShoutRange;
|
||||
extern char const* const _PREHASH_ChatWhisperOffset;
|
||||
extern char const* const _PREHASH_ChatNormalOffset;
|
||||
extern char const* const _PREHASH_ChatShoutOffset;
|
||||
extern char const* const _PREHASH_ChatFlags;
|
||||
extern char const* const _PREHASH_VoteResult;
|
||||
extern char const* const _PREHASH_ParcelDirFeeEstimate;
|
||||
extern char const* const _PREHASH_ModifyBlock;
|
||||
|
|
@ -309,6 +316,7 @@ extern char const* const _PREHASH_DuplicateFlags;
|
|||
extern char const* const _PREHASH_RegionInfo2;
|
||||
extern char const* const _PREHASH_RegionInfo3;
|
||||
extern char const* const _PREHASH_RegionInfo4;
|
||||
extern char const* const _PREHASH_RegionInfo5;
|
||||
extern char const* const _PREHASH_TextColor;
|
||||
extern char const* const _PREHASH_SlaveID;
|
||||
extern char const* const _PREHASH_Charter;
|
||||
|
|
|
|||
|
|
@ -285,11 +285,6 @@ const LLUUID SND_STONE_DIRT_04 ("c8091652-e04b-4a11-84ba-15dba06e7a1b");
|
|||
const LLUUID SND_STONE_STONE_02 ("ba4ef5ac-7435-4240-b826-c24ba8fa5a78");
|
||||
const LLUUID SND_STONE_STONE_04 ("ea296329-0f09-4993-af1b-e6784bab1dc9");
|
||||
|
||||
// NaCl - Antispam Registry. The following sounds will be ignored for purposes of spam protection. They have been gathered from wiki documentation of frequent official sounds.
|
||||
const std::string COLLISION_SOUNDS[] ={"dce5fdd4-afe4-4ea1-822f-dd52cac46b08","51011582-fbca-4580-ae9e-1a5593f094ec","68d62208-e257-4d0c-bbe2-20c9ea9760bb","75872e8c-bc39-451b-9b0b-042d7ba36cba","6a45ba0b-5775-4ea8-8513-26008a17f873","992a6d1b-8c77-40e0-9495-4098ce539694","2de4da5a-faf8-46be-bac6-c4d74f1e5767","6e3fb0f7-6d9c-42ca-b86b-1122ff562d7d","14209133-4961-4acc-9649-53fc38ee1667","bc4a4348-cfcc-4e5e-908e-8a52a8915fe6","9e5c1297-6eed-40c0-825a-d9bcd86e3193","e534761c-1894-4b61-b20c-658a6fb68157","8761f73f-6cf9-4186-8aaa-0948ed002db1","874a26fd-142f-4173-8c5b-890cd846c74d","0e24a717-b97e-4b77-9c94-b59a5a88b2da","75cf3ade-9a5b-4c4d-bb35-f9799bda7fb2","153c8bf7-fb89-4d89-b263-47e58b1b4774","55c3e0ce-275a-46fa-82ff-e0465f5e8703","24babf58-7156-4841-9a3f-761bdbb8e237","aca261d8-e145-4610-9e20-9eff990f2c12","0642fba6-5dcf-4d62-8e7b-94dbb529d117","25a863e8-dc42-4e8a-a357-e76422ace9b5","9538f37c-456e-4047-81be-6435045608d4","8c0f84c3-9afd-4396-b5f5-9bca2c911c20","be582e5d-b123-41a2-a150-454c39e961c8","c70141d4-ba06-41ea-bcbc-35ea81cb8335","7d1826f4-24c4-4aac-8c2e-eff45df37783","063c97d3-033a-4e9b-98d8-05c8074922cb","00000000-0000-0000-0000-000000000120"};
|
||||
const int COLLISION_SOUNDS_SIZE=29;
|
||||
// NaCl End
|
||||
|
||||
|
||||
|
||||
// extra guids
|
||||
|
|
|
|||
|
|
@ -286,9 +286,4 @@ extern const LLUUID SND_STONE_DIRT_04;
|
|||
extern const LLUUID SND_STONE_STONE_02;
|
||||
extern const LLUUID SND_STONE_STONE_04;
|
||||
|
||||
// NaCl - Antispam Registry
|
||||
extern const std::string COLLISION_SOUNDS[];
|
||||
extern const int COLLISION_SOUNDS_SIZE;
|
||||
// NaCl End
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -696,6 +696,66 @@ bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD
|
|||
return true;
|
||||
}
|
||||
|
||||
// This function injects a previously stored OpenID cookie into
|
||||
// each new media instance - see SL-15867 for details. It appears
|
||||
// that the way we use the cache, shared between multiple CEF
|
||||
// instances means that sometimes the OpenID cookie cannot be read
|
||||
// even though it appears to be there. The long term solution to
|
||||
// this is to create a separate cache directory for each instance
|
||||
// but that has its own set of problems. This short term approach
|
||||
// "forces" each new media instance to have a copy of the cookie
|
||||
// so that a page that needs it - e.g. Profiles - finds it and
|
||||
// can log in successfully.
|
||||
void LLPluginClassMedia::injectOpenIDCookie()
|
||||
{
|
||||
// can be called before we know who the user is at login
|
||||
// and there is no OpenID cookie at that point so no
|
||||
// need to try to set it (these values will all be empty)
|
||||
if (sOIDcookieName.length() && sOIDcookieValue.length())
|
||||
{
|
||||
setCookie(sOIDcookieUrl, sOIDcookieName,
|
||||
sOIDcookieValue, sOIDcookieHost, sOIDcookiePath, sOIDcookieHttpOnly, sOIDcookieSecure);
|
||||
}
|
||||
}
|
||||
|
||||
// We store each component of the OpenI cookie individuality here
|
||||
// because previously, there was some significant parsing to
|
||||
// break up the raw string into these components and we do not
|
||||
// want to have to do that again here. Stored as statics because
|
||||
// we want to share their value between all instances of this
|
||||
// class - the ones that receive it at login and any others
|
||||
// that open afterwards (e.g. the Profiles floater)
|
||||
std::string LLPluginClassMedia::sOIDcookieUrl = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieName = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieValue = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieHost = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookiePath = std::string();
|
||||
bool LLPluginClassMedia::sOIDcookieHttpOnly = false;
|
||||
bool LLPluginClassMedia::sOIDcookieSecure = false;
|
||||
|
||||
// Once we receive the OpenID cookie, it is parsed/processed
|
||||
// in llViewerMedia::parseRawCookie() and then the component
|
||||
// values are stored here so that next time a new media
|
||||
// instance is created, we can use injectOpenIDCookie()
|
||||
// to "insist" that the cookie store remember its value.
|
||||
// One might ask why we need to go via LLViewerMedia (which
|
||||
// makes this call) - this is because the raw cookie arrives
|
||||
// here in this file but undergoes non-trivial processing
|
||||
// in LLViewerMedia.
|
||||
void LLPluginClassMedia::storeOpenIDCookie(const std::string url,
|
||||
const std::string name, const std::string value,
|
||||
const std::string host, const std::string path,
|
||||
bool httponly, bool secure)
|
||||
{
|
||||
sOIDcookieUrl = url;
|
||||
sOIDcookieName = name;
|
||||
sOIDcookieValue = value;
|
||||
sOIDcookieHost = host;
|
||||
sOIDcookiePath = path;
|
||||
sOIDcookieHttpOnly = httponly;
|
||||
sOIDcookieSecure = secure;
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_cookie");
|
||||
|
|
|
|||
|
|
@ -135,6 +135,20 @@ public:
|
|||
// Text may be unicode (utf8 encoded)
|
||||
bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
|
||||
|
||||
static std::string sOIDcookieUrl;
|
||||
static std::string sOIDcookieName;
|
||||
static std::string sOIDcookieValue;
|
||||
static std::string sOIDcookieHost;
|
||||
static std::string sOIDcookiePath;
|
||||
static bool sOIDcookieHttpOnly;
|
||||
static bool sOIDcookieSecure;
|
||||
void storeOpenIDCookie(const std::string url,
|
||||
const std::string name, const std::string value,
|
||||
const std::string host, const std::string path,
|
||||
bool httponly, bool secure);
|
||||
|
||||
void injectOpenIDCookie();
|
||||
|
||||
void setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure);
|
||||
|
||||
void loadURI(const std::string &uri);
|
||||
|
|
|
|||
|
|
@ -559,6 +559,23 @@ LLUUID LLMaterialTable::getCollisionSoundUUID(U8 mcode, U8 mcode2)
|
|||
}
|
||||
}
|
||||
|
||||
bool LLMaterialTable::isCollisionSound(const LLUUID &uuid)
|
||||
{
|
||||
for (U8 i = 0; i < LL_MCODE_END; i++)
|
||||
{
|
||||
for (U8 j = 0; j < LL_MCODE_END; j++)
|
||||
{
|
||||
i &= LL_MCODE_MASK;
|
||||
j &= LL_MCODE_MASK;
|
||||
if (mCollisionSoundMatrix[i * LL_MCODE_END + j] == uuid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID LLMaterialTable::getSlidingSoundUUID(U8 mcode, U8 mcode2)
|
||||
{
|
||||
mcode &= LL_MCODE_MASK;
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ public:
|
|||
F32 getDamageMod(U8 mcode);
|
||||
F32 getEPMod(U8 mcode);
|
||||
|
||||
bool isCollisionSound(const LLUUID &uuid);
|
||||
|
||||
LLUUID getCollisionSoundUUID(U8 mcode, U8 mcode2);
|
||||
LLUUID getSlidingSoundUUID(U8 mcode, U8 mcode2);
|
||||
LLUUID getRollingSoundUUID(U8 mcode, U8 mcode2);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@
|
|||
#include "linden_common.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "lllslconstants.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include "llregex.h"
|
||||
|
||||
// LLSD key defines
|
||||
// DO NOT REORDER OR REMOVE THESE!
|
||||
|
|
@ -456,7 +455,7 @@ static bool pattern_match(const std::string &candidate_str, const std::string &p
|
|||
|
||||
// case-insensitive matching:
|
||||
boost::regex regexp(expression, boost::regex::perl|boost::regex::icase);
|
||||
return boost::regex_match(candidate_str, regexp);
|
||||
return ll_regex_match(candidate_str, regexp);
|
||||
}
|
||||
|
||||
bool LLMediaEntry::checkCandidateUrl(const std::string& url) const
|
||||
|
|
|
|||
|
|
@ -122,6 +122,35 @@ const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; //
|
|||
// can't be divided by 2. See DEV-19108
|
||||
const F32 TEXTURE_ROTATION_PACK_FACTOR = ((F32) 0x08000);
|
||||
|
||||
struct material_id_type // originally from llrendermaterialtable
|
||||
{
|
||||
material_id_type()
|
||||
{
|
||||
memset((void*)m_value, 0, sizeof(m_value));
|
||||
}
|
||||
|
||||
bool operator==(const material_id_type& other) const
|
||||
{
|
||||
return (memcmp(m_value, other.m_value, sizeof(m_value)) == 0);
|
||||
}
|
||||
|
||||
bool operator!=(const material_id_type& other) const
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool isNull() const
|
||||
{
|
||||
return (memcmp(m_value, s_null_id, sizeof(m_value)) == 0);
|
||||
}
|
||||
|
||||
U8 m_value[MATERIAL_ID_SIZE]; // server side this is MD5RAW_BYTES
|
||||
|
||||
static const U8 s_null_id[MATERIAL_ID_SIZE];
|
||||
};
|
||||
|
||||
const U8 material_id_type::s_null_id[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
|
||||
//static
|
||||
// LEGACY: by default we use the LLVolumeMgr::gVolumeMgr global
|
||||
// TODO -- eliminate this global from the codebase!
|
||||
|
|
@ -1092,50 +1121,85 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa
|
|||
return (S32)(cur_ptr - start_loc);
|
||||
}
|
||||
|
||||
S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type)
|
||||
namespace
|
||||
{
|
||||
U8 *start_loc = cur_ptr;
|
||||
U64 i;
|
||||
htolememcpy(data_ptr,cur_ptr, type,data_size);
|
||||
cur_ptr += data_size;
|
||||
template< typename T >
|
||||
bool unpack_TEField(T dest[], U8 dest_count, U8 * &source, U8 *source_end, EMsgVariableType type)
|
||||
{
|
||||
const size_t size(sizeof(T));
|
||||
|
||||
for (i = 1; i < face_count; i++)
|
||||
{
|
||||
// Already unswizzled, don't need to unswizzle it again!
|
||||
memcpy(data_ptr+(i*data_size),data_ptr,data_size); /* Flawfinder: ignore */
|
||||
}
|
||||
|
||||
while ((cur_ptr < buffer_end) && (*cur_ptr != 0))
|
||||
{
|
||||
LL_DEBUGS("TEFieldDecode") << "TE exception" << LL_ENDL;
|
||||
i = 0;
|
||||
while (*cur_ptr & 0x80)
|
||||
{
|
||||
i |= ((*cur_ptr++) & 0x7F);
|
||||
i = i << 7;
|
||||
}
|
||||
LL_DEBUGS("TEXTUREENTRY") << "Request to read items of size " << size << " with swizzle " << type << " froum buffer sized " << (source_end - source) << LL_ENDL;
|
||||
|
||||
i |= *cur_ptr++;
|
||||
if ((source + size + 1) > source_end)
|
||||
{
|
||||
// we add 1 above to take into account the byte that we know must follow the value.
|
||||
LL_WARNS("TEXTUREENTRY") << "Buffer exhausted! Requires " << size << " + 1 bytes for default, " << (source_end - source) << " bytes remaning." << LL_ENDL;
|
||||
source = source_end;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (S32 j = 0; j < face_count; j++)
|
||||
{
|
||||
if (i & 0x01)
|
||||
{
|
||||
htolememcpy(data_ptr+(j*data_size),cur_ptr,type,data_size);
|
||||
LL_DEBUGS("TEFieldDecode") << "Assigning " ;
|
||||
char foo[64];
|
||||
sprintf(foo,"%x %x",*(data_ptr+(j*data_size)), *(data_ptr+(j*data_size)+1));
|
||||
LL_CONT << foo << " to face " << j << LL_ENDL;
|
||||
}
|
||||
i = i >> 1;
|
||||
}
|
||||
cur_ptr += data_size;
|
||||
}
|
||||
llassert(cur_ptr <= buffer_end); // buffer underrun
|
||||
return (S32)(cur_ptr - start_loc);
|
||||
// Extract the default value and fill the array.
|
||||
htolememcpy(dest, source, type, size);
|
||||
source += size;
|
||||
for (S32 idx = 1; idx < dest_count; ++idx)
|
||||
{
|
||||
dest[idx] = dest[0];
|
||||
}
|
||||
|
||||
while (source < source_end)
|
||||
{
|
||||
U64 index_flags(0);
|
||||
U8 sbit(0);
|
||||
|
||||
// Unpack the variable length bitfield. Each bit represents whether the following
|
||||
// value will be placed at the corresponding array index.
|
||||
do
|
||||
{
|
||||
if (source >= source_end)
|
||||
{
|
||||
LL_WARNS("TEXTUREENTRY") << "Buffer exhausted! Reading index flags." << LL_ENDL;
|
||||
source = source_end;
|
||||
return false;
|
||||
}
|
||||
|
||||
sbit = *source++;
|
||||
index_flags <<= 7; // original code had this after?
|
||||
index_flags |= (sbit & 0x7F);
|
||||
} while (sbit & 0x80);
|
||||
|
||||
if (!index_flags)
|
||||
{ // We've hit the terminating 0 byte.
|
||||
break;
|
||||
}
|
||||
|
||||
if ((source + size + 1) > source_end)
|
||||
{
|
||||
// we add 1 above to take into account the byte that we know must follow the value.
|
||||
LL_WARNS("TEXTUREENTRY") << "Buffer exhausted! Requires " << size << " + 1 bytes for default, " << (source_end - source) << " bytes remaning." << LL_ENDL;
|
||||
source = source_end;
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the value for the indexs.
|
||||
T value;
|
||||
htolememcpy(&value, source, type, size);
|
||||
source += size;
|
||||
|
||||
for (S32 idx = 0; idx < dest_count; idx++)
|
||||
{
|
||||
if (index_flags & 1ULL << idx)
|
||||
{
|
||||
dest[idx] = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Pack information about all texture entries into container:
|
||||
// { TextureEntry Variable 2 }
|
||||
// Includes information about image ID, color, scale S,T, offset S,T and rotation
|
||||
|
|
@ -1312,9 +1376,9 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
|
|||
S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num, LLTEContents& tec)
|
||||
{
|
||||
S32 retval = 0;
|
||||
// temp buffer for material ID processing
|
||||
// data will end up in tec.material_id[]
|
||||
U8 material_data[LLTEContents::MAX_TES*16];
|
||||
// temp buffer for material ID processing
|
||||
// data will end up in tec.material_id[]
|
||||
material_id_type material_data[LLTEContents::MAX_TES];
|
||||
|
||||
if (block_num < 0)
|
||||
{
|
||||
|
|
@ -1330,54 +1394,49 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name
|
|||
tec.face_count = 0;
|
||||
return retval;
|
||||
}
|
||||
else if (tec.size >= LLTEContents::MAX_TE_BUFFER)
|
||||
{
|
||||
LL_WARNS("TEXTUREENTRY") << "Excessive buffer size detected in Texture Entry! Truncating." << LL_ENDL;
|
||||
tec.size = LLTEContents::MAX_TE_BUFFER - 1;
|
||||
}
|
||||
|
||||
if (block_num < 0)
|
||||
{
|
||||
mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, 0, LLTEContents::MAX_TE_BUFFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER);
|
||||
}
|
||||
// if block_num < 0 ask for block 0
|
||||
mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, std::max(block_num, 0), LLTEContents::MAX_TE_BUFFER - 1);
|
||||
|
||||
|
||||
// The last field is not zero terminated.
|
||||
// Rather than special case the upack functions. Just make it 0x00 terminated.
|
||||
tec.packed_buffer[tec.size] = 0x00;
|
||||
++tec.size;
|
||||
|
||||
tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES);
|
||||
|
||||
U8 *cur_ptr = tec.packed_buffer;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_data, 16, tec.face_count, MVT_LLUUID);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.colors, 4, tec.face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.scale_s, 4, tec.face_count, MVT_F32);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.scale_t, 4, tec.face_count, MVT_F32);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.offset_s, 2, tec.face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.offset_t, 2, tec.face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_rot, 2, tec.face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.bump, 1, tec.face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.media_flags, 1, tec.face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.glow, 1, tec.face_count, MVT_U8);
|
||||
LL_DEBUGS("TEXTUREENTRY") << "Texture Entry with buffere sized: " << tec.size << LL_ENDL;
|
||||
U8 *buffer_end = tec.packed_buffer + tec.size;
|
||||
|
||||
if (cur_ptr < tec.packed_buffer + tec.size)
|
||||
if (!( unpack_TEField<LLUUID>(tec.image_data, tec.face_count, cur_ptr, buffer_end, MVT_LLUUID) &&
|
||||
unpack_TEField<LLColor4U>(tec.colors, tec.face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<F32>(tec.scale_s, tec.face_count, cur_ptr, buffer_end, MVT_F32) &&
|
||||
unpack_TEField<F32>(tec.scale_t, tec.face_count, cur_ptr, buffer_end, MVT_F32) &&
|
||||
unpack_TEField<S16>(tec.offset_s, tec.face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<S16>(tec.offset_t, tec.face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<S16>(tec.image_rot, tec.face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<U8>(tec.bump, tec.face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<U8>(tec.media_flags, tec.face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<U8>(tec.glow, tec.face_count, cur_ptr, buffer_end, MVT_U8)))
|
||||
{
|
||||
LL_WARNS("TEXTUREENTRY") << "Failure parsing Texture Entry Message due to malformed TE Field! Dropping changes on the floor. " << LL_ENDL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cur_ptr >= buffer_end || !unpack_TEField<material_id_type>(material_data, tec.face_count, cur_ptr, buffer_end, MVT_LLUUID))
|
||||
{
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)material_data, 16, tec.face_count, MVT_LLUUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(material_data, 0, sizeof(material_data));
|
||||
memset((void*)material_data, 0, sizeof(material_data));
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < tec.face_count; i++)
|
||||
{
|
||||
tec.material_ids[i].set(&material_data[i * 16]);
|
||||
tec.material_ids[i].set(&(material_data[i]));
|
||||
}
|
||||
|
||||
retval = 1;
|
||||
|
|
@ -1389,7 +1448,6 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
|
|||
S32 retval = 0;
|
||||
|
||||
LLColor4 color;
|
||||
LLColor4U coloru;
|
||||
for (U32 i = 0; i < tec.face_count; i++)
|
||||
{
|
||||
LLUUID& req_id = ((LLUUID*)tec.image_data)[i];
|
||||
|
|
@ -1402,20 +1460,15 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
|
|||
retval |= setTEGlow(i, (F32)tec.glow[i] / (F32)0xFF);
|
||||
retval |= setTEMaterialID(i, tec.material_ids[i]);
|
||||
|
||||
coloru = LLColor4U(tec.colors + 4*i);
|
||||
|
||||
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
|
||||
// as all zeros. However, the subtraction and addition must be done in unsigned
|
||||
// byte space, not in float space, otherwise off-by-one errors occur. JC
|
||||
color.mV[VRED] = F32(255 - coloru.mV[VRED]) / 255.f;
|
||||
color.mV[VGREEN] = F32(255 - coloru.mV[VGREEN]) / 255.f;
|
||||
color.mV[VBLUE] = F32(255 - coloru.mV[VBLUE]) / 255.f;
|
||||
color.mV[VALPHA] = F32(255 - coloru.mV[VALPHA]) / 255.f;
|
||||
color.mV[VRED] = F32(255 - tec.colors[i].mV[VRED]) / 255.f;
|
||||
color.mV[VGREEN] = F32(255 - tec.colors[i].mV[VGREEN]) / 255.f;
|
||||
color.mV[VBLUE] = F32(255 - tec.colors[i].mV[VBLUE]) / 255.f;
|
||||
color.mV[VALPHA] = F32(255 - tec.colors[i].mV[VALPHA]) / 255.f;
|
||||
|
||||
retval |= setTEColor(i, color);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
|
@ -1437,24 +1490,32 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
|||
const U32 MAX_TES = 45;
|
||||
|
||||
// Avoid construction of 32 UUIDs per call
|
||||
static LLUUID image_ids[MAX_TES];
|
||||
static LLMaterialID material_ids[MAX_TES];
|
||||
|
||||
U8 image_data[MAX_TES*16];
|
||||
U8 colors[MAX_TES*4];
|
||||
F32 scale_s[MAX_TES];
|
||||
F32 scale_t[MAX_TES];
|
||||
S16 offset_s[MAX_TES];
|
||||
S16 offset_t[MAX_TES];
|
||||
S16 image_rot[MAX_TES];
|
||||
U8 bump[MAX_TES];
|
||||
U8 media_flags[MAX_TES];
|
||||
U8 glow[MAX_TES];
|
||||
U8 material_data[MAX_TES*16];
|
||||
const U32 MAX_TE_BUFFER = 4096;
|
||||
U8 packed_buffer[MAX_TE_BUFFER];
|
||||
memset((void*)packed_buffer, 0, MAX_TE_BUFFER);
|
||||
|
||||
const U32 MAX_TE_BUFFER = 4096;
|
||||
U8 packed_buffer[MAX_TE_BUFFER];
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
LLUUID image_data[MAX_TES];
|
||||
LLColor4U colors[MAX_TES];
|
||||
F32 scale_s[MAX_TES];
|
||||
F32 scale_t[MAX_TES];
|
||||
S16 offset_s[MAX_TES];
|
||||
S16 offset_t[MAX_TES];
|
||||
S16 image_rot[MAX_TES];
|
||||
U8 bump[MAX_TES];
|
||||
U8 media_flags[MAX_TES];
|
||||
U8 glow[MAX_TES];
|
||||
material_id_type material_data[MAX_TES];
|
||||
|
||||
memset((void*)scale_s, 0, sizeof(scale_s));
|
||||
memset((void*)scale_t, 0, sizeof(scale_t));
|
||||
memset((void*)offset_s, 0, sizeof(offset_s));
|
||||
memset((void*)offset_t, 0, sizeof(offset_t));
|
||||
memset((void*)image_rot, 0, sizeof(image_rot));
|
||||
memset((void*)bump, 0, sizeof(bump));
|
||||
memset((void*)media_flags, 0, sizeof(media_flags));
|
||||
memset((void*)glow, 0, sizeof(glow));
|
||||
|
||||
S32 size;
|
||||
U32 face_count = 0;
|
||||
|
|
@ -1470,50 +1531,52 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
|||
{
|
||||
return retval;
|
||||
}
|
||||
else if (size >= MAX_TE_BUFFER)
|
||||
{
|
||||
LL_WARNS("TEXTUREENTRY") << "Excessive buffer size detected in Texture Entry! Truncating." << LL_ENDL;
|
||||
size = MAX_TE_BUFFER - 1;
|
||||
}
|
||||
|
||||
// The last field is not zero terminated.
|
||||
// Rather than special case the upack functions. Just make it 0x00 terminated.
|
||||
packed_buffer[size] = 0x00;
|
||||
++size;
|
||||
face_count = llmin((U32) getNumTEs(), MAX_TES);
|
||||
U32 i;
|
||||
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 4, face_count, MVT_F32);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 4, face_count, MVT_F32);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_t, 2, face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_rot, 2, face_count, MVT_S16Array);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
|
||||
if (cur_ptr < packed_buffer + size)
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
LL_DEBUGS("TEXTUREENTRY") << "Texture Entry with buffer sized: " << size << LL_ENDL;
|
||||
U8 *buffer_end = packed_buffer + size;
|
||||
|
||||
if (!( unpack_TEField<LLUUID>(image_data, face_count, cur_ptr, buffer_end, MVT_LLUUID) &&
|
||||
unpack_TEField<LLColor4U>(colors, face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<F32>(scale_s, face_count, cur_ptr, buffer_end, MVT_F32) &&
|
||||
unpack_TEField<F32>(scale_t, face_count, cur_ptr, buffer_end, MVT_F32) &&
|
||||
unpack_TEField<S16>(offset_s, face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<S16>(offset_t, face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<S16>(image_rot, face_count, cur_ptr, buffer_end, MVT_S16) &&
|
||||
unpack_TEField<U8>(bump, face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<U8>(media_flags, face_count, cur_ptr, buffer_end, MVT_U8) &&
|
||||
unpack_TEField<U8>(glow, face_count, cur_ptr, buffer_end, MVT_U8)))
|
||||
{
|
||||
LL_WARNS("TEXTUREENTRY") << "Failure parsing Texture Entry Message due to malformed TE Field! Dropping changes on the floor. " << LL_ENDL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cur_ptr >= buffer_end || !unpack_TEField<material_id_type>(material_data, face_count, cur_ptr, buffer_end, MVT_LLUUID))
|
||||
{
|
||||
cur_ptr++;
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)material_data, 16, face_count, MVT_LLUUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(material_data, 0, sizeof(material_data));
|
||||
memset((void*)material_data, 0, sizeof(material_data));
|
||||
}
|
||||
|
||||
for (i = 0; i < face_count; i++)
|
||||
{
|
||||
memcpy( image_ids[ i ].mData, &image_data[ i*UUID_BYTES ], UUID_BYTES ); /* Flawfinder: ignore */
|
||||
material_ids[ i ].set( &material_data[ i * UUID_BYTES ] );
|
||||
material_ids[i].set(&(material_data[i]));
|
||||
}
|
||||
|
||||
LLColor4 color;
|
||||
LLColor4U coloru;
|
||||
for (i = 0; i < face_count; i++)
|
||||
{
|
||||
retval |= setTETexture(i, image_ids[i]);
|
||||
retval |= setTETexture(i, ((LLUUID*)image_data)[i]);
|
||||
retval |= setTEScale(i, scale_s[i], scale_t[i]);
|
||||
retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF);
|
||||
retval |= setTERotation(i, ((F32)image_rot[i] / TEXTURE_ROTATION_PACK_FACTOR) * F_TWO_PI);
|
||||
|
|
@ -1521,15 +1584,14 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
|||
retval |= setTEMediaTexGen(i, media_flags[i]);
|
||||
retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
|
||||
retval |= setTEMaterialID(i, material_ids[i]);
|
||||
coloru = LLColor4U(colors + 4*i);
|
||||
|
||||
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
|
||||
// as all zeros. However, the subtraction and addition must be done in unsigned
|
||||
// byte space, not in float space, otherwise off-by-one errors occur. JC
|
||||
color.mV[VRED] = F32(255 - coloru.mV[VRED]) / 255.f;
|
||||
color.mV[VGREEN] = F32(255 - coloru.mV[VGREEN]) / 255.f;
|
||||
color.mV[VBLUE] = F32(255 - coloru.mV[VBLUE]) / 255.f;
|
||||
color.mV[VALPHA] = F32(255 - coloru.mV[VALPHA]) / 255.f;
|
||||
color.mV[VRED] = F32(255 - colors[i].mV[VRED]) / 255.f;
|
||||
color.mV[VGREEN] = F32(255 - colors[i].mV[VGREEN]) / 255.f;
|
||||
color.mV[VBLUE] = F32(255 - colors[i].mV[VBLUE]) / 255.f;
|
||||
color.mV[VALPHA] = F32(255 - colors[i].mV[VALPHA]) / 255.f;
|
||||
|
||||
retval |= setTEColor(i, color);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,8 +338,8 @@ struct LLTEContents
|
|||
{
|
||||
static const U32 MAX_TES = 45;
|
||||
|
||||
U8 image_data[MAX_TES*16];
|
||||
U8 colors[MAX_TES*4];
|
||||
LLUUID image_data[MAX_TES];
|
||||
LLColor4U colors[MAX_TES];
|
||||
F32 scale_s[MAX_TES];
|
||||
F32 scale_t[MAX_TES];
|
||||
S16 offset_s[MAX_TES];
|
||||
|
|
@ -432,7 +432,6 @@ public:
|
|||
|
||||
void copyTEs(const LLPrimitive *primitive);
|
||||
S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
|
||||
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
|
||||
BOOL packTEMessage(LLMessageSystem *mesgsys) const;
|
||||
BOOL packTEMessage(LLDataPacker &dp) const;
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
|
||||
|
|
|
|||
|
|
@ -1065,6 +1065,43 @@ void LLComboBox::prearrangeList(std::string filter)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
// ll::ui::SearchableControl functions
|
||||
|
||||
//virtual
|
||||
std::string LLComboBox::_getSearchText() const
|
||||
{
|
||||
std::string res;
|
||||
if (mList)
|
||||
{
|
||||
// getAllData returns a full copy of content, might be a
|
||||
// better option to implement an mList->getSearchText(column)
|
||||
std::vector<LLScrollListItem*> data = mList->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator iter = data.begin();
|
||||
while (iter != data.end())
|
||||
{
|
||||
LLScrollListCell* cell = (*iter)->getColumn(0);
|
||||
if (cell)
|
||||
{
|
||||
std::string whitelist_url = cell->getValue().asString();
|
||||
res += cell->getValue().asString();
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
return res + getToolTip();
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLComboBox::onSetHighlight() const
|
||||
{
|
||||
if (mButton)
|
||||
{
|
||||
mButton->ll::ui::SearchableControl::setHighlighted(ll::ui::SearchableControl::getHighlighted());
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
// LLCtrlListInterface functions
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@ class LLFontGL;
|
|||
class LLViewBorder;
|
||||
|
||||
class LLComboBox
|
||||
: public LLUICtrl, public LLCtrlListInterface
|
||||
: public LLUICtrl
|
||||
, public LLCtrlListInterface
|
||||
, public ll::ui::SearchableControl
|
||||
{
|
||||
public:
|
||||
typedef enum e_preferred_position
|
||||
|
|
@ -101,6 +103,9 @@ protected:
|
|||
void initFromParams(const Params&);
|
||||
void prearrangeList(std::string filter = "");
|
||||
|
||||
virtual std::string _getSearchText() const;
|
||||
virtual void onSetHighlight() const;
|
||||
|
||||
public:
|
||||
// LLView interface
|
||||
virtual void onFocusLost();
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
#include <sstream>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
|
@ -132,7 +131,7 @@ public:
|
|||
|
||||
typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
|
||||
|
||||
typedef boost::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr;
|
||||
typedef std::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr;
|
||||
|
||||
typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
|
||||
typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
|
||||
|
|
@ -278,19 +277,19 @@ private:
|
|||
bool mInvertSetting;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
|
||||
typedef std::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
|
||||
|
||||
|
||||
struct LLNotificationTemplate;
|
||||
|
||||
// we want to keep a map of these by name, and it's best to manage them
|
||||
// with smart pointers
|
||||
typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
|
||||
typedef std::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
|
||||
|
||||
|
||||
struct LLNotificationVisibilityRule;
|
||||
|
||||
typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr;
|
||||
typedef std::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr;
|
||||
|
||||
/**
|
||||
* @class LLNotification
|
||||
|
|
@ -764,6 +763,10 @@ public:
|
|||
{}
|
||||
virtual ~LLNotificationChannelBase()
|
||||
{
|
||||
// explicit cleanup for easier issue detection
|
||||
mChanged.disconnect_all_slots();
|
||||
mPassedFilter.disconnect_all_slots();
|
||||
mFailedFilter.disconnect_all_slots();
|
||||
mItems.clear();
|
||||
}
|
||||
// you can also connect to a Channel, so you can be notified of
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "lleventapi.h"
|
||||
#include "llnotificationptr.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
|
@ -61,7 +60,7 @@ private:
|
|||
static LLSD asLLSD(LLNotificationPtr);
|
||||
|
||||
class Forwarder;
|
||||
typedef std::map<std::string, boost::shared_ptr<Forwarder> > ForwarderMap;
|
||||
typedef std::map<std::string, std::shared_ptr<Forwarder> > ForwarderMap;
|
||||
ForwarderMap mForwarders;
|
||||
LLNotifications & mNotifications;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "llinitparam.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
|
||||
typedef std::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
|
||||
|
||||
// This is the class of object read from the XML file (notifications.xml,
|
||||
// from the appropriate local language directory).
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
|
|||
mFontShadow(p.font_shadow),
|
||||
mPopupMenuHandle(),
|
||||
mReadOnly(p.read_only),
|
||||
mSkipTripleClick(false),
|
||||
mSkipLinkUnderline(p.skip_link_underline),
|
||||
mSpellCheck(p.spellcheck),
|
||||
mSpellCheckStart(-1),
|
||||
|
|
@ -1092,6 +1093,11 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
// handle triple click
|
||||
if (!mTripleClickTimer.hasExpired())
|
||||
{
|
||||
if (mSkipTripleClick)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
S32 real_line = getLineNumFromDocIndex(mCursorPos, false);
|
||||
S32 line_start = -1;
|
||||
S32 line_end = -1;
|
||||
|
|
|
|||
|
|
@ -761,7 +761,7 @@ protected:
|
|||
bool mPlainText; // didn't use Image or Icon segments
|
||||
bool mAutoIndent;
|
||||
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
|
||||
|
||||
bool mSkipTripleClick;
|
||||
bool mSkipLinkUnderline;
|
||||
|
||||
// support widgets
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ LLTextBox::LLTextBox(const LLTextBox::Params& p)
|
|||
: LLTextBase(p),
|
||||
mClickedCallback(NULL),
|
||||
mShowCursorHand(true)
|
||||
{}
|
||||
{
|
||||
mSkipTripleClick = true;
|
||||
}
|
||||
|
||||
LLTextBox::~LLTextBox()
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcachename.h"
|
||||
#include "llregex.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluicolortable.h"
|
||||
#include "message.h"
|
||||
|
|
@ -184,11 +185,51 @@ bool LLUrlEntryBase::isLinkDisabled() const
|
|||
return globally_disabled;
|
||||
}
|
||||
|
||||
bool LLUrlEntryBase::isWikiLinkCorrect(std::string url)
|
||||
bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const
|
||||
{
|
||||
LLWString label = utf8str_to_wstring(getLabelFromWikiLink(url));
|
||||
label.erase(std::remove(label.begin(), label.end(), L'\u200B'), label.end());
|
||||
return (LLUrlRegistry::instance().hasUrl(wstring_to_utf8str(label))) ? false : true;
|
||||
LLWString wlabel = utf8str_to_wstring(getLabelFromWikiLink(labeled_url));
|
||||
wlabel.erase(std::remove(wlabel.begin(), wlabel.end(), L'\u200B'), wlabel.end());
|
||||
|
||||
// Unicode URL validation, see SL-15243
|
||||
std::replace_if(wlabel.begin(),
|
||||
wlabel.end(),
|
||||
[](const llwchar &chr)
|
||||
{
|
||||
return (chr == L'\u2024') // "One Dot Leader"
|
||||
|| (chr == L'\uFE52') // "Small Full Stop"
|
||||
|| (chr == L'\uFF0E') // "Fullwidth Full Stop"
|
||||
// Not a decomposition, but suficiently similar
|
||||
|| (chr == L'\u05C5'); // "Hebrew Mark Lower Dot"
|
||||
},
|
||||
L'\u002E'); // Dot "Full Stop"
|
||||
|
||||
std::replace_if(wlabel.begin(),
|
||||
wlabel.end(),
|
||||
[](const llwchar &chr)
|
||||
{
|
||||
return (chr == L'\u02D0') // "Modifier Letter Colon"
|
||||
|| (chr == L'\uFF1A') // "Fullwidth Colon"
|
||||
|| (chr == L'\uFE55'); // "Small Colon"
|
||||
},
|
||||
L'\u003A'); // Colon
|
||||
|
||||
std::replace_if(wlabel.begin(),
|
||||
wlabel.end(),
|
||||
[](const llwchar &chr)
|
||||
{
|
||||
return (chr == L'\uFF0F'); // "Fullwidth Solidus"
|
||||
},
|
||||
L'\u002F'); // Solidus
|
||||
|
||||
std::string label = wstring_to_utf8str(wlabel);
|
||||
if ((label.find(".com") != std::string::npos
|
||||
|| label.find("www.") != std::string::npos)
|
||||
&& label.find("://") == std::string::npos)
|
||||
{
|
||||
label = "http://" + label;
|
||||
}
|
||||
|
||||
return (LLUrlRegistry::instance().hasUrl(label)) ? false : true;
|
||||
}
|
||||
|
||||
std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const
|
||||
|
|
@ -1603,7 +1644,7 @@ std::string LLUrlEntryIcon::getIcon(const std::string &url)
|
|||
// Grep icon info between <icon>...</icon> tags
|
||||
// matches[1] contains the icon name/path
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
mIcon = (boost::regex_match(url, matches, mPattern) && matches[1].matched)
|
||||
mIcon = (ll_regex_match(url, matches, mPattern) && matches[1].matched)
|
||||
? matches[1]
|
||||
: LLStringUtil::null;
|
||||
LLStringUtil::trim(mIcon);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
|
||||
bool isLinkDisabled() const;
|
||||
|
||||
bool isWikiLinkCorrect(std::string url);
|
||||
bool isWikiLinkCorrect(const std::string &url) const;
|
||||
|
||||
virtual bool isSLURLvalid(const std::string &url) const { return TRUE; };
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@
|
|||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llregex.h"
|
||||
#include "llurlregistry.h"
|
||||
#include "lluriparser.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/algorithm/string/find.hpp> //for boost::ifind_first -KC
|
||||
|
||||
// default dummy callback that ignores any label updates from the server
|
||||
|
|
@ -127,15 +127,7 @@ static bool matchRegex(const char *text, boost::regex regex, U32 &start, U32 &en
|
|||
boost::cmatch result;
|
||||
bool found;
|
||||
|
||||
// regex_search can potentially throw an exception, so check for it
|
||||
try
|
||||
{
|
||||
found = boost::regex_search(text, result, regex);
|
||||
}
|
||||
catch (std::runtime_error &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
found = ll_regex_search(text, result, regex);
|
||||
|
||||
if (! found)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
LLNonInlineTextView *inputView;
|
||||
NSTimer *frameTimer;
|
||||
NSString *currentInputLanguage;
|
||||
std::string secondLogPath;
|
||||
}
|
||||
|
||||
@property (assign) IBOutlet LLNSWindow *window;
|
||||
|
|
|
|||
|
|
@ -505,7 +505,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
// e.g. OS Window for upload something or Input Window...
|
||||
// mModifiers instance variable is for insertText: or insertText:replacementRange: (by Pell Smit)
|
||||
mModifiers = [theEvent modifierFlags];
|
||||
bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers);
|
||||
|
||||
bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, [[theEvent characters] characterAtIndex:0]);
|
||||
unichar ch;
|
||||
if (acceptsText &&
|
||||
!mMarkedTextAllowed &&
|
||||
|
|
@ -548,7 +549,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
if (mModifiers & mask)
|
||||
{
|
||||
eventData.mKeyEvent = NativeKeyEventData::KEYDOWN;
|
||||
callKeyDown(&eventData, [theEvent keyCode], 0);
|
||||
callKeyDown(&eventData, [theEvent keyCode], 0, [[theEvent characters] characterAtIndex:0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ void setupInputWindow(NSWindowRef window, GLViewRef view);
|
|||
// These are all implemented in llwindowmacosx.cpp.
|
||||
// This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict)
|
||||
bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask);
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask);
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask, wchar_t character);
|
||||
void callResetKeys();
|
||||
bool callUnicodeCallback(wchar_t character, unsigned int mask);
|
||||
void callRightMouseDown(float *pos, unsigned int mask);
|
||||
|
|
|
|||
|
|
@ -217,8 +217,17 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
|
|||
return retVal;
|
||||
}
|
||||
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask)
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask, wchar_t character)
|
||||
{
|
||||
if((key == gKeyboard->inverseTranslateKey('Z')) && (character == 'y'))
|
||||
{
|
||||
key = gKeyboard->inverseTranslateKey('Y');
|
||||
}
|
||||
else if ((key == gKeyboard->inverseTranslateKey('Y')) && (character == 'z'))
|
||||
{
|
||||
key = gKeyboard->inverseTranslateKey('Z');
|
||||
}
|
||||
|
||||
mRawKeyEvent = event;
|
||||
bool retVal = gKeyboard->handleKeyDown(key, mask);
|
||||
mRawKeyEvent = NULL;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ project(media_plugin_cef)
|
|||
include(Boost)
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLImage)
|
||||
include(LLPlugin)
|
||||
include(LLMath)
|
||||
include(LLRender)
|
||||
|
|
@ -13,7 +12,6 @@ include(LLWindow)
|
|||
include(Linking)
|
||||
include(PluginAPI)
|
||||
include(MediaPluginBase)
|
||||
include(OpenGL)
|
||||
|
||||
include(CEFPlugin)
|
||||
|
||||
|
|
@ -22,7 +20,6 @@ include_directories(
|
|||
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLIMAGE_INCLUDE_DIRS}
|
||||
${LLRENDER_INCLUDE_DIRS}
|
||||
${LLWINDOW_INCLUDE_DIRS}
|
||||
${CEF_INCLUDE_DIR}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "linden_common.h"
|
||||
#include "indra_constants.h" // for indra keyboard codes
|
||||
|
||||
#include "llgl.h"
|
||||
#include "llglheaders.h" // for GL_* constants
|
||||
#include "llsdutil.h"
|
||||
#include "llplugininstance.h"
|
||||
#include "llpluginmessage.h"
|
||||
|
|
@ -37,9 +37,6 @@
|
|||
#include "volume_catcher.h"
|
||||
#include "media_plugin_base.h"
|
||||
|
||||
#include <functional>
|
||||
#include <chrono>
|
||||
|
||||
#include "dullahan.h"
|
||||
#include "dullahan_version.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -283,35 +283,16 @@ void MediaPluginLibVLC::playMedia()
|
|||
return;
|
||||
}
|
||||
|
||||
// A new call to play the media is received after the initial one. Typically
|
||||
// this is due to a size change request either as the media naturally resizes
|
||||
// to the size of the prim container, or else, as a 2D window is resized by the
|
||||
// user. Stopping the media, helps avoid a race condition where the media pixel
|
||||
// buffer size is out of sync with the declared size (width/height) for a frame
|
||||
// or two and the plugin crashes as VLC tries to decode a frame into unallocated
|
||||
// memory.
|
||||
if (mLibVLCMediaPlayer)
|
||||
{
|
||||
// stop listening to events while we reset things
|
||||
libvlc_event_manager_t* em = libvlc_media_player_event_manager(mLibVLCMediaPlayer);
|
||||
if (em)
|
||||
{
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerOpening, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerPlaying, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerPaused, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerStopped, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerEndReached, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, NULL);
|
||||
libvlc_event_detach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, NULL);
|
||||
};
|
||||
|
||||
libvlc_media_player_stop(mLibVLCMediaPlayer);
|
||||
libvlc_media_player_release(mLibVLCMediaPlayer);
|
||||
|
||||
mLibVLCMediaPlayer = 0;
|
||||
}
|
||||
|
||||
if (mLibVLCMedia)
|
||||
{
|
||||
libvlc_media_release(mLibVLCMedia);
|
||||
|
||||
mLibVLCMedia = 0;
|
||||
}
|
||||
|
||||
mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str());
|
||||
|
|
@ -345,6 +326,9 @@ void MediaPluginLibVLC::playMedia()
|
|||
libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this);
|
||||
}
|
||||
|
||||
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
|
||||
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
|
||||
|
||||
mLibVLCCallbackContext.parent = this;
|
||||
mLibVLCCallbackContext.texture_pixels = mPixels;
|
||||
mLibVLCCallbackContext.mp = mLibVLCMediaPlayer;
|
||||
|
|
@ -366,14 +350,11 @@ void MediaPluginLibVLC::playMedia()
|
|||
|
||||
setStatus(STATUS_LOADED);
|
||||
|
||||
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
|
||||
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
|
||||
|
||||
// note this relies on the "set_loop" message arriving before the "start" (play) one
|
||||
// but that appears to always be the case
|
||||
if (mIsLooping)
|
||||
{
|
||||
libvlc_media_add_option(mLibVLCMedia, "input-repeat=-1");
|
||||
libvlc_media_add_option(mLibVLCMedia, "input-repeat=65535");
|
||||
}
|
||||
|
||||
libvlc_media_player_play(mLibVLCMediaPlayer);
|
||||
|
|
|
|||
|
|
@ -2686,10 +2686,8 @@ if (DARWIN)
|
|||
# SIGH, as of 2018-05-24 (cmake 3.11.1) the INSTALL_RPATH property simply
|
||||
# does not work. Try this:
|
||||
LINK_FLAGS "-rpath @loader_path/../Frameworks"
|
||||
MACOSX_BUNDLE_INFO_PLIST
|
||||
# <FS:CR> Use Firestorm plist
|
||||
#"${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Info-Firestorm.plist"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-Firestorm.plist"
|
||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
|
||||
)
|
||||
|
||||
set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llworld.h"
|
||||
#include "sound_ids.h"
|
||||
#include <time.h>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
|
@ -207,11 +206,6 @@ NACLAntiSpamRegistry::NACLAntiSpamRegistry() :
|
|||
{
|
||||
mQueues[queue] = new NACLAntiSpamQueue(mGlobalTime, mGlobalAmount);
|
||||
}
|
||||
|
||||
for (S32 i = 0; i < COLLISION_SOUNDS_SIZE; ++i)
|
||||
{
|
||||
mCollisionSounds.insert(LLUUID(COLLISION_SOUNDS[i]));
|
||||
}
|
||||
}
|
||||
|
||||
NACLAntiSpamRegistry::~NACLAntiSpamRegistry()
|
||||
|
|
@ -640,11 +634,6 @@ void NACLAntiSpamRegistry::purgeGlobalEntries()
|
|||
mGlobalEntries.clear();
|
||||
}
|
||||
|
||||
bool NACLAntiSpamRegistry::isCollisionSound(const LLUUID& sound_id)
|
||||
{
|
||||
return (mCollisionSounds.find(sound_id) != mCollisionSounds.end());
|
||||
}
|
||||
|
||||
void NACLAntiSpamRegistry::processObjectPropertiesFamily(LLMessageSystem* msg)
|
||||
{
|
||||
static LLCachedControl<bool> useAntiSpam(gSavedSettings, "UseAntiSpam");
|
||||
|
|
|
|||
|
|
@ -113,8 +113,6 @@ public:
|
|||
void clearAllQueues();
|
||||
void purgeAllQueues();
|
||||
|
||||
bool isCollisionSound(const LLUUID& sound_id);
|
||||
|
||||
void processObjectPropertiesFamily(LLMessageSystem* msg);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6.4.24
|
||||
6.5.1
|
||||
|
|
|
|||
|
|
@ -3187,10 +3187,11 @@
|
|||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>CameraPreset</key> <!-- deprecated (see SL-12429) -->
|
||||
<key>CameraPreset</key>
|
||||
<!-- deprecated (see SL-12429) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
|
||||
<string>(Deprecated) Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -4216,10 +4217,11 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DEPRECATED: DebugShowPrivateMem</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>DebugShowPrivateMem</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show Private Mem Info</string>
|
||||
<string>(Deprecated) Show Private Mem Info</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -5854,6 +5856,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableCollisionSounds</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Play sounds on collision</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableMouselook</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -8180,7 +8193,7 @@
|
|||
<key>LoginSRVPump</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of the message pump that handles SRV request (deprecated)</string>
|
||||
<string>(Deprecated) Name of the message pump that handles SRV request)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -9038,10 +9051,11 @@
|
|||
<key>Value</key>
|
||||
<real>600.0</real>
|
||||
</map>
|
||||
<key>MemoryPrivatePoolEnabled</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>MemoryPrivatePoolEnabled</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Enable the private memory pool management</string>
|
||||
<string>(Deprecated) Enable the private memory pool management</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -9051,10 +9065,11 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MemoryPrivatePoolSize</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>MemoryPrivatePoolSize</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Size of the private memory pool in MB (min. value is 256)</string>
|
||||
<string>(Deprecated) Size of the private memory pool in MB (min. value is 256)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -11114,7 +11129,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>QAMode</key>
|
||||
<map>
|
||||
|
|
@ -11130,7 +11145,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>QAModeEventHostPort</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Port on which lleventhost should listen</string>
|
||||
<string>(Deprecated) Port on which lleventhost should listen</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -15864,6 +15879,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>TextureSaveLocation</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Current location for bulk saving textures to disk</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>ThrottleBandwidthKBPS</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -17588,10 +17614,11 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<string>Default</string>
|
||||
</map>
|
||||
<key>UseExternalBrowser</key> <!-- deprecated (see MAINT-4127) -->
|
||||
<key>UseExternalBrowser</key>
|
||||
<!-- deprecated (see MAINT-4127) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use default browser when opening web pages instead of in-world browser.</string>
|
||||
<string>(Deprecated) Use default browser when opening web pages instead of in-world browser.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -18085,6 +18112,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceCallsRejectGroup</key>
|
||||
<!-- deprecated (see SL-12871) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Silently reject all incoming group voice calls.</string>
|
||||
|
|
@ -22513,17 +22541,6 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSPlayCollisionSounds</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Play collision sounds.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSFadeAudioStream</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ Vivox SDK License
|
|||
|
||||
RSA Data Security, Inc. MD5 Message-Digest Algorithm
|
||||
|
||||
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
|
||||
Open Source Software Licensing
|
||||
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ Vivox SDK License
|
|||
|
||||
RSA Data Security, Inc. MD5 Message-Digest Algorithm
|
||||
|
||||
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
|
||||
Open Source Software Licensing
|
||||
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Logitech License
|
|||
|
||||
End-User License Agreement for Logitech LCD SDK
|
||||
|
||||
This End-User License Agreement for Logitech LCD SDK ( “Agreement”) is a legal agreement between you, either an individual or legal entity (“You” or “you”) and Logitech Inc. (“Logitech”) for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter “LCD SDK”). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
|
||||
This End-User License Agreement for Logitech LCD SDK ( "Agreement") is a legal agreement between you, either an individual or legal entity ("You" or "you") and Logitech Inc. ("Logitech") for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter "LCD SDK"). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
|
||||
|
||||
1 Grant of License and Restrictions.
|
||||
This Agreement grants You the following rights provided that You comply with all terms and conditions of this Agreement.
|
||||
|
|
@ -14,7 +14,7 @@ This Agreement grants You the following rights provided that You comply with all
|
|||
(d) In the event Logitech, in its sole discretion, elects to provide copies of the LCD SDK to more than one individual employed by You (if You are not a single individual), each such individual shall be entitled to exercise the rights granted in this Agreement and shall be bound by the terms and conditions herein.
|
||||
|
||||
2 Updates.
|
||||
Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements (“Updates”) to You, in which case such Updates shall be deemed to be included in the “LCD SDK” and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
|
||||
Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements ("Updates") to You, in which case such Updates shall be deemed to be included in the "LCD SDK" and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
|
||||
|
||||
3 Intellectual Property Rights.
|
||||
The LCD SDK is licensed, not sold, to You for use only under the terms and conditions of this Agreement. Logitech and its suppliers retain title to the LCD SDK and all intellectual property rights therein. The LCD SDK is protected by intellectual property laws and international treaties, including U.S. copyright law and international copyright treaties. All rights not expressly granted by Logitech are reserved.
|
||||
|
|
@ -23,7 +23,7 @@ The LCD SDK is licensed, not sold, to You for use only under the terms and condi
|
|||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LOGITECH AND ITS SUPPLIERS PROVIDE THE LCD SDK AND OTHER LOGITECH PRODUCTS AND SERVICES (IF ANY) AS IS AND WITHOUT WARRANTY OF ANY KIND. LOGITECH AND ITS SUPPLIERS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD-PARTY RIGHTS WITH RESPECT TO THE LCD SDK AND ANY WARRANTIES OF NON-INTERFERENCE OR ACCURACY OF INFORMATIONAL CONTENT. NO LOGITECH DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATION, EXTENSION, OR ADDITION TO THIS WARRANTY. Some jurisdictions do not allow limitations on how long an implied warranty lasts, so the above limitation may not apply to you.
|
||||
|
||||
5 Limitation of Liability.
|
||||
IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS’ TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
|
||||
IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS' TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
|
||||
|
||||
6 U.S. Government Rights.
|
||||
Use, duplication, or disclosure of the software contained in the LCD SDK by the U.S. Government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988) FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Logitech Inc. 6505 Kaiser Drive, Fremont, CA 94555.
|
||||
|
|
@ -564,7 +564,7 @@ Vivox SDK License
|
|||
|
||||
RSA Data Security, Inc. MD5 Message-Digest Algorithm
|
||||
|
||||
Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
|
||||
|
||||
Open Source Software Licensing
|
||||
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
|
||||
|
|
|
|||
|
|
@ -1179,13 +1179,14 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
}
|
||||
|
||||
// updating inventory
|
||||
LLWearableType* wearable_type_inst = LLWearableType::getInstance();
|
||||
|
||||
// TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later
|
||||
// note: shirt is the first non-body part wearable item. Update if wearable order changes.
|
||||
// This loop should remove all clothing, but not any body parts
|
||||
for (S32 j = 0; j < (S32)LLWearableType::WT_COUNT; j++)
|
||||
{
|
||||
if (LLWearableType::getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
|
||||
if (wearable_type_inst->getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
removeWearable((LLWearableType::EType)j, true, 0);
|
||||
}
|
||||
|
|
@ -1205,7 +1206,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
new_wearable->setName(new_item->getName());
|
||||
new_wearable->setItemID(new_item->getUUID());
|
||||
|
||||
if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART)
|
||||
if (wearable_type_inst->getAssetType(type) == LLAssetType::AT_BODYPART)
|
||||
{
|
||||
// exactly one wearable per body part
|
||||
setWearable(type,0,new_wearable);
|
||||
|
|
@ -1304,7 +1305,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
// if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
|
||||
// (old_item_id == new_item->getUUID()))
|
||||
// {
|
||||
// LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
|
||||
// LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getInstance()->getTypeName(type) << LL_ENDL;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
|
|
@ -1767,7 +1768,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
|
|||
return;
|
||||
}
|
||||
|
||||
const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType());
|
||||
const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
|
||||
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
|
||||
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
|
||||
}
|
||||
|
|
@ -1905,11 +1906,11 @@ void LLAgentWearables::sendAgentWearablesUpdate()
|
|||
}
|
||||
else
|
||||
{
|
||||
//LL_INFOS() << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << LL_ENDL;
|
||||
//LL_INFOS() << "Not wearing wearable type " << LLWearableType::getInstance()->getTypeName((LLWearableType::EType)i) << LL_ENDL;
|
||||
gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null);
|
||||
}
|
||||
|
||||
LL_DEBUGS() << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL;
|
||||
LL_DEBUGS() << " " << LLWearableType::getInstance()->getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL;
|
||||
}
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
|
@ -2007,7 +2008,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
}
|
||||
else
|
||||
{
|
||||
LLAssetType::EType asset_type = LLWearableType::getAssetType(type);
|
||||
LLAssetType::EType asset_type = LLWearableType::getInstance()->getAssetType(type);
|
||||
if (asset_type == LLAssetType::AT_NONE)
|
||||
{
|
||||
continue;
|
||||
|
|
@ -2020,7 +2021,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
outfit->add(wearable_data);
|
||||
}
|
||||
|
||||
LL_DEBUGS() << " " << LLWearableType::getTypeLabel(type) << LL_ENDL;
|
||||
LL_DEBUGS() << " " << LLWearableType::getInstance()->getTypeLabel(type) << LL_ENDL;
|
||||
}
|
||||
|
||||
// Get the complete information on the items in the inventory and set up an observer
|
||||
|
|
@ -2048,7 +2049,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type,
|
|||
{
|
||||
// Try to recover by replacing missing wearable with a new one.
|
||||
LLNotificationsUtil::add("ReplacedMissingWearable");
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getInstance()->getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
|
||||
|
||||
setWearable(type,index,new_wearable);
|
||||
|
|
|
|||
|
|
@ -282,20 +282,13 @@ void LLAppCoreHttp::init()
|
|||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
// Signal for global pipelining preference from settings
|
||||
// Global pipelining setting
|
||||
static const std::string http_pipelining("HttpPipelining");
|
||||
if (gSavedSettings.controlExists(http_pipelining))
|
||||
{
|
||||
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(http_pipelining);
|
||||
if (cntrl_ptr.isNull())
|
||||
{
|
||||
LL_WARNS("Init") << "Unable to set signal on global setting '" << http_pipelining
|
||||
<< "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mPipelinedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&setting_changed));
|
||||
}
|
||||
// Default to true (in ctor) if absent.
|
||||
mPipelined = gSavedSettings.getBOOL(http_pipelining);
|
||||
LL_INFOS("Init") << "HTTP Pipelining " << (mPipelined ? "enabled" : "disabled") << "!" << LL_ENDL;
|
||||
}
|
||||
|
||||
// Register signals for settings and state changes
|
||||
|
|
@ -409,21 +402,6 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
{
|
||||
LLCore::HttpStatus status;
|
||||
|
||||
// Global pipelining setting
|
||||
bool pipeline_changed(false);
|
||||
static const std::string http_pipelining("HttpPipelining");
|
||||
if (gSavedSettings.controlExists(http_pipelining))
|
||||
{
|
||||
// Default to true (in ctor) if absent.
|
||||
bool pipelined(gSavedSettings.getBOOL(http_pipelining));
|
||||
if (pipelined != mPipelined)
|
||||
{
|
||||
mPipelined = pipelined;
|
||||
pipeline_changed = true;
|
||||
}
|
||||
LL_INFOS("Init") << "HTTP Pipelining " << (mPipelined ? "enabled" : "disabled") << "!" << LL_ENDL;
|
||||
}
|
||||
|
||||
for (int i(0); i < LL_ARRAY_SIZE(init_data); ++i)
|
||||
{
|
||||
const EAppPolicy app_policy(static_cast<EAppPolicy>(i));
|
||||
|
|
@ -452,7 +430,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
// Init- or run-time settings. Must use the queued request API.
|
||||
|
||||
// Pipelining changes
|
||||
if (initial || pipeline_changed)
|
||||
if (initial)
|
||||
{
|
||||
const bool to_pipeline(mPipelined && init_data[i].mPipelined);
|
||||
if (to_pipeline != mHttpClasses[app_policy].mPipelined)
|
||||
|
|
@ -495,7 +473,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
}
|
||||
}
|
||||
|
||||
if (initial || setting != mHttpClasses[app_policy].mConnLimit || pipeline_changed)
|
||||
if (initial || setting != mHttpClasses[app_policy].mConnLimit)
|
||||
{
|
||||
// Set it and report. Strategies depend on pipelining:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -304,6 +304,12 @@ struct AttachmentInfo
|
|||
//};
|
||||
std::vector<AttachmentInfo> info{};
|
||||
|
||||
secondLogPath = metadata.secondLogFilePathname;
|
||||
if(!secondLogPath.empty())
|
||||
{
|
||||
info.push_back(AttachmentInfo(secondLogPath, "text/xml"));
|
||||
}
|
||||
|
||||
// We "happen to know" that info[0].basename is "SecondLife.old" -- due to
|
||||
// the fact that BugsplatMac only notices a crash during the viewer run
|
||||
// following the crash.
|
||||
|
|
@ -342,6 +348,12 @@ struct AttachmentInfo
|
|||
- (void)bugsplatStartupManagerDidFinishSendingCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
|
||||
{
|
||||
infos("Sent crash report to BugSplat");
|
||||
|
||||
if(!secondLogPath.empty())
|
||||
{
|
||||
boost::filesystem::remove(secondLogPath);
|
||||
}
|
||||
clearDumpLogsDir();
|
||||
}
|
||||
|
||||
- (void)bugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager didFailWithError:(NSError *)error
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L
|
|||
// runway skip here?
|
||||
}
|
||||
|
||||
LL_INFOS() << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
|
||||
LL_INFOS("Avatar") << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
|
||||
holder->eraseTypeToLink(type);
|
||||
// Add wearable to FoundData for actual wearing
|
||||
LLViewerInventoryItem *item = gInventory.getItem(item_id);
|
||||
|
|
@ -1046,8 +1046,8 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
|
|||
|
||||
// Try to recover by replacing missing wearable with a new one.
|
||||
LLNotificationsUtil::add("ReplacedMissingWearable");
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type)
|
||||
<< " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LL_DEBUGS("Avatar") << "Wearable of type '" << LLWearableType::getInstance()->getTypeName(type)
|
||||
<< "' could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
|
||||
|
||||
// Add a new one in the lost and found folder.
|
||||
|
|
@ -2162,7 +2162,7 @@ void LLAppearanceMgr::filterWearableItems(
|
|||
continue;
|
||||
// S32 start_index = llmax(0,size-max_per_type);
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0)
|
||||
S32 start_index = llmax(0, size - ((LLWearableType::getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1));
|
||||
S32 start_index = llmax(0, size - ((LLWearableType::getInstance()->getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1));
|
||||
// [/SL:KB[
|
||||
for (S32 j = start_index; j<size; j++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -799,8 +799,6 @@ LLAppViewer::LLAppViewer()
|
|||
|
||||
gLoggedInTime.stop();
|
||||
|
||||
initLoggingAndGetLastDuration();
|
||||
|
||||
processMarkerFiles();
|
||||
//
|
||||
// OK to write stuff to logs now, we've now crash reported if necessary
|
||||
|
|
@ -857,14 +855,10 @@ bool LLAppViewer::init()
|
|||
// Start of the application
|
||||
//
|
||||
|
||||
// <FS:Ansariel> Move further down after translation system has been initialized
|
||||
//// initialize LLWearableType translation bridge.
|
||||
//// Memory will be cleaned up in ::cleanupClass()
|
||||
//LLWearableType::initParamSingleton(new LLUITranslationBridge());
|
||||
|
||||
// <FS:Ansariel> Move further down after translation system has been initialized
|
||||
//LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
|
||||
//LLSettingsType::initClass(trans);
|
||||
// </FS:Ansariel>
|
||||
// </FS:Ansariel>
|
||||
|
||||
// initialize SSE options
|
||||
LLVector4a::initClass();
|
||||
|
|
@ -967,6 +961,7 @@ bool LLAppViewer::init()
|
|||
// </FS>
|
||||
init_default_trans_args();
|
||||
|
||||
// inits from settings.xml and from strings.xml
|
||||
if (!initConfiguration())
|
||||
return false;
|
||||
|
||||
|
|
@ -1040,10 +1035,9 @@ bool LLAppViewer::init()
|
|||
|
||||
// <FS:Ansariel> Moved down here translation system has been initialized
|
||||
// initialize LLWearableType translation bridge.
|
||||
// Memory will be cleaned up in ::cleanupClass()
|
||||
LLWearableType::initParamSingleton(new LLUITranslationBridge());
|
||||
|
||||
// Will immediately use LLTranslationBridge to init LLWearableDictionary
|
||||
LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
|
||||
LLWearableType::initParamSingleton(trans);
|
||||
LLSettingsType::initParamSingleton(trans);
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
@ -1290,19 +1284,27 @@ bool LLAppViewer::init()
|
|||
if (count > 0 && v1 <= 10)
|
||||
{
|
||||
LL_INFOS("AppInit") << "Detected obsolete intel driver: " << driver << LL_ENDL;
|
||||
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
|
||||
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
|
||||
details.setArg("[VERSION]", driver);
|
||||
details.setArg("[GPUNAME]", gpu_name);
|
||||
S32 button = OSMessageBox(details.getString(),
|
||||
LLStringUtil::null,
|
||||
OSMB_YESNO);
|
||||
if (OSBTN_YES == button && gViewerWindow)
|
||||
|
||||
if (!gViewerWindow->getInitAlert().empty() // graphic initialization crashed on last run
|
||||
|| LLVersionInfo::getInstance()->getChannelAndVersion() != gLastRunVersion // viewer was updated
|
||||
|| mNumSessions % 20 == 0 //periodically remind user to update driver
|
||||
)
|
||||
{
|
||||
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
|
||||
if (gViewerWindow->getWindow())
|
||||
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
|
||||
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
|
||||
LL_INFOS("AppInit") << "Notifying user about obsolete intel driver for " << gpu_name << LL_ENDL;
|
||||
details.setArg("[VERSION]", driver);
|
||||
details.setArg("[GPUNAME]", gpu_name);
|
||||
S32 button = OSMessageBox(details.getString(),
|
||||
LLStringUtil::null,
|
||||
OSMB_YESNO);
|
||||
if (OSBTN_YES == button && gViewerWindow)
|
||||
{
|
||||
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
|
||||
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
|
||||
if (gViewerWindow->getWindow())
|
||||
{
|
||||
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1364,9 +1366,9 @@ bool LLAppViewer::init()
|
|||
gGLActive = FALSE;
|
||||
|
||||
// <FS:Ansariel> Disable updater
|
||||
//#if LL_RELEASE_FOR_DOWNLOAD
|
||||
// if (!gSavedSettings.getBOOL("CmdLineSkipUpdater"))
|
||||
// {
|
||||
//#if LL_RELEASE_FOR_DOWNLOAD
|
||||
// if (!gSavedSettings.getBOOL("CmdLineSkipUpdater"))
|
||||
// {
|
||||
// LLProcess::Params updater;
|
||||
// updater.desc = "updater process";
|
||||
// // Because it's the updater, it MUST persist beyond the lifespan of the
|
||||
|
|
@ -1531,6 +1533,13 @@ bool LLAppViewer::init()
|
|||
LLSelectMgr::createInstance();
|
||||
LLViewerCamera::createInstance();
|
||||
|
||||
#if LL_WINDOWS
|
||||
if (!mSecondInstance)
|
||||
{
|
||||
gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath());
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1815,6 +1824,12 @@ bool LLAppViewer::doFrame()
|
|||
LL_PROFILE_ZONE_NAMED("Shutdown:SaveSnapshot");
|
||||
pauseMainloopTimeout();
|
||||
saveFinalSnapshot();
|
||||
|
||||
if (LLVoiceClient::instanceExists())
|
||||
{
|
||||
LLVoiceClient::getInstance()->terminate();
|
||||
}
|
||||
|
||||
disconnectViewer();
|
||||
resumeMainloopTimeout();
|
||||
}
|
||||
|
|
@ -2689,78 +2704,90 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
|
|||
|
||||
void LLAppViewer::initLoggingAndGetLastDuration()
|
||||
{
|
||||
//
|
||||
// Set up logging defaults for the viewer
|
||||
//
|
||||
LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
|
||||
//
|
||||
// Set up logging defaults for the viewer
|
||||
//
|
||||
LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
|
||||
,gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")
|
||||
);
|
||||
LLError::addGenericRecorder(&errorCallback);
|
||||
//LLError::setTimeFunction(getRuntime);
|
||||
LLError::addGenericRecorder(&errorCallback);
|
||||
//LLError::setTimeFunction(getRuntime);
|
||||
|
||||
// <FS:Ansariel> Remove old CEF log file (defined in dullahan.h)
|
||||
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt"));
|
||||
|
||||
// Remove the last ".old" log file.
|
||||
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
APP_NAME + ".old");
|
||||
LLFile::remove(old_log_file);
|
||||
if (mSecondInstance)
|
||||
{
|
||||
LLFile::mkdir(gDirUtilp->getDumpLogsDirPath());
|
||||
|
||||
LLUUID uid;
|
||||
uid.generate();
|
||||
LLError::logToFile(gDirUtilp->getDumpLogsDirPath(uid.asString() + ".log"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Remove old CEF log file (defined in dullahan.h)
|
||||
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt"));
|
||||
|
||||
// Get name of the log file
|
||||
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
APP_NAME + ".log");
|
||||
/*
|
||||
* Before touching any log files, compute the duration of the last run
|
||||
* by comparing the ctime of the previous start marker file with the ctime
|
||||
* of the last log file.
|
||||
*/
|
||||
std::string start_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, START_MARKER_FILE_NAME);
|
||||
llstat start_marker_stat;
|
||||
llstat log_file_stat;
|
||||
std::ostringstream duration_log_stream; // can't log yet, so save any message for when we can below
|
||||
int start_stat_result = LLFile::stat(start_marker_file_name, &start_marker_stat);
|
||||
int log_stat_result = LLFile::stat(log_file, &log_file_stat);
|
||||
if ( 0 == start_stat_result && 0 == log_stat_result )
|
||||
{
|
||||
int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
|
||||
// only report a last run time if the last viewer was the same version
|
||||
// because this stat will be counted against this version
|
||||
if ( markerIsSameVersion(start_marker_file_name) )
|
||||
{
|
||||
gLastExecDuration = elapsed_seconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration_log_stream << "start marker from some other version; duration is not reported";
|
||||
gLastExecDuration = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// at least one of the LLFile::stat calls failed, so we can't compute the run time
|
||||
duration_log_stream << "duration stat failure; start: "<< start_stat_result << " log: " << log_stat_result;
|
||||
gLastExecDuration = -1; // unknown
|
||||
}
|
||||
std::string duration_log_msg(duration_log_stream.str());
|
||||
// Remove the last ".old" log file.
|
||||
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
APP_NAME + ".log");
|
||||
LLFile::remove(old_log_file);
|
||||
|
||||
// Create a new start marker file for comparison with log file time for the next run
|
||||
LLAPRFile start_marker_file ;
|
||||
start_marker_file.open(start_marker_file_name, LL_APR_WB);
|
||||
if (start_marker_file.getFileHandle())
|
||||
{
|
||||
recordMarkerVersion(start_marker_file);
|
||||
start_marker_file.close();
|
||||
}
|
||||
// Get name of the log file
|
||||
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
APP_NAME + ".log");
|
||||
/*
|
||||
* Before touching any log files, compute the duration of the last run
|
||||
* by comparing the ctime of the previous start marker file with the ctime
|
||||
* of the last log file.
|
||||
*/
|
||||
std::string start_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, START_MARKER_FILE_NAME);
|
||||
llstat start_marker_stat;
|
||||
llstat log_file_stat;
|
||||
std::ostringstream duration_log_stream; // can't log yet, so save any message for when we can below
|
||||
int start_stat_result = LLFile::stat(start_marker_file_name, &start_marker_stat);
|
||||
int log_stat_result = LLFile::stat(log_file, &log_file_stat);
|
||||
if (0 == start_stat_result && 0 == log_stat_result)
|
||||
{
|
||||
int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
|
||||
// only report a last run time if the last viewer was the same version
|
||||
// because this stat will be counted against this version
|
||||
if (markerIsSameVersion(start_marker_file_name))
|
||||
{
|
||||
gLastExecDuration = elapsed_seconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration_log_stream << "start marker from some other version; duration is not reported";
|
||||
gLastExecDuration = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// at least one of the LLFile::stat calls failed, so we can't compute the run time
|
||||
duration_log_stream << "duration stat failure; start: " << start_stat_result << " log: " << log_stat_result;
|
||||
gLastExecDuration = -1; // unknown
|
||||
}
|
||||
std::string duration_log_msg(duration_log_stream.str());
|
||||
|
||||
// Rename current log file to ".old"
|
||||
LLFile::rename(log_file, old_log_file);
|
||||
// Create a new start marker file for comparison with log file time for the next run
|
||||
LLAPRFile start_marker_file;
|
||||
start_marker_file.open(start_marker_file_name, LL_APR_WB);
|
||||
if (start_marker_file.getFileHandle())
|
||||
{
|
||||
recordMarkerVersion(start_marker_file);
|
||||
start_marker_file.close();
|
||||
}
|
||||
|
||||
// Set the log file to SecondLife.log
|
||||
LLError::logToFile(log_file);
|
||||
if (!duration_log_msg.empty())
|
||||
{
|
||||
LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
|
||||
}
|
||||
// Rename current log file to ".old"
|
||||
LLFile::rename(log_file, old_log_file);
|
||||
|
||||
// Set the log file to SecondLife.log
|
||||
LLError::logToFile(log_file);
|
||||
if (!duration_log_msg.empty())
|
||||
{
|
||||
LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
|
||||
|
|
@ -3741,6 +3768,15 @@ bool LLAppViewer::initWindow()
|
|||
|
||||
void LLAppViewer::writeDebugInfo(bool isStatic)
|
||||
{
|
||||
#if LL_WINDOWS && LL_BUGSPLAT
|
||||
// bugsplat does not create dump folder and debug logs are written directly
|
||||
// to logs folder, so it conflicts with main instance
|
||||
if (mSecondInstance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Try to do the minimum when writing data during a crash.
|
||||
std::string* debug_filename;
|
||||
debug_filename = ( isStatic
|
||||
|
|
@ -4243,7 +4279,7 @@ void LLAppViewer::writeSystemInfo()
|
|||
gDebugInfo["Dynamic"] = LLSD::emptyMap();
|
||||
|
||||
// <FS:ND> we don't want this (otherwise set filename to Firestorm.old/log
|
||||
// #if LL_WINDOWS
|
||||
// #if LL_WINDOWS && !LL_BUGSPLAT
|
||||
// gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log");
|
||||
// #else
|
||||
// //Not ideal but sufficient for good reporting.
|
||||
|
|
@ -4611,6 +4647,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
// - Other Crash (SecondLife.error_marker present)
|
||||
// These checks should also remove these files for the last 2 cases if they currently exist
|
||||
|
||||
std::ostringstream marker_log_stream;
|
||||
bool marker_is_same_version = true;
|
||||
// first, look for the marker created at startup and deleted on a clean exit
|
||||
mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
|
||||
|
|
@ -4621,7 +4658,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
marker_is_same_version = markerIsSameVersion(mMarkerFileName);
|
||||
|
||||
// now test to see if this file is locked by a running process (try to open for write)
|
||||
LL_DEBUGS("MarkerFile") << "Checking exec marker file for lock..." << LL_ENDL;
|
||||
marker_log_stream << "Checking exec marker file for lock...";
|
||||
mMarkerFile.open(mMarkerFileName, LL_APR_WB);
|
||||
// <FS:ND> Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
|
||||
//apr_file_t* fMarker = mMarkerFile.getFileHandle() ;
|
||||
|
|
@ -4629,7 +4666,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
// </FS:ND>
|
||||
if (!fMarker)
|
||||
{
|
||||
LL_INFOS("MarkerFile") << "Exec marker file open failed - assume it is locked." << LL_ENDL;
|
||||
marker_log_stream << "Exec marker file open failed - assume it is locked.";
|
||||
mSecondInstance = true; // lock means that instance is running.
|
||||
}
|
||||
else
|
||||
|
|
@ -4637,7 +4674,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
// We were able to open it, now try to lock it ourselves...
|
||||
if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
|
||||
{
|
||||
LL_WARNS_ONCE("MarkerFile") << "Locking exec marker failed." << LL_ENDL;
|
||||
marker_log_stream << "Locking exec marker failed.";
|
||||
mSecondInstance = true; // lost a race? be conservative
|
||||
mMarkerFile.close(); // <FS:ND/> Cannot lock the file and take ownership. Don't keep it open
|
||||
}
|
||||
|
|
@ -4645,9 +4682,13 @@ void LLAppViewer::processMarkerFiles()
|
|||
{
|
||||
// No other instances; we've locked this file now, so record our version; delete on quit.
|
||||
recordMarkerVersion(mMarkerFile);
|
||||
LL_DEBUGS("MarkerFile") << "Exec marker file existed but was not locked; rewritten." << LL_ENDL;
|
||||
marker_log_stream << "Exec marker file existed but was not locked; rewritten.";
|
||||
}
|
||||
}
|
||||
initLoggingAndGetLastDuration();
|
||||
|
||||
std::string marker_log_msg(marker_log_stream.str());
|
||||
LL_INFOS("MarkerFile") << marker_log_msg << LL_ENDL;
|
||||
|
||||
if (mSecondInstance)
|
||||
{
|
||||
|
|
@ -4666,6 +4707,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
}
|
||||
else // marker did not exist... last exec (if any) did not freeze
|
||||
{
|
||||
initLoggingAndGetLastDuration();
|
||||
// Create the marker file for this execution & lock it; it will be deleted on a clean exit
|
||||
apr_status_t s;
|
||||
s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, TRUE);
|
||||
|
|
@ -4791,8 +4833,18 @@ void LLAppViewer::removeDumpDir()
|
|||
{
|
||||
//Call this routine only on clean exit. Crash reporter will clean up
|
||||
//its locking table for us.
|
||||
std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
|
||||
gDirUtilp->deleteDirAndContents(dump_dir);
|
||||
if (gDirUtilp->dumpDirExists()) // Check if dump dir was created this run
|
||||
{
|
||||
std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
|
||||
gDirUtilp->deleteDirAndContents(dump_dir);
|
||||
}
|
||||
|
||||
if (mSecondInstance && !isError())
|
||||
{
|
||||
std::string log_filename = LLError::logFileName();
|
||||
LLError::logToFile("");
|
||||
LLFile::remove(log_filename);
|
||||
}
|
||||
}
|
||||
|
||||
void LLAppViewer::forceQuit()
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ bool pumpMainLoop();
|
|||
void handleQuit();
|
||||
void cleanupViewer();
|
||||
void infos(const std::string& message);
|
||||
void clearDumpLogsDir();
|
||||
|
||||
// This struct is malleable; it only serves as a way to convey a number of
|
||||
// fields from llappviewermacosx.cpp's CrashMetadata_instance() function to the
|
||||
|
|
@ -47,6 +48,7 @@ struct CrashMetadata
|
|||
std::string agentFullname;
|
||||
std::string regionName;
|
||||
std::string fatalMessage;
|
||||
std::string secondLogFilePathname;
|
||||
};
|
||||
|
||||
CrashMetadata& CrashMetadata_instance();
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
#include <fstream>
|
||||
|
||||
#include "lldir.h"
|
||||
#include "lldiriterator.h"
|
||||
#include <signal.h>
|
||||
#include <CoreAudio/CoreAudio.h> // for systemwide mute
|
||||
class LLMediaCtrl; // for LLURLDispatcher
|
||||
|
|
@ -136,6 +137,14 @@ void cleanupViewer()
|
|||
gViewerAppPtr = NULL;
|
||||
}
|
||||
|
||||
void clearDumpLogsDir()
|
||||
{
|
||||
if (!LLAppViewer::instance()->isSecondInstance())
|
||||
{
|
||||
gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath());
|
||||
}
|
||||
}
|
||||
|
||||
// The BugsplatMac API is structured as a number of different method
|
||||
// overrides, each returning a different piece of metadata. But since we
|
||||
// obtain such metadata by opening and parsing a file, it seems ridiculous to
|
||||
|
|
@ -190,6 +199,24 @@ CrashMetadataSingleton::CrashMetadataSingleton()
|
|||
LLStringUtil::replaceChar(agentFullname, '_', ' ');
|
||||
regionName = get_metadata(info, "CurrentRegion");
|
||||
fatalMessage = get_metadata(info, "FatalMessage");
|
||||
|
||||
if (gDirUtilp->fileExists(gDirUtilp->getDumpLogsDirPath()))
|
||||
{
|
||||
LLDirIterator file_iter(gDirUtilp->getDumpLogsDirPath(), "*.log");
|
||||
std::string file_name;
|
||||
bool found = true;
|
||||
while(found)
|
||||
{
|
||||
if((found = file_iter.next(file_name)))
|
||||
{
|
||||
std::string log_filename = gDirUtilp->getDumpLogsDirPath(file_name);
|
||||
if(LLError::logFileName() != log_filename)
|
||||
{
|
||||
secondLogFilePathname = log_filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,24 +141,23 @@ namespace
|
|||
::CopyFileW(FS::LogfileIn.c_str(), FS::LogfileOut.c_str(), FALSE);
|
||||
// </FS:ND>
|
||||
|
||||
// send the main viewer log file
|
||||
// widen to wstring, convert to __wchar_t, then pass c_str()
|
||||
|
||||
// <FS:ND> We don't send log files
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log")));
|
||||
// </FS:ND>
|
||||
// second instance does not have own log files
|
||||
if (!LLAppViewer::instance()->isSecondInstance())
|
||||
{
|
||||
// <FS:ND> We don't send log files
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(LLError::logFileName()));
|
||||
// </FS:ND>
|
||||
|
||||
sBugSplatSender->sendAdditionalFile(
|
||||
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
|
||||
}
|
||||
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
|
||||
|
||||
if (gCrashSettings.getBOOL("CrashSubmitSettings"))
|
||||
sBugSplatSender->sendAdditionalFile( WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
|
||||
|
||||
|
||||
sBugSplatSender->sendAdditionalFile(
|
||||
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
|
||||
|
||||
// We don't have an email address for any user. Hijack this
|
||||
// metadata field for the platform identifier.
|
||||
// sBugSplatSender->setDefaultUserEmail(
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ protected:
|
|||
}
|
||||
|
||||
// Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
|
||||
menu_item->setLabel(new_label);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2233,7 +2233,15 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
|
|||
LL_WARNS("ENVIRONMENT") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
|
||||
|
||||
notify = LLSD::emptyMap();
|
||||
notify["FAIL_REASON"] = result["message"].asString();
|
||||
std::string reason = result["message"].asString();
|
||||
if (reason.empty())
|
||||
{
|
||||
notify["FAIL_REASON"] = status.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
|
|
@ -2299,7 +2307,15 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
|
|||
LL_WARNS("ENVIRONMENT") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
|
||||
|
||||
notify = LLSD::emptyMap();
|
||||
notify["FAIL_REASON"] = result["message"].asString();
|
||||
std::string reason = result["message"].asString();
|
||||
if (reason.empty())
|
||||
{
|
||||
notify["FAIL_REASON"] = status.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace LLEventPolling
|
|||
namespace Details
|
||||
{
|
||||
|
||||
class LLEventPollImpl: public boost::enable_shared_from_this<LLEventPollImpl>
|
||||
class LLEventPollImpl: public std::enable_shared_from_this<LLEventPollImpl>
|
||||
{
|
||||
public:
|
||||
LLEventPollImpl(const LLHost &sender);
|
||||
|
|
@ -320,7 +320,7 @@ namespace Details
|
|||
LLEventPoll::LLEventPoll(const std::string& poll_url, const LLHost& sender):
|
||||
mImpl()
|
||||
{
|
||||
mImpl = boost::make_shared<LLEventPolling::Details::LLEventPollImpl>(sender);
|
||||
mImpl = std::make_shared<LLEventPolling::Details::LLEventPollImpl>(sender);
|
||||
mImpl->start(poll_url);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
|
||||
private:
|
||||
boost::shared_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
|
||||
std::shared_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -829,8 +829,12 @@ void LLFavoritesBarCtrl::changed(U32 mask)
|
|||
//virtual
|
||||
void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
S32 delta_width = width - getRect().getWidth();
|
||||
S32 delta_height = height - getRect().getHeight();
|
||||
|
||||
bool force_update = delta_width || delta_height || sForceReshape;
|
||||
LLUICtrl::reshape(width, height, called_from_parent);
|
||||
updateButtons();
|
||||
updateButtons(force_update);
|
||||
}
|
||||
|
||||
void LLFavoritesBarCtrl::draw()
|
||||
|
|
@ -893,8 +897,13 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
|
|||
return button_params;
|
||||
}
|
||||
|
||||
void LLFavoritesBarCtrl::updateButtons()
|
||||
void LLFavoritesBarCtrl::updateButtons(bool force_update)
|
||||
{
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mItems.clear();
|
||||
|
||||
if (!collectFavoriteItems(mItems))
|
||||
|
|
@ -925,31 +934,29 @@ void LLFavoritesBarCtrl::updateButtons()
|
|||
const child_list_t* childs = getChildList();
|
||||
child_list_const_iter_t child_it = childs->begin();
|
||||
int first_changed_item_index = 0;
|
||||
// <FS:Ansariel> Allow V3 and FS style favorites bar
|
||||
//int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
|
||||
int rightest_point = getRect().mRight - mMoreCtrl->getRect().getWidth();
|
||||
// </FS:Ansariel>
|
||||
//lets find first changed button
|
||||
while (child_it != childs->end() && first_changed_item_index < mItems.size())
|
||||
{
|
||||
LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
|
||||
if (button)
|
||||
{
|
||||
const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
|
||||
if (item)
|
||||
{
|
||||
// an child's order and mItems should be same
|
||||
if (button->getLandmarkId() != item->getUUID() // sort order has been changed
|
||||
|| button->getLabelSelected() != item->getName() // favorite's name has been changed
|
||||
|| button->getRect().mRight < rightest_point) // favbar's width has been changed
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
first_changed_item_index++;
|
||||
}
|
||||
child_it++;
|
||||
}
|
||||
if (!force_update)
|
||||
{
|
||||
//lets find first changed button
|
||||
while (child_it != childs->end() && first_changed_item_index < mItems.size())
|
||||
{
|
||||
LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
|
||||
if (button)
|
||||
{
|
||||
const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
|
||||
if (item)
|
||||
{
|
||||
// an child's order and mItems should be same
|
||||
if (button->getLandmarkId() != item->getUUID() // sort order has been changed
|
||||
|| button->getLabelSelected() != item->getName()) // favorite's name has been changed
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
first_changed_item_index++;
|
||||
}
|
||||
child_it++;
|
||||
}
|
||||
}
|
||||
// now first_changed_item_index should contains a number of button that need to change
|
||||
|
||||
if (first_changed_item_index <= mItems.size())
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; }
|
||||
|
||||
protected:
|
||||
void updateButtons();
|
||||
void updateButtons(bool force_update = false);
|
||||
LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset );
|
||||
const LLButton::Params& getButtonParams();
|
||||
BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,8 @@ void LLFloaterBuyLandUI::draw()
|
|||
// virtual
|
||||
BOOL LLFloaterBuyLandUI::canClose()
|
||||
{
|
||||
bool can_close = (mTransaction ? FALSE : TRUE) && mCurrency.canCancel();
|
||||
// mTransactionType check for pre-buy estimation stage and mCurrency to allow exit after transaction
|
||||
bool can_close = !mTransaction && (mTransactionType != TransactionBuy || mCurrency.canCancel());
|
||||
if (!can_close)
|
||||
{
|
||||
// explain to user why they can't do this, see DEV-9605
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
#include "llwindow.h"
|
||||
|
||||
#include "llnotificationsutil.h" // <FS:Zi> Add float LSL color entry widgets
|
||||
#include <boost/algorithm/string_regex.hpp>
|
||||
#include "llregex.h"
|
||||
|
||||
// System includes
|
||||
#include <sstream>
|
||||
|
|
@ -773,7 +773,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
|
|||
|
||||
std::string reg_ex("[[:xdigit:]]{6}");
|
||||
boost::regex pattern(reg_ex.c_str());
|
||||
if (!boost::regex_match(hex_string, pattern))
|
||||
if (!ll_regex_match(hex_string, pattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1457,14 +1457,22 @@ void LLFloaterEditExtDayCycle::reblendSettings()
|
|||
{
|
||||
F64 position = mTimeSlider->getCurSliderValue();
|
||||
|
||||
if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
|
||||
if (mSkyBlender)
|
||||
{
|
||||
mSkyBlender->switchTrack(mCurrentTrack, position);
|
||||
if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
|
||||
{
|
||||
mSkyBlender->switchTrack(mCurrentTrack, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSkyBlender->setPosition(position);
|
||||
}
|
||||
}
|
||||
else
|
||||
mSkyBlender->setPosition(position);
|
||||
|
||||
mWaterBlender->setPosition(position);
|
||||
if (mWaterBlender)
|
||||
{
|
||||
mWaterBlender->setPosition(position);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::doApplyCommit(LLSettingsDay::ptr_t day)
|
||||
|
|
|
|||
|
|
@ -248,6 +248,29 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
|
|||
region_flags = flags;
|
||||
}
|
||||
|
||||
if (msg->has(_PREHASH_RegionInfo5))
|
||||
{
|
||||
F32 chat_whisper_range;
|
||||
F32 chat_normal_range;
|
||||
F32 chat_shout_range;
|
||||
F32 chat_whisper_offset;
|
||||
F32 chat_normal_offset;
|
||||
F32 chat_shout_offset;
|
||||
U32 chat_flags;
|
||||
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperRange, chat_whisper_range);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalRange, chat_normal_range);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutRange, chat_shout_range);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperOffset, chat_whisper_offset);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalOffset, chat_normal_offset);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutOffset, chat_shout_offset);
|
||||
msg->getU32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatFlags, chat_flags);
|
||||
|
||||
LL_INFOS() << "Whisper range: " << chat_whisper_range << " normal range: " << chat_normal_range << " shout range: " << chat_shout_range
|
||||
<< " whisper offset: " << chat_whisper_offset << " normal offset: " << chat_normal_offset << " shout offset: " << chat_shout_offset
|
||||
<< " chat flags: " << chat_flags << LL_ENDL;
|
||||
}
|
||||
|
||||
if (host != gAgent.getRegionHost())
|
||||
{
|
||||
// Update is for a different region than the one we're in.
|
||||
|
|
|
|||
|
|
@ -520,9 +520,12 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p
|
|||
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid);
|
||||
|
||||
// If not already present, create the participant view and attach it to the root, otherwise, just refresh it
|
||||
if (widget && update_view)
|
||||
if (widget)
|
||||
{
|
||||
updateConversationViewParticipant(uuid); // overkill?
|
||||
if (update_view)
|
||||
{
|
||||
updateConversationViewParticipant(uuid); // overkill?
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ void LLFloaterLinkReplace::onStartClicked()
|
|||
else
|
||||
{
|
||||
LLSD args;
|
||||
args["TYPE"] = LLWearableType::getTypeName(source_item->getWearableType());
|
||||
args["TYPE"] = LLWearableType::getInstance()->getTypeName(source_item->getWearableType());
|
||||
params.substitutions(args);
|
||||
LLNotifications::instance().add(params);
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue