Commit Graph

128 Commits (f5d4e5f50ac3645b8fec7c9ee474bdb8ccacea3f)

Author SHA1 Message Date
Ansariel 5f1a19af72 Merge remote-tracking branch 'LL/marchcat/x-ws-merge'
# Conflicts:
#	autobuild.xml
#	indra/linux_crash_logger/llcrashloggerlinux.cpp
#	indra/newview/llappviewerlinux_api.h
#	indra/newview/llappviewerlinux_api_dbus.cpp
#	indra/newview/llappviewerlinux_api_dbus.h
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llcallbacklist.cpp
#	indra/newview/llimpanel.h
2024-05-01 12:30:57 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Ansariel c63b3eca4c Merge branch 'DRTVWR-588-maint-W' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llui/llurlregistry.cpp
#	indra/newview/llcontrolavatar.cpp
2024-03-01 21:00:56 +01:00
Alexander Gavriliuk a2552a5556 Build fix for Visual Studio patch 2024-02-08 23:44:34 +03:00
Ansariel aa7c8eeaef Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcommon/llprofiler.h
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llinventorymodel.cpp
#	indra/newview/llstartup.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
2023-11-07 11:56:19 +01:00
Brad Kittenbrink (Brad Linden) b9b38db567 Fix for SL-19968 objects missing timing bug due to stall during login
ensure inventory skeleton loading doesn't block the message system from processing packets.
2023-11-03 09:49:48 -07:00
Ansariel 75b2ac651a Merge branch 'DRTVWR-582-maint-U' of https://github.com/secondlife/viewer 2023-05-31 10:36:37 +02:00
Andrey Lihatskiy 3b13c0ca15 DRTVWR-582 xcode-14.3 merge follow up 2023-05-26 21:01:15 +03:00
Andrey Lihatskiy b9cd6e2e84 Merge branch 'xcode-14.3' into DRTVWR-582-maint-U
# Conflicts:
#	indra/llcommon/llsdserialize.h
2023-05-26 06:15:49 +03:00
simon 55460b4958 SL-19711 - viewer can't parse environments. Fixed max parsing bug
(cherry picked from commit eb0516b9940f200b32349d611f38f1ccee48005d)
2023-05-24 00:25:57 +01:00
Nat Goodspeed 626bbe5032 SL-18837: Fix call to strip_deprecated_header().
Pass llssize instead of S32.
2023-05-22 19:14:48 -04:00
Nat Goodspeed 84278d0d2c SL-18837: Merge branch 'xcode-14.1' of secondlife/viewer into xcode-14.3 2023-05-19 17:21:51 -04:00
Nat Goodspeed 22a07b1121 SL-18330: fix strip_deprecated_header(cur_size) param to llssize. 2023-05-03 12:48:22 -04:00
Ansariel 9b93864eb9 Merge branch 'DRTVWR-582-maint-U' of https://github.com/secondlife/viewer
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/llcommon/tests/llleap_test.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llfilepicker_mac.mm
#	indra/newview/llinventorymodel.cpp
#	indra/newview/llstartup.cpp
#	indra/newview/llurldispatcher.cpp
#	indra/newview/llvieweraudio.cpp
#	indra/newview/skins/default/xui/en/menu_viewer.xml
#	indra/newview/skins/default/xui/en/strings.xml
2023-04-21 14:22:42 +02:00
Andrey Lihatskiy f1095d7831 Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts:
#	indra/cmake/CMakeLists.txt
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/llcommon/tests/llleap_test.cpp
#	indra/newview/llfilepicker.h
#	indra/newview/llfilepicker_mac.h
#	indra/newview/llfilepicker_mac.mm
#	indra/newview/skins/default/xui/en/strings.xml
2023-04-07 00:20:59 +03:00
Ansariel fbba091194 Change this according to Nat Linden 2023-03-03 22:54:01 +01:00
Nat Goodspeed 6cb6385bc7 SL-18330: Tweaks for Visual Studio builds 2023-03-01 16:37:55 -05:00
Nat Goodspeed c18f0a61ab SL-18330: Fix a narrowing conversion in LLSDSerialize::deserialize(). 2023-03-01 14:35:04 -05:00
Ansariel f65cddf860 Merge branch 'contribute' of https://github.com/secondlife/viewer
# Conflicts:
#	autobuild.xml
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/lluuid.cpp
#	indra/llcommon/lluuid.h
#	indra/llprimitive/llmodel.cpp
#	indra/newview/llfilepicker.cpp
#	indra/newview/llfilepicker.h
#	indra/newview/llfilepicker_mac.h
#	indra/newview/llfilepicker_mac.mm
#	indra/newview/llinventorymodel.cpp
#	indra/newview/llviewerwearable.h
#	indra/newview/skins/default/xui/da/floater_about.xml
#	indra/newview/skins/default/xui/da/floater_fs_voice_controls.xml
#	indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/de/floater_about.xml
#	indra/newview/skins/default/xui/de/floater_perm_prefs.xml
#	indra/newview/skins/default/xui/de/menu_inspect_avatar_gear.xml
#	indra/newview/skins/default/xui/de/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/en/floater_about.xml
#	indra/newview/skins/default/xui/en/strings.xml
#	indra/newview/skins/default/xui/es/floater_about.xml
#	indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml
#	indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/fr/floater_about.xml
#	indra/newview/skins/default/xui/fr/floater_perm_prefs.xml
#	indra/newview/skins/default/xui/fr/menu_inspect_avatar_gear.xml
#	indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/it/floater_about.xml
#	indra/newview/skins/default/xui/it/floater_perm_prefs.xml
#	indra/newview/skins/default/xui/it/menu_inspect_avatar_gear.xml
#	indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/ja/floater_fs_voice_controls.xml
#	indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/pl/floater_about.xml
#	indra/newview/skins/default/xui/pl/floater_about_land.xml
#	indra/newview/skins/default/xui/pl/floater_animation_bvh_preview.xml
#	indra/newview/skins/default/xui/pl/floater_associate_listing.xml
#	indra/newview/skins/default/xui/pl/notifications.xml
#	indra/newview/skins/default/xui/pl/panel_group_creation_sidetray.xml
#	indra/newview/skins/default/xui/pl/panel_outfit_gallery.xml
#	indra/newview/skins/default/xui/pl/panel_outfit_snapshot_inventory.xml
#	indra/newview/skins/default/xui/pl/panel_profile_firstlife.xml
#	indra/newview/skins/default/xui/pl/panel_profile_pick.xml
#	indra/newview/skins/default/xui/pl/panel_profile_picks.xml
#	indra/newview/skins/default/xui/pl/panel_profile_secondlife.xml
#	indra/newview/skins/default/xui/pl/panel_region_access.xml
#	indra/newview/skins/default/xui/pl/panel_script_experience.xml
#	indra/newview/skins/default/xui/pl/strings.xml
#	indra/newview/skins/default/xui/pt/floater_about.xml
#	indra/newview/skins/default/xui/pt/floater_fs_voice_controls.xml
#	indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/ru/floater_about.xml
#	indra/newview/skins/default/xui/ru/floater_perm_prefs.xml
#	indra/newview/skins/default/xui/ru/menu_inspect_avatar_gear.xml
#	indra/newview/skins/default/xui/ru/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/tr/floater_about.xml
#	indra/newview/skins/default/xui/tr/floater_fs_voice_controls.xml
#	indra/newview/skins/default/xui/tr/menu_inspect_self_gear.xml
#	indra/newview/skins/default/xui/zh/floater_about.xml
#	indra/newview/skins/default/xui/zh/floater_fs_voice_controls.xml
#	indra/newview/skins/default/xui/zh/menu_inspect_self_gear.xml
2023-03-01 12:54:24 +01:00
Ansariel 7731ee8d50 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/newview/llmeshrepository.cpp
2023-02-28 12:44:49 +01:00
Nat Goodspeed 292bb3991b SL-18330: Fix per PR review comments. 2023-02-15 17:29:48 -05:00
Nat Goodspeed aec39a0f9f SL-18330: Merge branch 'contribute' into sl-18330-merge 2023-02-15 15:11:35 -05:00
Callum Prentice 422cd237df Fix up a couple of tiny merge conflicts after a merge with main 2023-02-13 14:12:59 -08:00
Ansariel 8d154eaa8c Merge branch 'contribute' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llappearance/llavatarappearance.cpp
#	indra/llappearance/lldriverparam.cpp
#	indra/llappearance/llwearable.cpp
#	indra/llcommon/llerror.cpp
#	indra/llcommon/llqueuedthread.cpp
#	indra/llcommon/llsdserialize.h
#	indra/llcommon/llthreadsafequeue.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llpathfindingnavmesh.cpp
#	indra/newview/llviewerassetstorage.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/skins/default/xui/de/floater_flickr.xml
#	indra/newview/skins/default/xui/de/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/en/floater_about_land.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
#	indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
#	indra/newview/skins/default/xui/fr/floater_flickr.xml
#	indra/newview/skins/default/xui/fr/panel_flickr_account.xml
#	indra/newview/skins/default/xui/fr/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/it/floater_flickr.xml
#	indra/newview/skins/default/xui/it/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/ja/floater_flickr.xml
#	indra/newview/skins/default/xui/ja/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/pl/floater_avatar_render_settings.xml
#	indra/newview/skins/default/xui/pl/floater_ban_duration.xml
#	indra/newview/skins/default/xui/pl/floater_camera_presets.xml
#	indra/newview/skins/default/xui/pl/floater_classified.xml
#	indra/newview/skins/default/xui/pl/floater_create_landmark.xml
#	indra/newview/skins/default/xui/pl/floater_delete_pref_preset.xml
#	indra/newview/skins/default/xui/pl/floater_fixedenvironment.xml
#	indra/newview/skins/default/xui/pl/floater_flickr.xml
#	indra/newview/skins/default/xui/pl/floater_linkreplace.xml
#	indra/newview/skins/default/xui/pl/floater_load_pref_preset.xml
#	indra/newview/skins/default/xui/pl/floater_my_environments.xml
#	indra/newview/skins/default/xui/pl/floater_my_scripts.xml
#	indra/newview/skins/default/xui/pl/floater_notifications_tabbed.xml
#	indra/newview/skins/default/xui/pl/floater_pick_track.xml
#	indra/newview/skins/default/xui/pl/floater_preferences_graphics_advanced.xml
#	indra/newview/skins/default/xui/pl/floater_preferences_view_advanced.xml
#	indra/newview/skins/default/xui/pl/floater_preview_trash.xml
#	indra/newview/skins/default/xui/pl/floater_profile.xml
#	indra/newview/skins/default/xui/pl/floater_settings_picker.xml
#	indra/newview/skins/default/xui/pl/floater_simple_outfit_snapshot.xml
#	indra/newview/skins/default/xui/pl/menu_avatar_rendering_settings.xml
#	indra/newview/skins/default/xui/pl/menu_avatar_rendering_settings_add.xml
#	indra/newview/skins/default/xui/pl/panel_flickr_photo.xml
#	indra/newview/skins/default/xui/pl/panel_progress.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_atmos.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_clouds.xml
#	indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml
#	indra/newview/skins/default/xui/ru/floater_flickr.xml
#	indra/newview/skins/default/xui/ru/panel_flickr_account.xml
#	indra/newview/skins/default/xui/ru/panel_flickr_photo.xml
2023-01-13 15:19:29 +01:00
Nat Goodspeed 590e158cf3 SL-18330: Adapt LLSDSerialize and tests to llssize max_bytes params. 2022-12-06 16:30:35 -05:00
Nat Goodspeed db1d757aeb DRTVWR-575: Update a few more int lengths in llsdserialize.{h,cpp}. 2022-12-06 14:40:11 -05:00
Nat Goodspeed 73aced620f DRTVWR-575: Use llssize (signed size_t) for max_bytes parameters.
Since LLSDSerialize::SIZE_UNLIMITED is negative, passing that through unsigned
size_t parameters could result in peculiar behavior.
2022-12-06 13:59:06 -05:00
Nat Goodspeed 2f557cd7fa SL-18330: Fix new C++ <-> Python LLSD compatibility tests.
When sending multiple LEAP packets in the same file (for testing convenience),
use a length prefix instead of delimiting with '\n'. Now that we allow a
serialization format that includes an LLSD format header (e.g.
"<?llsd/binary?>"), '\n' is part of the packet content. But in fact, testing
binary LLSD means we can't pick any delimiter guaranteed not to appear in the
packet content.

