Commit Graph

91 Commits (94cfce4a4d2dbc799e5e8a3495a628ae85d4cffe)

Author SHA1 Message Date
Andrey Kleshchev a2c8661636 viewer#2972 Fix viewer stripping quotes off folder names 2024-10-30 18:34:04 +02:00
Ansariel Hiller 74205607b7
Clean up Windows build (#2562)
* APR_DECLARE_STATIC and APU_DECLARE_STATIC gets already defined in APR.cmake
* Move both _CRT_SECURE_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS definitions to 00-Common.cmake
* Always define WIN32_LEAN_AND_MEAN and include subset of Windows API by default
* Remove llwin32headerslean.h and remove unnecessary WIN32_LEAN_AND_MEAN definition handling in llwin32headers.h
* Clean up includes of Windows API headers
* Get rid of workaround to link against IPHLPAPI.lib in lluuid.cpp - this seems to have been an issue in the past that has been fixed
2024-09-13 17:28:48 +03:00
Rye Mutt 15877bf396 Whitespace fix 2024-07-22 11:03:11 -04:00
Andrey Lihatskiy a5a7c7c8f5
Merge pull request #1949 from sldevel/xmlrpc-crash-fix
Fix for crash in XMLRPC reply decoding on login with large inventories
2024-07-09 01:17:22 +03:00
Henri Beauchamp db6fdcf2df Spacing-anality :-D 2024-07-09 00:00:29 +02:00
Henri Beauchamp 989cfe2f70 Fix for crash in XMLRPC reply decoding on login with large inventories
Commit 2ea5ac0c43 introduced a crash bug
due to the recursive construction of the XMLTreeNode wrapper class.
The constructor of the said class typically recurses twice as many times
as there are entries in the user's inventory list.

This commit:
- Moves the fromXMLRPCValue() method and its helper functions from the LLSD
  class/module to the LLXMLNode class, where it belongs, thus making
  LLSD::TreeNode (which was a wrapper class to avoid making llcommon
  dependant on llxml, which is still the case after this commit) totally
  moot; the fromXMLRPCValue() call is now done directly on the LLXMLNode.
- Moves the XML and XMLRPC decoding code out of the HTTP coroutine
  LLXMLRPCTransaction::Handler (coroutines got an even smaller and fixed
  stack), and into LLXMLRPCTransaction::Impl::process().
- Removes XMLTreeNode entirely, fixing the crash as a result.
2024-07-08 23:18:02 +02:00
Ansariel 9fdca96f8b Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now 2024-07-08 20:27:14 +02:00
Alexander Gavriliuk 2ea5ac0c43 #1111 Remove xmlrpc-epi 2024-07-01 20:20:04 +02:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +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
AiraYumi 7c8907522f replace boost library to standard 2024-01-08 23:29:21 +02:00
Brad Linden 673b3309dd Merge remote-tracking branch 'origin/main' into DRTVWR-559 2023-10-25 16:12:13 -07:00
Nat Goodspeed 117f07e5a4 SL-18837: Avoid stuffing build number into 32-bit int.
Even though LLVersionInfo::getBuild() already returns a 64-bit int, various
consumers assumed it could fit into 32 bits. It was especially bad to pass it
to a classic C style varargs function. Only on a little-endian CPU, and only
because it was the last argument, the damage was limited to truncation --
instead of arbitrary undefined behavior.

Where the consumer doesn't support 64-bit ints, pass as string instead.
2023-10-17 06:33:05 -04:00
Nat Goodspeed 3c63cc9c55 SL-18837: Make LLVersionInfo::getBuild() S64 for GitHub run IDs. 2023-06-28 18:36:51 -04:00
Brad Linden a548c16989 Merge remote-tracking branch 'origin/main' into DRTVWR-559 2023-03-29 14:54:06 -07:00
Nat Goodspeed fc424a0db9 SL-18809: Add WorkSchedule; remove timestamps from WorkQueue.
For work queues that don't need timestamped tasks, eliminate the overhead of a
priority queue ordered by timestamp. Timestamped task support moves to
WorkSchedule. WorkQueue is a simpler queue that just waits for work.

Both WorkQueue and WorkSchedule can be accessed via new WorkQueueBase API. Of
course the WorkQueueBase API doesn't deal with timestamps, but a WorkSchedule
can be accessed directly to post timestamped tasks and then handled normally
(e.g. by ThreadPool) to run them.

Most ThreadPool functionality migrates to new ThreadPoolBase class, with
template subclass ThreadPoolUsing<WorkQueue> or ThreadPoolUsing<WorkSchedule>
depending on need. ThreadPool is now an alias for ThreadPoolUsing<WorkQueue>.
Importantly, ThreadPoolUsing::getQueue() delivers a reference to the specific
queue subclass type, so you can post timestamped tasks on a queue retrieved
from ThreadPoolUsing<WorkSchedule>::getQueue().

Since ThreadPool is no longer a simple class but an alias for a particular
template specialization, introduce threadpool_fwd.h to forward-declare it.

Recast workqueue_test.cpp to exercise WorkSchedule, since some of the tests
are time-based. A future todo would be to exercise each applicable test with
both WorkQueue and WorkSchedule.
2022-12-09 13:21:45 -05:00
Nicky Dasmijn 0710d95f4b Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into DRTVWR-568_cmake 2022-09-16 23:15:49 +02:00
Andrey Kleshchev 7649114588 Merge branch master (DRTVWR-571) into DRTVWR-559
# Conflicts:
#	indra/newview/llpanelface.cpp
#	indra/newview/llpanelface.h
2022-09-16 21:07:39 +03:00
Nicky dcfb94fbac - More include changes for xmlrpc.h
- New versions of curl have the same value for CURLE_SSL_PEER_CERTIFICATE and  CURLE_SSL_CACERT
2022-04-18 18:05:37 +02:00
Dave Parks b6841d75c2 SL-17219 WIP - Texture pipeline overhaul 2022-04-15 19:02:07 -05:00
Andrey Kleshchev 57f654e2ed SL-16192 Add version info into LLXMLRPCTransaction's http header 2021-11-08 22:43:23 +02:00
Andrey Kleshchev 2de92430ef Revert "SL-15141 Update CURL to 7.76.1" due to OPS-4251
This reverts commit 45b5ac72b2 and updates curl links
2021-04-20 19:42:39 +03:00
Andrey Kleshchev 45b5ac72b2 SL-15141 Update CURL to 7.76.1
CURLE_SSL_CACERT is now identical to CURLE_SSL_PEER_CERTIFICATE
2021-04-20 02:12:16 +03:00
Andrey Kleshchev 82e5f6c24f SL-12421 Viewer's certificate validation does not reject connections 2020-03-04 19:13:55 +02:00
andreykproductengine d785c87d62 SL-2364 Fixed Viewer Caches Login Host DNS Entries Indefinetely 2019-01-29 21:33:31 +02:00
AndreyL ProductEngine 21d4ce26d3 INTL-324 added support for TLS failure dialog localization 2018-12-12 00:11:16 +02:00
andreykproductengine a48ff6c2fa SL-10172 Add a KB link to the TLS failure dialog 2018-12-06 19:50:33 +02:00
Oz Linden d62ad1ef8a merge changes for 5.0.8-release 2017-10-11 09:13:55 -04:00
andreykproductengine 1a5fa01fb8 MAINT-7495 Viewer retries too many time apon 504 from login.cgi 2017-07-24 17:06:12 +03:00
Oz Linden fd3628ef45 Change certificate store infrastructure to key off of the Subject Key
Id rather than sha1 hash, since that is rarely used in modern
certs. The previous form was storing trusted certs using an empty sha1
hash value as the key, which meant most certificates matched... not good.

Modify the LLCertException to pass certificate information back as
LLSD rather than an LLPointer<LLCertificate>, because when the
exception is being thown from the certificate constructor that results
in one of a couple of other exceptions (even refcounting won't save
you when the problem is that the thing you're pointing to never
finished coming into being properly).

Update the certificates in the llsechandler_basic_test to modern
conventions, and extend the classes to allow for an optional
validation date so that the test can use a fixed date. Also make all
the certificates include the plain text form for ease of reference.
2017-04-14 16:05:59 -04:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden bbb9d4f21b MAINT-5732: Change to the way event polling handles error conditions and cancel calls.
Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr
Started minor refactor in the materials manager into coroutines (unfinished)
2015-10-14 17:46:24 -07:00
Rider Linden 907efc9cc9 MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp lib 2015-09-15 17:01:26 -07:00
Rider Linden fe5567639d Change HttpOptions::ptr_t to be shared_ptr<> rather than intrusive. 2015-07-08 12:09:36 -07:00
Rider Linden 1138c57f9a Convert LLCore::HttpHeaders to use shared_ptr<> rather than an intrusive_ptr<> for refrence counting. 2015-07-08 10:01:27 -07:00
Nat Goodspeed 80d17b2dd9 MAINT-4952: Use IntrusivePtr for BufferArray,HttpHeaders,HttpOptions.
Specifically, change the ptr_t typedefs for these LLCore classes to use
IntrusivePtr rather than directly using boost::intrusive_ptr. This allows us
to use a simple ptr_t(raw ptr) constructor rather than having to remember to
code ptr_t(raw ptr, false) everywhere. In fact, the latter form is now invalid:
remove the now-extraneous 'false' constructor parameters.
2015-06-29 17:19:51 -04:00
Rider Linden e140118fc4 Replace appearance responder with new LLCore Appearance Handler.
Prep for some slight cleanup of the code.
Add AP_AVATAR Policy
2015-03-25 11:31:11 -07:00
Rider Linden 3c46c6bcf2 Boost unique_ptr into xmlrpc 2015-03-24 10:00:30 -07:00
Rider Linden 6b8c814df3 Adding new HTTP handling for material manager. 2015-03-19 17:01:21 -07:00
Rider Linden 6f4d36634e Removal of RPCXML dep on LLCurl switching to LLCore::Html 2015-03-16 17:14:34 -07:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Brad Payne (Vir Linden) a04a706c1b merge 2013-05-21 16:18:48 -04:00
Don Kjer beeefb4526 Renaming HTTP_HEADER_* into HTTP_IN_HEADER_* and HTTP_OUT_HEADER_* to make it more clear which header strings should be used for incoming vs outgoing situations.
Using constants for commonly used llhttpnode context strings.
2013-04-04 21:50:45 +00:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Don Kjer f945415210 Large changes to the LLCurl::Responder API, as well as pulling in some changes to common libraries from the server codebase:
* Additional error checking in http handlers.
* Uniform log spam for http errors.
* Switch to using constants for http heads and status codes.
* Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error.
* Reduced spam regarding LLSD parsing errors in the default completedRaw http handler.  It should not longer be necessary to short-circuit completedRaw to avoid spam.
* Ported over a few bug fixes from the server code.
* Switch mode http status codes to use S32 instead of U32.
* Ported LLSD::asStringRef from server code; avoids copying strings all over the place.
* Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob.
* Ported server pretty notation format (and pretty binary format) to llsd serialization.

* The new LLCurl::Responder API no longer has two error handlers to choose from.  Overriding the following methods have been deprecated:
** error - use httpFailure
** errorWithContent - use httpFailure
** result - use httpSuccess
** completed - use httpCompleted
** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers.

* In order to 'catch' a completed http request, override one of these methods:
** httpSuccess - Called for any 2xx status code.
** httpFailure - Called for any non-2xx status code.
** httpComplete - Called for all status codes.  Default implementation is to call either httpSuccess or httpFailure.
* It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below).

* Uniform error handling should followed whenever possible by calling a variant of this during httpFailure:
** llwarns << dumpResponse() << llendl;
* Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context.

* In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed.
* Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class).
* Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods:
** successResult - Sets results and calls httpSuccess
** failureResult - Sets results and calls httpFailure
** completedResult - Sets results and calls httpCompleted

* To obtain information about a the response from a reponder method, use the following getters:
** getStatus - HTTP status code
** getReason - Reason string
** getContent - Content (Parsed body LLSD)
** getResponseHeaders - Response Headers (LLSD map)
** getHTTPMethod - HTTP method of the request
** getURL - URL of the request

* It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO.

* See indra/llmessage/llcurl.h for more information.
2013-03-13 06:26:25 +00:00
Richard Linden c136b43214 SH-3406 WIP convert fast timers to lltrace system
eliminated min and max macros from windows.h
got rest of viewer to compile against llfasttimer changes
2012-11-15 19:46:09 -08:00
Xiaohong Bao f082de03ff fix for SH-2845, SH-2846, SH-2847, SH-2851: curl crashes and out-of-memory crashes. 2012-01-12 16:36:56 -07:00