Using a length prefix also lets us pass a specific max_bytes to the subject
C++ LLSD parser.

Make llleap_test.cpp use new freestanding Python llsd package when available.
Update Python-side LEAP protocol code to work directly with encoded bytes
stream, avoiding bytes<->str encoding and decoding, which breaks binary LLSD.

Make LLSDSerialize::deserialize() recognize LLSD format header case-
insensitively. Python emits and checks for "llsd/binary", while LLSDSerialize
emits and checks for "LLSD/Binary". Once any of the headers is recognized,
pass corrected max_bytes to the specific parser.

Make deserialize() more careful about the no-header case: preserve '\n' in
content. Introduce debugging code (disabled) because it's a little tricky to
recreate.

Revert LLLeap child process stdout parser from LLSDSerialize::deserialize() to
the specific LLSDNotationParser(), as at present: the generic parser fails one
of LLLeap's integration tests for reasons that remain mysterious.
2022-12-02 15:17:56 -05:00
Nat Goodspeed 42e0787446 SL-18330: LLSDSerialize::deserialize() w/o hdr uses XML or notation
Absent a header from LLSDSerialize::serialize(), make deserialize()
distinguish between XML or notation by recognizing an initial '<'.
2022-11-23 17:15:15 -05:00
Nat Goodspeed abe62c23d7 SL-18330: Make LLSDSerialize::deserialize() default to notation.
LLSDSerialize::serialize() emits a header string, e.g. "<? llsd/notation ?>"
for notation format. Until now, LLSDSerialize::deserialize() has required that
header to properly decode the input stream.

But none of LLSDBinaryFormatter, LLSDXMLFormatter or LLSDNotationFormatter
emit that header themselves. Nor do any of the Python llsd.format_binary(),
format_xml() or format_notation() functions. Until now, you could not use
LLSD::deserialize() to parse an arbitrary-format LLSD stream serialized by
anything but LLSDSerialize::serialize().

Change LLSDSerialize::deserialize() so that if no header is recognized,
instead of failing, it attempts to parse as notation. Add tests to exercise
this case.

The tricky part about this processing is that deserialize() necessarily reads
some number of bytes from the input stream first, to try to recognize the
header. If it fails to do so, it must prepend the bytes it has already read to
the rest of the input stream since they're probably the beginning of the
serialized data.

To support this use case, introduce cat_streambuf, a std::streambuf subclass
that (virtually) concatenates other std::streambuf instances. When read by a
std::istream, the sequence of underlying std::streambufs appears to the
consumer as a single continuous stream.
2022-11-22 16:21:44 -05:00
Nat Goodspeed 4349cb6165 DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
2022-11-12 18:59:21 -10:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04:00
Ansariel 2aceea66ff Merge branch 'DRTVWR-570-maint-Q' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llmath/llvolume.cpp
#	indra/llmath/llvolume.h
#	indra/newview/llfloateropenobject.cpp
#	indra/newview/llfloateropenobject.h
#	indra/newview/llmaterialmgr.cpp
#	indra/newview/llmeshrepository.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/skins/default/xui/en/floater_openobject.xml
2022-10-01 13:10:39 +02:00
Ansariel 90319f9ef1 Revert "non-allocating unzip_llsd - from Rye"
This reverts commit 4eeb96a935.
2022-10-01 11:51:44 +02:00
Rye Mutt 1b31ab5c52 Introduce a U8* based interface to unzip_llsd and unpackVolumeFaces 2022-09-27 17:59:21 -04:00
Ansariel a0837a5298 Merge branch 'DRTVWR-543-maint' of https://bitbucket.org/lindenlab/viewer 2022-01-14 13:46:29 +01:00
Andrey Kleshchev 5af8f15a05 SL-14541 Replace zlib with zlib-ng 2021-09-08 23:18:07 +03:00
Beq 4eeb96a935 non-allocating unzip_llsd - from Rye 2021-06-10 21:41:55 +01:00
Nicky Dasmijn 27715d4d03 Merge remote-tracking branch 'll/d476' into fs-eep-vs2017-d476 2020-05-21 06:54:02 +02:00
Nat Goodspeed a83da3a452 DRTVWR-476: Make LLSDFormatter::OPTIONS_PRETTY_BINARY uppercase
for compatibility with Python llbase.llsd.parse().

The Python parse() currently requires uppercase hex digits for b16"hex"
coding; lowercase hex digits cause it to raise LLSDParseError.
2020-05-14 08:54:15 -04:00
Nat Goodspeed 066fb5dafc DRTVWR-476: Default LLSDNotationFormatter now OPTIONS_PRETTY_BINARY.
LLSDNotationFormatter (also LLSDNotationStreamer that uses it, plus
operator<<(std::ostream&, const LLSD&) that uses LLSDNotationStreamer) is most
useful for displaying LLSD to a human, e.g. for logging. Having the default
dump raw binary bytes into the log file is not only suboptimal, it can
truncate the output if one of those bytes is '\0'. (This is a problem with the
logging subsystem, but that's a story for another day.)

Use OPTIONS_PRETTY_BINARY wherever there is a default LLSDFormatter
::EFormatterOptions argument.

Also, allow setting LLSDFormatter subclass boolalpha(), realFormat() and
format(options) using optional constructor arguments. Naturally, each subclass
that supports this must accept and forward these constructor arguments to its
LLSDFormatter base class constructor.

Fix a couple bugs in LLSDNotationFormatter::format_impl() for an LLSD::Binary
value with OPTIONS_PRETTY_BINARY:
- The code unconditionally emitted a b(len) type prefix followed by either raw
  binary or hex, depending on the option flag. OPTIONS_PRETTY_BINARY caused it
  to emit "0x" before the hex representation of the data. This is wrong in
  that it can't be read back by either the C++ or the Python LLSD parser.
  Correct OPTIONS_PRETTY_BINARY formatting consists of b16"hex digits" rather
  than b(len)"raw bytes".
- Although the code did set hex mode, it didn't set either the field width or
  the fill character, so that a byte value less than 16 would emit a single
  digit rather than two.

Instead of having one LLSDFormatter::format() method with an optional options
argument, declare two overloads. The format() overload without options passes
the mOptions data member to the overload accepting options.

Refactor the LLSDFormatter family, hoisting the recursive format_impl() method
(accepting level) to a pure virtual method at LLSDFormatter base-class level.
Most subclasses therefore need not override either base-class format() method,
only format_impl(). In fact the short format() overload isn't even virtual.

Consistently use LLSDFormatter::EFormatterOptions enum as the options
parameter wherever such options are accepted.
2020-05-13 16:37:12 -04:00
Andrey Lihatskiy c757c29c95 Merge branch 'master' into DRTVWR-500
# Conflicts:
#	indra/newview/pipeline.cpp
2020-04-20 21:23:34 +03:00
Ansariel da365b227e Merge Firestorm LGPL 2019-12-13 18:15:19 +01:00
Ansariel 6e340961c0 Merge viewer-neko 2019-10-30 18:05:01 +01:00
andreykproductengine 1b4d5492c6 SL-11727 Fix build warnings 2019-10-23 16:37:15 +03:00
Ansariel 1733550573 Merge viewer-eep 2018-09-22 00:42:04 +02:00
Rider Linden 3888de9439 Merge 2018-05-22 13:16:37 -07:00
Rider Linden 7b56db31f9 Merge 2018-03-07 11:27:43 -08:00
Ansariel c4e18fbcaa Merge viewer-neko 2018-02-27 18:08:48 +01:00
Rider Linden b766466b30 Added settings inventory object with subtype 2018-02-26 09:27:14 -08:00