Compare commits
246 Commits
linux64
...
V2MultiWea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7a49da774 | ||
|
|
81242f1b5e | ||
|
|
2e073f7449 | ||
|
|
58ff4a00f1 | ||
|
|
30f49526db | ||
|
|
b194d9e012 | ||
|
|
de26fff525 | ||
|
|
ca9c99577f | ||
|
|
b0c28c5eb2 | ||
|
|
ded9d1027b | ||
|
|
8a271b9621 | ||
|
|
c5f9e8cf68 | ||
|
|
4e2af85770 | ||
|
|
5a685febbf | ||
|
|
cd2dc2f3ca | ||
|
|
9c61998dac | ||
|
|
509340237c | ||
|
|
fc3436a8d1 | ||
|
|
41983b7f27 | ||
|
|
a9494d1fb0 | ||
|
|
608417ba6b | ||
|
|
c5d19cca0b | ||
|
|
4435e7ade3 | ||
|
|
f79a16ef0f | ||
|
|
947990c2ad | ||
|
|
e36042bb76 | ||
|
|
cb5474c291 | ||
|
|
77948b8ce4 | ||
|
|
2ac4f81424 | ||
|
|
7ad1b8731d | ||
|
|
d66acdf240 | ||
|
|
8eb319d3ba | ||
|
|
d703b4e076 | ||
|
|
9ddbc132bf | ||
|
|
c464a8da30 | ||
|
|
e6689f830a | ||
|
|
ece9dda7b4 | ||
|
|
361c69edd9 | ||
|
|
d0668d818c | ||
|
|
24db228406 | ||
|
|
53a570b977 | ||
|
|
4ba1509371 | ||
|
|
399d93cc36 | ||
|
|
67e1a3b004 | ||
|
|
221e3908b9 | ||
|
|
782091ff02 | ||
|
|
c02834b7e3 | ||
|
|
15fb0ac3aa | ||
|
|
0bee4a922f | ||
|
|
5996ff1fa2 | ||
|
|
e7a3a150a7 | ||
|
|
3c2f0b551f | ||
|
|
e9df867a21 | ||
|
|
4391614d6e | ||
|
|
d63c54cb78 | ||
|
|
058720824d | ||
|
|
8f6dbfc399 | ||
|
|
eb7615ad57 | ||
|
|
7234e63ce1 | ||
|
|
5f98e24efe | ||
|
|
ebf66ebe9d | ||
|
|
26810ff16a | ||
|
|
48a2d0497b | ||
|
|
b02465822b | ||
|
|
edcbec7b76 | ||
|
|
a8ebd6eebb | ||
|
|
e6b6e8b282 | ||
|
|
56fb36bbfa | ||
|
|
94eda3aa24 | ||
|
|
a3e6e96869 | ||
|
|
102565cd3e | ||
|
|
b5535c9cc4 | ||
|
|
dadfc059c7 | ||
|
|
4c45e9a9d1 | ||
|
|
3796a216d2 | ||
|
|
21f7df0dcc | ||
|
|
5b4700a8ee | ||
|
|
0286c8bf55 | ||
|
|
a399580c84 | ||
|
|
349006637e | ||
|
|
945c663359 | ||
|
|
6b1f5c388f | ||
|
|
57641db71b | ||
|
|
891d6d3448 | ||
|
|
fd59accf96 | ||
|
|
0e2ca65084 | ||
|
|
0ad533d94d | ||
|
|
0d87d3dc1c | ||
|
|
5ce477c7cc | ||
|
|
1a217b23c6 | ||
|
|
bb8417d6be | ||
|
|
332c8f997c | ||
|
|
5228aa7029 | ||
|
|
f38e8b1981 | ||
|
|
ac2f3968c2 | ||
|
|
ab5fd28cef | ||
|
|
fb1594535e | ||
|
|
73c05eff77 | ||
|
|
9835d3b27e | ||
|
|
20f138b31f | ||
|
|
b15f2d1a56 | ||
|
|
f04aabde96 | ||
|
|
063ce180d3 | ||
|
|
c6120cd283 | ||
|
|
51a4e4960f | ||
|
|
f9e40aedce | ||
|
|
271883e737 | ||
|
|
7b2c4034f1 | ||
|
|
58c58dc845 | ||
|
|
61013dd2ab | ||
|
|
a2649ceb5a | ||
|
|
eb562c2470 | ||
|
|
ae0804beea | ||
|
|
fa4ee55308 | ||
|
|
e729bd80ce | ||
|
|
9eda9ad462 | ||
|
|
dbe50efc10 | ||
|
|
d1540040a8 | ||
|
|
bf28ce4239 | ||
|
|
8192b547a8 | ||
|
|
8dc0e16f0a | ||
|
|
5a2d160ac4 | ||
|
|
e20b383aa0 | ||
|
|
a82953d0d0 | ||
|
|
16c2235510 | ||
|
|
8e6063e7b9 | ||
|
|
4799899317 | ||
|
|
37d2e41618 | ||
|
|
fd183e01b5 | ||
|
|
75ef768e7f | ||
|
|
35bd8d90be | ||
|
|
a5faea64d9 | ||
|
|
e7649d8f1c | ||
|
|
3eccd251c0 | ||
|
|
b3d91d816d | ||
|
|
3cc37fb12b | ||
|
|
71a29e347e | ||
|
|
6b66c33b47 | ||
|
|
d03b7d052d | ||
|
|
640d9489cb | ||
|
|
3d40f96dfe | ||
|
|
817085c172 | ||
|
|
5ce00cecef | ||
|
|
bb1d94ba0e | ||
|
|
5ba68ed763 | ||
|
|
ee84500735 | ||
|
|
275c85f482 | ||
|
|
f584cb3b3b | ||
|
|
5517266bda | ||
|
|
59fdf3b6e1 | ||
|
|
e1d243272f | ||
|
|
3bd9ffe135 | ||
|
|
fd1896536e | ||
|
|
1d402bfe39 | ||
|
|
06068a0361 | ||
|
|
18ac23554f | ||
|
|
b49ad1cd34 | ||
|
|
01d6095242 | ||
|
|
7774fe7f04 | ||
|
|
29e308b5ca | ||
|
|
e7bcf1e9ec | ||
|
|
0453971a85 | ||
|
|
4da4d5fd50 | ||
|
|
db4e36a99a | ||
|
|
07ff467831 | ||
|
|
86c65e492d | ||
|
|
4770e7724c | ||
|
|
f05edda4f4 | ||
|
|
be9f3178c0 | ||
|
|
d86f67f818 | ||
|
|
3acf6dc001 | ||
|
|
ce1607cf17 | ||
|
|
fee59e83b8 | ||
|
|
caaba76921 | ||
|
|
70438fa06f | ||
|
|
3f0f955a76 | ||
|
|
196e9d6c78 | ||
|
|
459751f206 | ||
|
|
2e5ea4f5a7 | ||
|
|
cd7331453a | ||
|
|
3d6511f4e1 | ||
|
|
5ce6f7eb7d | ||
|
|
90f12f1bb9 | ||
|
|
8334277838 | ||
|
|
80e53ebb2b | ||
|
|
1e9e7d701d | ||
|
|
a57ad256b5 | ||
|
|
b4bdb7ca36 | ||
|
|
6b5df7194a | ||
|
|
0fdab061b9 | ||
|
|
896f7f5b9b | ||
|
|
f885c8667b | ||
|
|
c07d90a2ba | ||
|
|
cc459cb582 | ||
|
|
8b8fe82c8e | ||
|
|
1023088c0d | ||
|
|
b18bc08600 | ||
|
|
5d6b925823 | ||
|
|
fffbda1b90 | ||
|
|
8c721c4a69 | ||
|
|
21170e1e18 | ||
|
|
87b8f6e076 | ||
|
|
406ff6872f | ||
|
|
52b4008968 | ||
|
|
c1133cb932 | ||
|
|
1db7221508 | ||
|
|
83a3bbb48e | ||
|
|
8b6f462d13 | ||
|
|
55e589375f | ||
|
|
2b833129c5 | ||
|
|
efd1b2bfa9 | ||
|
|
5eb90ef9cd | ||
|
|
edd1b4d8e7 | ||
|
|
b67fa864ff | ||
|
|
d54c86e1df | ||
|
|
0a11f09918 | ||
|
|
2d75e8fda6 | ||
|
|
9f2b668424 | ||
|
|
502b2d30d4 | ||
|
|
355883aa5c | ||
|
|
500135941a | ||
|
|
5f7f7b7d61 | ||
|
|
251b0fa5c0 | ||
|
|
ab26e1008f | ||
|
|
ecc396219d | ||
|
|
a7d70878b7 | ||
|
|
baad415f0d | ||
|
|
fb10af2723 | ||
|
|
2f632d3324 | ||
|
|
2bf940e15d | ||
|
|
840cb29f84 | ||
|
|
dcec1cb5f2 | ||
|
|
a066730acb | ||
|
|
a6a69caa4f | ||
|
|
5c66c70546 | ||
|
|
323ec8cf59 | ||
|
|
3d39e443fe | ||
|
|
c2da7f4570 | ||
|
|
bdeead6f8e | ||
|
|
e2e65c39bf | ||
|
|
a76105a60d | ||
|
|
cf4b8cf263 | ||
|
|
b0240320ee | ||
|
|
1810a7c7f9 | ||
|
|
ae7b12f230 | ||
|
|
a90d7bbb46 |
@@ -1,23 +0,0 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,550 +0,0 @@
|
||||
The D-Bus glib bindings are licensed to you under your choice of the Academic
|
||||
Free License version 2.1, or the GNU General Public License version 2. Both
|
||||
licenses are included here. Some of the standalone binaries are under the GPL
|
||||
only; in particular, but not limted to, tests/decode-gcov.c. Each source code
|
||||
file is marked with the proper copyright information.
|
||||
|
||||
|
||||
|
||||
The Academic Free License
|
||||
v. 2.1
|
||||
|
||||
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Academic Free License version 2.1
|
||||
|
||||
1) Grant of Copyright License. Licensor hereby grants You a
|
||||
world-wide, royalty-free, non-exclusive, perpetual, sublicenseable
|
||||
license to do the following:
|
||||
|
||||
a) to reproduce the Original Work in copies;
|
||||
|
||||
b) to prepare derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
c) to distribute copies of the Original Work and Derivative Works to the public;
|
||||
|
||||
d) to perform the Original Work publicly; and
|
||||
|
||||
e) to display the Original Work publicly.
|
||||
|
||||
2) Grant of Patent License. Licensor hereby grants You a world-wide,
|
||||
royalty-free, non-exclusive, perpetual, sublicenseable license, under
|
||||
patent claims owned or controlled by the Licensor that are embodied in
|
||||
the Original Work as furnished by the Licensor, to make, use, sell and
|
||||
offer for sale the Original Work and Derivative Works.
|
||||
|
||||
3) Grant of Source Code License. The term "Source Code" means the
|
||||
preferred form of the Original Work for making modifications to it and
|
||||
all available documentation describing how to modify the Original
|
||||
Work. Licensor hereby agrees to provide a machine-readable copy of the
|
||||
Source Code of the Original Work along with each copy of the Original
|
||||
Work that Licensor distributes. Licensor reserves the right to satisfy
|
||||
this obligation by placing a machine-readable copy of the Source Code
|
||||
in an information repository reasonably calculated to permit
|
||||
inexpensive and convenient access by You for as long as Licensor
|
||||
continues to distribute the Original Work, and by publishing the
|
||||
address of that information repository in a notice immediately
|
||||
following the copyright notice that applies to the Original Work.
|
||||
|
||||
4) Exclusions From License Grant. Neither the names of Licensor, nor
|
||||
the names of any contributors to the Original Work, nor any of their
|
||||
trademarks or service marks, may be used to endorse or promote
|
||||
products derived from this Original Work without express prior written
|
||||
permission of the Licensor. Nothing in this License shall be deemed to
|
||||
grant any rights to trademarks, copyrights, patents, trade secrets or
|
||||
any other intellectual property of Licensor except as expressly stated
|
||||
herein. No patent license is granted to make, use, sell or offer to
|
||||
sell embodiments of any patent claims other than the licensed claims
|
||||
defined in Section 2. No right is granted to the trademarks of
|
||||
Licensor even if such marks are included in the Original Work. Nothing
|
||||
in this License shall be interpreted to prohibit Licensor from
|
||||
licensing under different terms from this License any Original Work
|
||||
that Licensor otherwise would have a right to license.
|
||||
|
||||
5) This section intentionally omitted.
|
||||
|
||||
6) Attribution Rights. You must retain, in the Source Code of any
|
||||
Derivative Works that You create, all copyright, patent or trademark
|
||||
notices from the Source Code of the Original Work, as well as any
|
||||
notices of licensing and any descriptive text identified therein as an
|
||||
"Attribution Notice." You must cause the Source Code for any
|
||||
Derivative Works that You create to carry a prominent Attribution
|
||||
Notice reasonably calculated to inform recipients that You have
|
||||
modified the Original Work.
|
||||
|
||||
7) Warranty of Provenance and Disclaimer of Warranty. Licensor
|
||||
warrants that the copyright in and to the Original Work and the patent
|
||||
rights granted herein by Licensor are owned by the Licensor or are
|
||||
sublicensed to You under the terms of this License with the permission
|
||||
of the contributor(s) of those copyrights and patent rights. Except as
|
||||
expressly stated in the immediately proceeding sentence, the Original
|
||||
Work is provided under this License on an "AS IS" BASIS and WITHOUT
|
||||
WARRANTY, either express or implied, including, without limitation,
|
||||
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
|
||||
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
|
||||
part of this License. No license to Original Work is granted hereunder
|
||||
except under this disclaimer.
|
||||
|
||||
8) Limitation of Liability. Under no circumstances and under no legal
|
||||
theory, whether in tort (including negligence), contract, or
|
||||
otherwise, shall the Licensor be liable to any person for any direct,
|
||||
indirect, special, incidental, or consequential damages of any
|
||||
character arising as a result of this License or the use of the
|
||||
Original Work including, without limitation, damages for loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and
|
||||
all other commercial damages or losses. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting
|
||||
from Licensor's negligence to the extent applicable law prohibits such
|
||||
limitation. Some jurisdictions do not allow the exclusion or
|
||||
limitation of incidental or consequential damages, so this exclusion
|
||||
and limitation may not apply to You.
|
||||
|
||||
9) Acceptance and Termination. If You distribute copies of the
|
||||
Original Work or a Derivative Work, You must make a reasonable effort
|
||||
under the circumstances to obtain the express assent of recipients to
|
||||
the terms of this License. Nothing else but this License (or another
|
||||
written agreement between Licensor and You) grants You permission to
|
||||
create Derivative Works based upon the Original Work or to exercise
|
||||
any of the rights granted in Section 1 herein, and any attempt to do
|
||||
so except under the terms of this License (or another written
|
||||
agreement between Licensor and You) is expressly prohibited by
|
||||
U.S. copyright law, the equivalent laws of other countries, and by
|
||||
international treaty. Therefore, by exercising any of the rights
|
||||
granted to You in Section 1 herein, You indicate Your acceptance of
|
||||
this License and all of its terms and conditions.
|
||||
|
||||
10) Termination for Patent Action. This License shall terminate
|
||||
automatically and You may no longer exercise any of the rights granted
|
||||
to You by this License as of the date You commence an action,
|
||||
including a cross-claim or counterclaim, against Licensor or any
|
||||
licensee alleging that the Original Work infringes a patent. This
|
||||
termination provision shall not apply for an action alleging patent
|
||||
infringement by combinations of the Original Work with other software
|
||||
or hardware.
|
||||
|
||||
11) Jurisdiction, Venue and Governing Law. Any action or suit relating
|
||||
to this License may be brought only in the courts of a jurisdiction
|
||||
wherein the Licensor resides or in which Licensor conducts its primary
|
||||
business, and under the laws of that jurisdiction excluding its
|
||||
conflict-of-law provisions. The application of the United Nations
|
||||
Convention on Contracts for the International Sale of Goods is
|
||||
expressly excluded. Any use of the Original Work outside the scope of
|
||||
this License or after its termination shall be subject to the
|
||||
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101
|
||||
et seq., the equivalent laws of other countries, and international
|
||||
treaty. This section shall survive the termination of this License.
|
||||
|
||||
12) Attorneys Fees. In any action to enforce the terms of this License
|
||||
or seeking damages relating thereto, the prevailing party shall be
|
||||
entitled to recover its costs and expenses, including, without
|
||||
limitation, reasonable attorneys' fees and costs incurred in
|
||||
connection with such action, including any appeal of such action. This
|
||||
section shall survive the termination of this License.
|
||||
|
||||
13) Miscellaneous. This License represents the complete agreement
|
||||
concerning the subject matter hereof. If any provision of this License
|
||||
is held to be unenforceable, such provision shall be reformed only to
|
||||
the extent necessary to make it enforceable.
|
||||
|
||||
14) Definition of "You" in This License. "You" throughout this
|
||||
License, whether in upper or lower case, means an individual or a
|
||||
legal entity exercising rights under, and complying with all of the
|
||||
terms of, this License. For legal entities, "You" includes any entity
|
||||
that controls, is controlled by, or is under common control with
|
||||
you. For purposes of this definition, "control" means (i) the power,
|
||||
direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
15) Right to Use. You may use the Original Work in all ways not
|
||||
otherwise restricted or conditioned by this License or by law, and
|
||||
Licensor promises not to interfere with or be responsible for such
|
||||
uses by You.
|
||||
|
||||
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights
|
||||
reserved. Permission is hereby granted to copy and distribute this
|
||||
license without modification. This license may not be modified without
|
||||
the express written permission of its copyright owner.
|
||||
|
||||
|
||||
--
|
||||
END OF ACADEMIC FREE LICENSE. The following is intended to describe the essential
|
||||
differences between the Academic Free License (AFL) version 1.0 and other
|
||||
open source licenses:
|
||||
|
||||
The Academic Free License is similar to the BSD, MIT, UoI/NCSA and Apache
|
||||
licenses in many respects but it is intended to solve a few problems with
|
||||
those licenses.
|
||||
|
||||
* The AFL is written so as to make it clear what software is being
|
||||
licensed (by the inclusion of a statement following the copyright notice
|
||||
in the software). This way, the license functions better than a template
|
||||
license. The BSD, MIT and UoI/NCSA licenses apply to unidentified software.
|
||||
|
||||
* The AFL contains a complete copyright grant to the software. The BSD
|
||||
and Apache licenses are vague and incomplete in that respect.
|
||||
|
||||
* The AFL contains a complete patent grant to the software. The BSD, MIT,
|
||||
UoI/NCSA and Apache licenses rely on an implied patent license and contain
|
||||
no explicit patent grant.
|
||||
|
||||
* The AFL makes it clear that no trademark rights are granted to the
|
||||
licensor's trademarks. The Apache license contains such a provision, but the
|
||||
BSD, MIT and UoI/NCSA licenses do not.
|
||||
|
||||
* The AFL includes the warranty by the licensor that it either owns the
|
||||
copyright or that it is distributing the software under a license. None of
|
||||
the other licenses contain that warranty. All other warranties are disclaimed,
|
||||
as is the case for the other licenses.
|
||||
|
||||
* The AFL is itself copyrighted (with the right granted to copy and distribute
|
||||
without modification). This ensures that the owner of the copyright to the
|
||||
license will control changes. The Apache license contains a copyright notice,
|
||||
but the BSD, MIT and UoI/NCSA licenses do not.
|
||||
--
|
||||
START OF GNU GENERAL PUBLIC LICENSE
|
||||
--
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
23
LICENSES/fontconfig.txt
Normal file
23
LICENSES/fontconfig.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
http://www.jclark.com/xml/copying.txt
|
||||
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -378,13 +378,6 @@
|
||||
<boolean>true</boolean>
|
||||
</map>
|
||||
|
||||
<key>ParcelMediaURLFilter</key>
|
||||
<map>
|
||||
<key>flavor</key>
|
||||
<string>llsd</string>
|
||||
<key>trusted-sender</key>
|
||||
<boolean>false</boolean>
|
||||
</map>
|
||||
|
||||
<key>ParcelNavigateMedia</key>
|
||||
<map>
|
||||
|
||||
@@ -30,7 +30,7 @@ include(BuildVersion)
|
||||
|
||||
include(UnixInstall)
|
||||
|
||||
set (GCC_DISABLE_FATAL_WARNINGS TRUE)
|
||||
set (DISABLE_FATAL_WARNINGS TRUE)
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ReleaseSSE2 CACHE STRING
|
||||
@@ -77,6 +77,7 @@ if (VIEWER)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml)
|
||||
|
||||
# viewer plugins directory
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
||||
|
||||
@@ -90,9 +90,9 @@ if (WINDOWS)
|
||||
endif (MSVC80 OR MSVC90 OR MSVC10)
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
if (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
if (NOT DISABLE_FATAL_WARNINGS)
|
||||
add_definitions(/WX)
|
||||
endif (NOT VS_DISABLE_FATAL_WARNINGS)
|
||||
endif (NOT DISABLE_FATAL_WARNINGS)
|
||||
|
||||
# Various libs are compiler specific, generate some variables here we can just use
|
||||
# when we require them instead of reimplementing the test each time.
|
||||
@@ -125,8 +125,25 @@ set (GCC_EXTRA_OPTIMIZATIONS "-ffast-math")
|
||||
if (LINUX)
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
|
||||
# Here's a giant hack for Fedora 8, where we can't use
|
||||
# _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1.
|
||||
add_definitions(
|
||||
-DLL_LINUX=1
|
||||
-DAPPID=secondlife
|
||||
-D_REENTRANT
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-fvisibility=hidden
|
||||
-g
|
||||
-pthread
|
||||
)
|
||||
|
||||
# Don't catch SIGCHLD in our base application class for the viewer
|
||||
# some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh!
|
||||
# The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
|
||||
if(${CMAKE_C_COMPILER} MATCHES "gcc*")
|
||||
|
||||
find_program(GXX g++)
|
||||
mark_as_advanced(GXX)
|
||||
@@ -155,6 +172,8 @@ if (LINUX)
|
||||
OUTPUT_VARIABLE CXX_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Here's a giant hack for Fedora 8, where we can't use
|
||||
# _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1.
|
||||
if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
|
||||
@@ -166,7 +185,7 @@ if (LINUX)
|
||||
#Lets actually get a numerical version of gxx's version
|
||||
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION})
|
||||
|
||||
#gcc 4.3 and above don't like the LL boost
|
||||
#gcc 4.3 and above doesn't like the LL boost
|
||||
if(${CXX_VERSION} GREATER 429)
|
||||
add_definitions(-Wno-parentheses)
|
||||
endif (${CXX_VERSION} GREATER 429)
|
||||
@@ -178,23 +197,11 @@ if (LINUX)
|
||||
|
||||
# End of hacks.
|
||||
|
||||
add_definitions(
|
||||
-DLL_LINUX=1
|
||||
-D_REENTRANT
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-g
|
||||
-pthread
|
||||
)
|
||||
#GCC Specific
|
||||
add_definitions(-DCC_GCC)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
|
||||
add_definitions(-DAPPID=secondlife)
|
||||
add_definitions(-fvisibility=hidden)
|
||||
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
if (NOT STANDALONE)
|
||||
# this stops us requiring a really recent glibc at runtime
|
||||
add_definitions(-fno-stack-protector)
|
||||
@@ -209,13 +216,42 @@ if (LINUX)
|
||||
if (NOT STANDALONE)
|
||||
set(MARCH_FLAG " -march=pentium4")
|
||||
endif (NOT STANDALONE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
endif (${ARCH} STREQUAL "x86_64")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG} -msse2")
|
||||
find_program(CLANG clang++)
|
||||
mark_as_advanced(CLANG)
|
||||
|
||||
add_definitions(
|
||||
-DCC_CLANG
|
||||
-D_FORTIFY_SOURCE=2
|
||||
)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
# this stops us requiring a really recent glibc at runtime
|
||||
add_definitions(-fno-stack-protector)
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
set(MARCH_FLAG " -march=pentium4")
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O0 ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "-O3 ${CMAKE_CXX_FLAGS_RELEASESSE2}")
|
||||
@@ -226,7 +262,7 @@ endif (LINUX)
|
||||
|
||||
|
||||
if (DARWIN)
|
||||
add_definitions(-DLL_DARWIN=1)
|
||||
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
|
||||
@@ -234,26 +270,30 @@ if (DARWIN)
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -O3 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -03 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -O3 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
|
||||
if(${CMAKE_C_COMPILER} MATCHES "gcc*")
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-tautological-compare -Wno-char-subscripts -Wno-gnu -Wno-logical-op-parentheses
|
||||
-Wno-non-virtual-dtor -Woverloaded-virtual -Wno-parentheses-equality -Wno-reorder -Wno-unused-function -Wno-unused-value -Wno-unused-variable")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}")
|
||||
endif()
|
||||
|
||||
if (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
|
||||
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
|
||||
|
||||
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
|
||||
|
||||
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||
if (NOT DISABLE_FATAL_WARNINGS)
|
||||
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Werror")
|
||||
endif (NOT DISABLE_FATAL_WARNINGS)
|
||||
|
||||
set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${UNIX_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
@@ -281,6 +321,10 @@ endif (STANDALONE)
|
||||
if(1 EQUAL 1)
|
||||
add_definitions(-DOPENSIM_RULES=1)
|
||||
add_definitions(-DMESH_ENABLED=1)
|
||||
add_definitions(-DENABLE_CLASSIC_CLOUDS=1)
|
||||
if (NOT "$ENV{SHY_MOD}" STREQUAL "")
|
||||
add_definitions(-DSHY_MOD=1)
|
||||
endif (NOT "$ENV{SHY_MOD}" STREQUAL "")
|
||||
endif(1 EQUAL 1)
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
|
||||
|
||||
@@ -10,6 +10,7 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(ares)
|
||||
if (WINDOWS)
|
||||
add_definitions("-DCARES_STATICLIB")
|
||||
set(CARES_LIBRARIES areslib)
|
||||
elseif (DARWIN)
|
||||
set(CARES_LIBRARIES
|
||||
@@ -19,5 +20,5 @@ else (STANDALONE)
|
||||
else (WINDOWS)
|
||||
set(CARES_LIBRARIES cares)
|
||||
endif (WINDOWS)
|
||||
set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/ares ${LIBS_PREBUILT_DIR}/include/ares )
|
||||
set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/ares)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if(WORD_SIZE EQUAL 64)
|
||||
set(DISABLE_TCMALLOC TRUE)
|
||||
endif()
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindGooglePerfTools)
|
||||
else (STANDALONE)
|
||||
if (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
|
||||
if (LINUX OR WINDOWS)
|
||||
use_prebuilt_binary(google)
|
||||
endif (LINUX OR WINDOWS)
|
||||
if (WINDOWS)
|
||||
@@ -34,6 +30,10 @@ else ()
|
||||
set(USE_GOOGLE_PERFTOOLS OFF)
|
||||
endif ()
|
||||
|
||||
# XXX Disable temporarily, until we have compilation issues on 64-bit
|
||||
# Etch sorted.
|
||||
#set(USE_GOOGLE_PERFTOOLS OFF)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
|
||||
7
indra/cmake/LLXUIXML.cmake
Normal file
7
indra/cmake/LLXUIXML.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
set(LLXUIXML_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llxuixml
|
||||
)
|
||||
|
||||
set(LLXUIXML_LIBRARIES llxuixml)
|
||||
@@ -71,6 +71,7 @@ elseif (LINUX)
|
||||
ssl
|
||||
# qgif
|
||||
# qjpeg
|
||||
jscore
|
||||
jpeg
|
||||
fontconfig
|
||||
X11
|
||||
@@ -78,8 +79,5 @@ elseif (LINUX)
|
||||
Xext
|
||||
GL
|
||||
)
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(WEBKIT_PLUGIN_LIBRARIES ${WEBKIT_PLUGIN_LIBRARIES} jscore)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
endif (STANDALONE)
|
||||
endif (WINDOWS)
|
||||
|
||||
@@ -47,11 +47,18 @@ target_link_libraries(linux-crash-logger
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${LLUI_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${UI_LIBRARIES}
|
||||
${DB_LIBRARIES}
|
||||
${XMLRPCEPI_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${APRUTIL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
rt
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
|
||||
@@ -5,27 +5,25 @@ project(llaudio)
|
||||
include(00-Common)
|
||||
include(Audio)
|
||||
include(LLAudio)
|
||||
if(FMODEX)
|
||||
if (FMODEX)
|
||||
include(FMODEX)
|
||||
if(FMODEX)
|
||||
set(FMOD OFF)
|
||||
endif(FMODEX)
|
||||
endif(FMODEX)
|
||||
if(NOT FMODEX)
|
||||
endif (FMODEX)
|
||||
if (NOT FMODEX)
|
||||
include(FMOD)
|
||||
endif(NOT FMODEX)
|
||||
endif (NOT FMODEX)
|
||||
include(OPENAL)
|
||||
include(LLCommon)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
|
||||
if(FMODEX)
|
||||
if (FMODEX)
|
||||
include_directories(${FMODEX_INCLUDE_DIR})
|
||||
endif(FMODEX)
|
||||
if(FMOD)
|
||||
include_directories(${FMOD_INCLUDE_DIR})
|
||||
endif(FMOD)
|
||||
endif (FMOD)
|
||||
|
||||
include_directories(
|
||||
${LLAUDIO_INCLUDE_DIRS}
|
||||
|
||||
@@ -168,19 +168,13 @@ long vfs_tell (void *datasource)
|
||||
return file->tell();
|
||||
}
|
||||
|
||||
LLVorbisDecodeState::LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename)
|
||||
{
|
||||
mDone = FALSE;
|
||||
mValid = FALSE;
|
||||
mBytesRead = -1;
|
||||
mUUID = uuid;
|
||||
mInFilep = NULL;
|
||||
mCurrentSection = 0;
|
||||
LLVorbisDecodeState::LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename) :
|
||||
mValid(FALSE), mDone(FALSE), mBytesRead(-1), mUUID(uuid),
|
||||
#if !defined(USE_WAV_VFILE)
|
||||
mOutFilename = out_filename;
|
||||
mFileHandle = LLLFSThread::nullHandle();
|
||||
mOutFilename(out_filename), mFileHandle(LLLFSThread::nullHandle()),
|
||||
#endif
|
||||
// No default value for mVF, it's an ogg structure?
|
||||
mInFilep(NULL), mCurrentSection(0)
|
||||
{
|
||||
}
|
||||
|
||||
LLVorbisDecodeState::~LLVorbisDecodeState()
|
||||
@@ -242,8 +236,8 @@ BOOL LLVorbisDecodeState::initDecode()
|
||||
llwarns << "No default bitstream found" << llendl;
|
||||
}
|
||||
// <edit>
|
||||
// This magic value is equivilent to 150MiB of data.
|
||||
// Prevents griffers from utilizin a huge xbox sound the size of god to instafry the viewer
|
||||
// This magic value is equivalent to 150MiB of data.
|
||||
// Prevents griefers from utilizing a huge xbox sound the size of god to instafry the viewer
|
||||
if(size_guess >= 157286400)
|
||||
{
|
||||
llwarns << "Bad sound caught by zmagic" << llendl;
|
||||
@@ -616,7 +610,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
|
||||
llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl;
|
||||
mCurrentDecodep->flushBadFile();
|
||||
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
|
||||
adp->setHasValidData(FALSE);
|
||||
adp->setHasValidData(false);
|
||||
adp->setHasCompletedDecode(true);
|
||||
mCurrentDecodep = NULL;
|
||||
done = TRUE;
|
||||
}
|
||||
@@ -631,11 +626,16 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
|
||||
if (mCurrentDecodep->finishDecode())
|
||||
{
|
||||
// We finished!
|
||||
if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
|
||||
{
|
||||
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
|
||||
adp->setHasDecodedData(TRUE);
|
||||
adp->setHasValidData(TRUE);
|
||||
if (!adp)
|
||||
{
|
||||
llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl;
|
||||
}
|
||||
else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
|
||||
{
|
||||
adp->setHasCompletedDecode(true);
|
||||
adp->setHasDecodedData(true);
|
||||
adp->setHasValidData(true);
|
||||
|
||||
// At this point, we could see if anyone needs this sound immediately, but
|
||||
// I'm not sure that there's a reason to - we need to poll all of the playing
|
||||
@@ -644,7 +644,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Vorbis decode failed!!!" << llendl;
|
||||
adp->setHasCompletedDecode(true);
|
||||
llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl;
|
||||
}
|
||||
mCurrentDecodep = NULL;
|
||||
}
|
||||
@@ -712,15 +713,18 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
||||
if (gAudiop->hasDecodedFile(uuid))
|
||||
{
|
||||
// Already have a decoded version, don't need to decode it.
|
||||
//llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
|
||||
{
|
||||
// Just put it on the decode queue.
|
||||
//llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
|
||||
mImpl->mDecodeQueue.push(uuid);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1275,10 +1275,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
|
||||
// Need to mark data as bad to avoid constant rerequests.
|
||||
LLAudioData *adp = gAudiop->getAudioData(uuid);
|
||||
if (adp)
|
||||
{
|
||||
{ // Make sure everything is cleared
|
||||
adp->setHasValidData(false);
|
||||
adp->setHasLocalData(false);
|
||||
adp->setHasDecodedData(false);
|
||||
adp->setHasCompletedDecode(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1291,6 +1292,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
|
||||
}
|
||||
else
|
||||
{
|
||||
// llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl;
|
||||
adp->setHasValidData(true);
|
||||
adp->setHasLocalData(true);
|
||||
gAudioDecodeMgrp->addDecodeRequest(uuid);
|
||||
@@ -1321,6 +1323,7 @@ LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32
|
||||
mSyncSlave(false),
|
||||
mQueueSounds(false),
|
||||
mPlayedOnce(false),
|
||||
mCorrupted(false),
|
||||
mType(type),
|
||||
// <edit>
|
||||
mSourceID(source_id),
|
||||
@@ -1372,15 +1375,26 @@ void LLAudioSource::setChannel(LLAudioChannel *channelp)
|
||||
|
||||
void LLAudioSource::update()
|
||||
{
|
||||
if(mCorrupted)
|
||||
{
|
||||
return ; //no need to update
|
||||
}
|
||||
|
||||
if (!getCurrentBuffer())
|
||||
{
|
||||
if (getCurrentData())
|
||||
LLAudioData *adp = getCurrentData();
|
||||
if (adp)
|
||||
{
|
||||
// Hack - try and load the sound. Will do this as a callback
|
||||
// on decode later.
|
||||
if (getCurrentData()->load())
|
||||
if (adp->load() && adp->getBuffer())
|
||||
{
|
||||
play(getCurrentData()->getID());
|
||||
play(adp->getID());
|
||||
}
|
||||
else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done
|
||||
{
|
||||
llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
|
||||
mCorrupted = true ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1502,6 +1516,11 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
|
||||
|
||||
bool LLAudioSource::isDone() const
|
||||
{
|
||||
if(mCorrupted)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
const F32 MAX_AGE = 60.f;
|
||||
const F32 MAX_UNPLAYED_AGE = 15.f;
|
||||
const F32 MAX_MUTED_AGE = 11.f;
|
||||
@@ -1797,6 +1816,7 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
|
||||
mBufferp(NULL),
|
||||
mHasLocalData(false),
|
||||
mHasDecodedData(false),
|
||||
mHasCompletedDecode(false),
|
||||
mHasValidData(true)
|
||||
{
|
||||
if (uuid.isNull())
|
||||
@@ -1808,16 +1828,17 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
|
||||
if (gAudiop && gAudiop->hasDecodedFile(uuid))
|
||||
{
|
||||
// Already have a decoded version, don't need to decode it.
|
||||
mHasLocalData = true;
|
||||
mHasDecodedData = true;
|
||||
setHasLocalData(true);
|
||||
setHasDecodedData(true);
|
||||
setHasCompletedDecode(true);
|
||||
}
|
||||
else if (gAssetStorage && gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
|
||||
{
|
||||
mHasLocalData = true;
|
||||
setHasLocalData(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//return false when the audio file is corrupted.
|
||||
bool LLAudioData::load()
|
||||
{
|
||||
// For now, just assume we're going to use one buffer per audiodata.
|
||||
@@ -1833,7 +1854,7 @@ bool LLAudioData::load()
|
||||
{
|
||||
// No free buffers, abort.
|
||||
llinfos << "Not able to allocate a new audio buffer, aborting." << llendl;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string uuid_str;
|
||||
|
||||
@@ -366,6 +366,7 @@ protected:
|
||||
bool mSyncSlave;
|
||||
bool mQueueSounds;
|
||||
bool mPlayedOnce;
|
||||
bool mCorrupted;
|
||||
S32 mType;
|
||||
LLVector3d mPositionGlobal;
|
||||
LLVector3 mVelocity;
|
||||
@@ -407,10 +408,12 @@ public:
|
||||
|
||||
bool hasLocalData() const { return mHasLocalData; }
|
||||
bool hasDecodedData() const { return mHasDecodedData; }
|
||||
bool hasCompletedDecode() const { return mHasCompletedDecode; }
|
||||
bool hasValidData() const { return mHasValidData; }
|
||||
|
||||
void setHasLocalData(const bool hld) { mHasLocalData = hld; }
|
||||
void setHasDecodedData(const bool hdd) { mHasDecodedData = hdd; }
|
||||
void setHasCompletedDecode(const bool hcd) { mHasCompletedDecode = hcd; }
|
||||
void setHasValidData(const bool hvd) { mHasValidData = hvd; }
|
||||
|
||||
friend class LLAudioEngine; // Severe laziness, bad.
|
||||
@@ -418,9 +421,10 @@ public:
|
||||
protected:
|
||||
LLUUID mID;
|
||||
LLAudioBuffer *mBufferp; // If this data is being used by the audio system, a pointer to the buffer will be set here.
|
||||
bool mHasLocalData;
|
||||
bool mHasDecodedData;
|
||||
bool mHasValidData;
|
||||
bool mHasLocalData; // Set true if the sound asset file is available locally
|
||||
bool mHasDecodedData; // Set true if the sound file has been decoded
|
||||
bool mHasCompletedDecode; // Set true when the sound is decoded
|
||||
bool mHasValidData; // Set false if decoding failed, meaning the sound asset is bad
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -105,10 +105,6 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
|
||||
U32 version;
|
||||
FMOD_RESULT result;
|
||||
int numdrivers;
|
||||
FMOD_SPEAKERMODE speakermode;
|
||||
FMOD_CAPS caps;
|
||||
char name[256];
|
||||
|
||||
LL_DEBUGS("AppInit") << "LLAudioEngine_FMODEX::init() initializing FMOD" << LL_ENDL;
|
||||
|
||||
@@ -124,11 +120,16 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
|
||||
if (version < FMOD_VERSION)
|
||||
{
|
||||
LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version
|
||||
<< ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Error : You are using the wrong FMOD Ex version (" << version
|
||||
<< ")! You should be using FMOD Ex" << FMOD_VERSION << LL_ENDL;
|
||||
}
|
||||
|
||||
#if LL_WINDOWS
|
||||
int numdrivers;
|
||||
FMOD_SPEAKERMODE speakermode;
|
||||
FMOD_CAPS caps;
|
||||
char name[256];
|
||||
|
||||
//Is this block applicable to linux?
|
||||
{
|
||||
result = mSystem->getNumDrivers(&numdrivers);
|
||||
@@ -173,7 +174,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
#endif //LL_WINDOWS
|
||||
|
||||
// In this case, all sounds, PLUS wind and stream will be software.
|
||||
result = mSystem->setSoftwareChannels(num_channels+2);
|
||||
result = mSystem->setSoftwareChannels(num_channels + 2);
|
||||
Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels");
|
||||
|
||||
U32 fmod_flags = FMOD_INIT_NORMAL;
|
||||
@@ -181,64 +182,36 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
fmod_flags |= FMOD_INIT_ENABLE_PROFILE;
|
||||
|
||||
#if LL_LINUX
|
||||
// If we don't set an output method, Linux FMOD always
|
||||
// decides on OSS and fails otherwise. So we'll manually
|
||||
// try ESD, then OSS, then ALSA.
|
||||
// Why this order? See SL-13250, but in short, OSS emulated
|
||||
// on top of ALSA is ironically more reliable than raw ALSA.
|
||||
// Ack, and ESD has more reliable failure modes - but has worse
|
||||
// latency - than all of them, so wins for now.
|
||||
bool audio_ok = false;
|
||||
|
||||
if (!audio_ok)
|
||||
{
|
||||
if (NULL == getenv("LL_BAD_FMODEX_ESD")) /*Flawfinder: ignore*/
|
||||
if (NULL == getenv("LL_BAD_FMOD_PULSEAUDIO")) /*Flawfinder: ignore*/
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Trying ESD audio output..." << LL_ENDL;
|
||||
if(mSystem->SetOutput(FMOD_OUTPUTTYPE_ESD) == FMOD_OK &&
|
||||
(result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK)
|
||||
LL_DEBUGS("AppInit") << "Trying PulseAudio audio output..." << LL_ENDL;
|
||||
if(mSystem->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO) == FMOD_OK &&
|
||||
(result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK)
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY" << LL_ENDL;
|
||||
LL_DEBUGS("AppInit") << "PulseAudio output initialized OKAY" << LL_ENDL;
|
||||
audio_ok = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Check_FMOD_Error(result, "ESD audio output FAILED to initialize");
|
||||
Check_FMOD_Error(result, "PulseAudio audio output FAILED to initialize");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "ESD audio output SKIPPED" << LL_ENDL;
|
||||
LL_DEBUGS("AppInit") << "PulseAudio audio output SKIPPED" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
if (!audio_ok)
|
||||
{
|
||||
if (NULL == getenv("LL_BAD_FMODEX_OSS")) /*Flawfinder: ignore*/
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL;
|
||||
if(mSystem->SetOutput(FMOD_OUTPUTTYPE_OSS) == FMOD_OK &&
|
||||
(result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK)
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL;
|
||||
audio_ok = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Check_FMOD_Error(result, "OSS audio output FAILED to initialize" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
if (!audio_ok)
|
||||
{
|
||||
if (NULL == getenv("LL_BAD_FMODEX_ALSA")) /*Flawfinder: ignore*/
|
||||
if (NULL == getenv("LL_BAD_FMOD_ALSA")) /*Flawfinder: ignore*/
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL;
|
||||
if(mSystem->SetOutput(FMOD_OUTPUTTYPE_ALSA) &&
|
||||
(result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK)
|
||||
if(mSystem->setOutput(FMOD_OUTPUTTYPE_ALSA) == FMOD_OK &&
|
||||
(result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK)
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL;
|
||||
audio_ok = true;
|
||||
@@ -247,7 +220,29 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
{
|
||||
Check_FMOD_Error(result, "ALSA audio output FAILED to initialize");
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "ALSA audio output SKIPPED" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
if (!audio_ok)
|
||||
{
|
||||
if (NULL == getenv("LL_BAD_FMOD_OSS")) /*Flawfinder: ignore*/
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL;
|
||||
if(mSystem->setOutput(FMOD_OUTPUTTYPE_OSS) == FMOD_OK &&
|
||||
(result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK)
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL;
|
||||
audio_ok = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Check_FMOD_Error(result, "OSS audio output FAILED to initialize");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL;
|
||||
}
|
||||
@@ -258,25 +253,20 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
return false;
|
||||
}
|
||||
|
||||
// On Linux, FMOD causes a SIGPIPE for some netstream error
|
||||
// conditions (an FMOD bug); ignore SIGPIPE so it doesn't crash us.
|
||||
// NOW FIXED in FMOD 3.x since 2006-10-01.
|
||||
//signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
// We're interested in logging which output method we
|
||||
// ended up with, for QA purposes.
|
||||
FMOD_OUTPUTTYPE output_type;
|
||||
mSystem->getOutput(output_type);
|
||||
mSystem->getOutput(&output_type);
|
||||
switch (output_type)
|
||||
{
|
||||
case FSOUND_OUTPUT_NOSOUND:
|
||||
LL_DEBUGS("AppInit") << "Audio output: NoSound" << LL_ENDL; break;
|
||||
case FSOUND_OUTPUT_OSS:
|
||||
LL_DEBUGS("AppInit") << "Audio output: OSS" << LL_ENDL; break;
|
||||
case FSOUND_OUTPUT_ESD:
|
||||
LL_DEBUGS("AppInit") << "Audio output: ESD" << LL_ENDL; break;
|
||||
case FSOUND_OUTPUT_ALSA:
|
||||
LL_DEBUGS("AppInit") << "Audio output: ALSA" << LL_ENDL; break;
|
||||
case FMOD_OUTPUTTYPE_NOSOUND:
|
||||
LL_INFOS("AppInit") << "Audio output: NoSound" << LL_ENDL; break;
|
||||
case FMOD_OUTPUTTYPE_PULSEAUDIO:
|
||||
LL_INFOS("AppInit") << "Audio output: PulseAudio" << LL_ENDL; break;
|
||||
case FMOD_OUTPUTTYPE_ALSA:
|
||||
LL_INFOS("AppInit") << "Audio output: ALSA" << LL_ENDL; break;
|
||||
case FMOD_OUTPUTTYPE_OSS:
|
||||
LL_INFOS("AppInit") << "Audio output: OSS" << LL_ENDL; break;
|
||||
default:
|
||||
LL_INFOS("AppInit") << "Audio output: Unknown!" << LL_ENDL; break;
|
||||
};
|
||||
@@ -295,9 +285,9 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
/*
|
||||
... and re-init.
|
||||
*/
|
||||
result = mSystem->init(100, FMOD_INIT_NORMAL, 0);
|
||||
result = mSystem->init( num_channels + 2, fmod_flags, 0);
|
||||
}
|
||||
if(Check_FMOD_Error(result, "Error initializing FMOD"))
|
||||
if(Check_FMOD_Error(result, "Error initializing FMOD Ex"))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -305,7 +295,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
||||
if (!getStreamingAudioImpl()) // no existing implementation added
|
||||
setStreamingAudioImpl(new LLStreamingAudio_FMODEX(mSystem));
|
||||
|
||||
LL_DEBUGS("AppInit") << "LLAudioEngine_FMODEX::init() FMOD initialized correctly" << LL_ENDL;
|
||||
LL_INFOS("AppInit") << "LLAudioEngine_FMODEX::init() FMOD Ex initialized correctly" << LL_ENDL;
|
||||
|
||||
mInited = true;
|
||||
|
||||
@@ -321,10 +311,10 @@ std::string LLAudioEngine_FMODEX::getDriverName(bool verbose)
|
||||
U32 version;
|
||||
if(!Check_FMOD_Error(mSystem->getVersion(&version), "FMOD::System::getVersion"))
|
||||
{
|
||||
return llformat("FMOD version %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF);
|
||||
return llformat("FMOD Ex %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF);
|
||||
}
|
||||
}
|
||||
return "FMOD";
|
||||
return "FMODEx";
|
||||
}
|
||||
|
||||
|
||||
@@ -342,12 +332,13 @@ void LLAudioEngine_FMODEX::shutdown()
|
||||
{
|
||||
stopInternetStream();
|
||||
|
||||
llinfos << "About to LLAudioEngine::shutdown()" << llendl;
|
||||
LLAudioEngine::shutdown();
|
||||
|
||||
llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD" << llendl;
|
||||
llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
|
||||
mSystem->close();
|
||||
mSystem->release();
|
||||
llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD" << llendl;
|
||||
llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
|
||||
|
||||
delete mListenerp;
|
||||
mListenerp = NULL;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "llapr.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
#define INCHES_TO_METERS 0.02540005f
|
||||
|
||||
@@ -1575,7 +1575,7 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp)
|
||||
constraint_it++)
|
||||
{
|
||||
U8 byte = constraint_it->mChainLength;
|
||||
dp.packU8(byte, "chain_lenght");
|
||||
dp.packU8(byte, "chain_length");
|
||||
|
||||
byte = constraint_it->mConstraintType;
|
||||
dp.packU8(byte, "constraint_type");
|
||||
|
||||
@@ -56,8 +56,7 @@ LLCharacter::LLCharacter()
|
||||
mPreferredPelvisHeight( 0.f ),
|
||||
mSex( SEX_FEMALE ),
|
||||
mAppearanceSerialNum( 0 ),
|
||||
mSkeletonSerialNum( 0 ),
|
||||
mInAppearance( false )
|
||||
mSkeletonSerialNum( 0 )
|
||||
{
|
||||
llassert_always(sAllowInstancesChange) ;
|
||||
sInstances.push_back(this);
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
|
||||
virtual void addDebugText( const std::string& text ) = 0;
|
||||
|
||||
virtual const LLUUID& getID() = 0;
|
||||
virtual const LLUUID& getID() const = 0;
|
||||
//-------------------------------------------------------------------------
|
||||
// End Interface
|
||||
//-------------------------------------------------------------------------
|
||||
@@ -268,10 +268,6 @@ public:
|
||||
ESex getSex() const { return mSex; }
|
||||
void setSex( ESex sex ) { mSex = sex; }
|
||||
|
||||
// set appearance flag
|
||||
void setAppearanceFlag( bool flag ) { mInAppearance = flag; }
|
||||
bool getAppearanceFlag() { return mInAppearance; }
|
||||
|
||||
U32 getAppearanceSerialNum() const { return mAppearanceSerialNum; }
|
||||
void setAppearanceSerialNum( U32 num ) { mAppearanceSerialNum = num; }
|
||||
|
||||
@@ -293,8 +289,6 @@ protected:
|
||||
U32 mSkeletonSerialNum;
|
||||
LLAnimPauseRequest mPauseRequest;
|
||||
|
||||
BOOL mInAppearance;
|
||||
|
||||
private:
|
||||
// visual parameter stuff
|
||||
typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
/**
|
||||
* @file llgesture.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,31 +3,25 @@
|
||||
* @brief A gesture is a combination of a triggering chat phrase or
|
||||
* key, a sound, an animation, and a chat string.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -510,20 +510,6 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
vergence_quat.transQuat();
|
||||
right_eye_rot = vergence_quat * eye_jitter_rot * right_eye_rot;
|
||||
|
||||
//if in appearance, set the eyes straight forward
|
||||
if(mCharacter->getAppearanceFlag()) // no idea why this variable is reversed
|
||||
{
|
||||
LLVector3 forward(1.f, 0.0, 0.0);
|
||||
LLVector3 left;
|
||||
LLVector3 up;
|
||||
left.setVec(forward % forward);
|
||||
up.setVec(forward % left);
|
||||
target_eye_rot = LLQuaternion(forward, left, up);
|
||||
mLeftEyeState->setRotation( target_eye_rot );
|
||||
mRightEyeState->setRotation( target_eye_rot );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
mLeftEyeState->setRotation( left_eye_rot );
|
||||
mRightEyeState->setRotation( right_eye_rot );
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ LLPointer<LLJointState>& LLKeyframeMotion::getJointState(U32 index)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// getJoin()
|
||||
// getJoint()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLJoint* LLKeyframeMotion::getJoint(U32 index)
|
||||
{
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llmultigesture.cpp
|
||||
* @brief Gestures that are asset-based and can have multiple steps.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2004-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -50,6 +44,7 @@ const S32 GESTURE_VERSION = 2;
|
||||
LLMultiGesture::LLMultiGesture()
|
||||
: mKey(),
|
||||
mMask(),
|
||||
mName(),
|
||||
mTrigger(),
|
||||
mReplaceText(),
|
||||
mSteps(),
|
||||
@@ -292,20 +287,27 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLGestureStepAnimation::getLabel() const
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepAnimation::getLabel() const
|
||||
{
|
||||
std::string label;
|
||||
std::vector<std::string> strings;
|
||||
|
||||
// std::string label;
|
||||
if (mFlags & ANIM_FLAG_STOP)
|
||||
{
|
||||
label = "Stop Animation: ";
|
||||
strings.push_back( "AnimFlagStop");
|
||||
|
||||
// label = "Stop Animation: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
label = "Start Animation: ";
|
||||
strings.push_back( "AnimFlagStart");
|
||||
|
||||
// label = "Start Animation: ";
|
||||
}
|
||||
label += mAnimName;
|
||||
return label;
|
||||
strings.push_back( mAnimName);
|
||||
// label += mAnimName;
|
||||
return strings;
|
||||
}
|
||||
|
||||
void LLGestureStepAnimation::dump()
|
||||
@@ -359,12 +361,15 @@ BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLGestureStepSound::getLabel() const
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepSound::getLabel() const
|
||||
{
|
||||
std::string label("Sound: ");
|
||||
label += mSoundName;
|
||||
return label;
|
||||
std::vector<std::string> strings;
|
||||
strings.push_back( "Sound");
|
||||
strings.push_back( mSoundName);
|
||||
// std::string label("Sound: ");
|
||||
// label += mSoundName;
|
||||
return strings;
|
||||
}
|
||||
|
||||
void LLGestureStepSound::dump()
|
||||
@@ -414,12 +419,13 @@ BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLGestureStepChat::getLabel() const
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepChat::getLabel() const
|
||||
{
|
||||
std::string label("Chat: ");
|
||||
label += mChatText;
|
||||
return label;
|
||||
std::vector<std::string> strings;
|
||||
strings.push_back("Chat");
|
||||
strings.push_back(mChatText);
|
||||
return strings;
|
||||
}
|
||||
|
||||
void LLGestureStepChat::dump()
|
||||
@@ -467,22 +473,31 @@ BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLGestureStepWait::getLabel() const
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepWait::getLabel() const
|
||||
{
|
||||
std::string label("--- Wait: ");
|
||||
std::vector<std::string> strings;
|
||||
strings.push_back( "Wait" );
|
||||
|
||||
// std::string label("--- Wait: ");
|
||||
if (mFlags & WAIT_FLAG_TIME)
|
||||
{
|
||||
char buffer[64]; /* Flawfinder: ignore */
|
||||
snprintf(buffer, sizeof(buffer), "%.1f seconds", (double)mWaitSeconds); /* Flawfinder: ignore */
|
||||
label += buffer;
|
||||
strings.push_back(buffer);
|
||||
// label += buffer;
|
||||
}
|
||||
else if (mFlags & WAIT_FLAG_ALL_ANIM)
|
||||
{
|
||||
label += "until animations are done";
|
||||
strings.push_back("until animations are done");
|
||||
// label += "until animations are done";
|
||||
}
|
||||
else
|
||||
{
|
||||
strings.push_back("");
|
||||
}
|
||||
|
||||
return label;
|
||||
return strings;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ public:
|
||||
KEY mKey;
|
||||
MASK mMask;
|
||||
|
||||
// This name can be empty if the inventory item is not around and
|
||||
// the gesture manager has not yet set the name
|
||||
std::string mName;
|
||||
|
||||
// String, like "/foo" or "hello" that makes it play
|
||||
std::string mTrigger;
|
||||
|
||||
@@ -130,7 +134,7 @@ public:
|
||||
virtual EStepType getType() = 0;
|
||||
|
||||
// Return a user-readable label for this step
|
||||
virtual std::string getLabel() const = 0;
|
||||
virtual std::vector<std::string> getLabel() const = 0;
|
||||
|
||||
virtual S32 getMaxSerialSize() const = 0;
|
||||
virtual BOOL serialize(LLDataPacker& dp) const = 0;
|
||||
@@ -152,7 +156,7 @@ public:
|
||||
|
||||
virtual EStepType getType() { return STEP_ANIMATION; }
|
||||
|
||||
virtual std::string getLabel() const;
|
||||
virtual std::vector<std::string> getLabel() const;
|
||||
|
||||
virtual S32 getMaxSerialSize() const;
|
||||
virtual BOOL serialize(LLDataPacker& dp) const;
|
||||
@@ -175,7 +179,7 @@ public:
|
||||
|
||||
virtual EStepType getType() { return STEP_SOUND; }
|
||||
|
||||
virtual std::string getLabel() const;
|
||||
virtual std::vector<std::string> getLabel() const;
|
||||
|
||||
virtual S32 getMaxSerialSize() const;
|
||||
virtual BOOL serialize(LLDataPacker& dp) const;
|
||||
@@ -198,7 +202,7 @@ public:
|
||||
|
||||
virtual EStepType getType() { return STEP_CHAT; }
|
||||
|
||||
virtual std::string getLabel() const;
|
||||
virtual std::vector<std::string> getLabel() const;
|
||||
|
||||
virtual S32 getMaxSerialSize() const;
|
||||
virtual BOOL serialize(LLDataPacker& dp) const;
|
||||
@@ -223,7 +227,7 @@ public:
|
||||
|
||||
virtual EStepType getType() { return STEP_WAIT; }
|
||||
|
||||
virtual std::string getLabel() const;
|
||||
virtual std::vector<std::string> getLabel() const;
|
||||
|
||||
virtual S32 getMaxSerialSize() const;
|
||||
virtual BOOL serialize(LLDataPacker& dp) const;
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llvisualparam.cpp
|
||||
* @brief Implementation of LLPolyMesh class.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llvisualparam.h
|
||||
* @brief Implementation of LLPolyMesh class.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ set(llcommon_HEADER_FILES
|
||||
llaprpool.h
|
||||
llassettype.h
|
||||
llassoclist.h
|
||||
llatomic.h
|
||||
llavatarconstants.h
|
||||
llbase32.h
|
||||
llbase64.h
|
||||
|
||||
@@ -26,8 +26,65 @@
|
||||
*
|
||||
* 31/03/2010
|
||||
* Initial version, written by Aleric Inglewood @ SL
|
||||
*
|
||||
* 14/03/2012
|
||||
* Added AIThreadSafeSingleThread and friends.
|
||||
* Added AIAccessConst (and derived AIAccess from it) to allow read
|
||||
* access to a const AIThreadSafeSimple.
|
||||
*/
|
||||
|
||||
// This file defines wrapper template classes for arbitrary types T
|
||||
// adding locking to the instance and shielding it from access
|
||||
// without first being locked.
|
||||
//
|
||||
// Locking and getting access works by creating a temporary (local)
|
||||
// access object that takes the wrapper class as argument. Creating
|
||||
// the access object obtains the lock, while destructing it releases
|
||||
// the lock.
|
||||
//
|
||||
// There are three types of wrapper classes:
|
||||
// AIThreadSafe, AIThreadSafeSimple and AIThreadSafeSingleThread.
|
||||
//
|
||||
// AIThreadSafe is for use with the access classes:
|
||||
// AIReadAccessConst, AIReadAccess and AIWriteAccess.
|
||||
//
|
||||
// AIThreadSafeSimple is for use with the access classes:
|
||||
// AIAccessConst and AIAccess.
|
||||
//
|
||||
// AIThreadSafeSingleThread is for use with the access classes:
|
||||
// AISTAccessConst and AISTAccess.
|
||||
//
|
||||
// AIReadAccessConst provides read access to a const AIThreadSafe.
|
||||
// AIReadAccess provides read access to a non-const AIThreadSafe.
|
||||
// AIWriteAccess provides read/write access to a non-const AIThreadSafe.
|
||||
//
|
||||
// AIAccessConst provides read access to a const AIThreadSafeSimple.
|
||||
// AIAccess provides read/write access to a non-const AIThreadSafeSimple.
|
||||
//
|
||||
// AISTAccessConst provides read access to a const AIThreadSafeSingleThread.
|
||||
// AISTAccess provides read/write access to a non-const AIThreadSafeSingleThread.
|
||||
//
|
||||
// Thus, AIThreadSafe is to protect objects with a read/write lock,
|
||||
// AIThreadSafeSimple is to protect objects with a single mutex,
|
||||
// and AIThreadSafeSingleThread doesn't do any locking but makes sure
|
||||
// (in Debug mode) that the wrapped object is only accessed by one thread.
|
||||
//
|
||||
// Each wrapper class allows its wrapped object to be constructed
|
||||
// with arbitrary parameters by using operator new with placement;
|
||||
// for example, to instantiate a class Foo with read/write locking:
|
||||
//
|
||||
// AIThreadSafe<Foo> foo(new (foo.memory()) Foo(param1, param2, ...));
|
||||
//
|
||||
// Each wrapper class has a derived class that end on 'DC' (which
|
||||
// stand for Default Constructed): AIThreadSafeDC, AIThreadSafeSimpleDC
|
||||
// and AIThreadSafeSingleThreadDC. The default constructors of those
|
||||
// wrapper classes cause the wrapped instance to be default constructed
|
||||
// as well. They also provide a general one-parameter constructor.
|
||||
// For example:
|
||||
//
|
||||
// AIThreadSafeDC<Foo> foo; // Default constructed Foo.
|
||||
// AIThreadSafeDC<Foo> foo(3.4); // Foo with one constructor parameter.
|
||||
//
|
||||
#ifndef AITHREADSAFE_H
|
||||
#define AITHREADSAFE_H
|
||||
|
||||
@@ -49,15 +106,10 @@
|
||||
template<typename T> struct AIReadAccessConst;
|
||||
template<typename T> struct AIReadAccess;
|
||||
template<typename T> struct AIWriteAccess;
|
||||
template<typename T> struct AIAccessConst;
|
||||
template<typename T> struct AIAccess;
|
||||
|
||||
#if LL_WINDOWS
|
||||
template<typename T> class AIThreadSafeBits;
|
||||
template<typename T>
|
||||
struct AIThreadSafeWindowsHack {
|
||||
AIThreadSafeWindowsHack(AIThreadSafeBits<T>& var, T* object);
|
||||
};
|
||||
#endif
|
||||
template<typename T> struct AISTAccessConst;
|
||||
template<typename T> struct AISTAccess;
|
||||
|
||||
template<typename T>
|
||||
class AIThreadSafeBits
|
||||
@@ -80,10 +132,15 @@ public:
|
||||
// Only for use by AITHREADSAFE, see below.
|
||||
void* memory() const { return const_cast<long*>(&mMemory[0]); }
|
||||
|
||||
// Cast a T* back to AIThreadSafeBits<T>. This is the inverse of memory().
|
||||
template<typename T2>
|
||||
static AIThreadSafeBits<T2>* wrapper_cast(T2* ptr)
|
||||
{ return reinterpret_cast<AIThreadSafeBits<T2>*>(reinterpret_cast<char*>(ptr) - offsetof(AIThreadSafeBits<T2>, mMemory[0])); }
|
||||
template<typename T2>
|
||||
static AIThreadSafeBits<T2> const* wrapper_cast(T2 const* ptr)
|
||||
{ return reinterpret_cast<AIThreadSafeBits<T2> const*>(reinterpret_cast<char const*>(ptr) - offsetof(AIThreadSafeBits<T2>, mMemory[0])); }
|
||||
|
||||
protected:
|
||||
#if LL_WINDOWS
|
||||
template<typename T2> friend struct AIThreadSafeWindowsHack;
|
||||
#endif
|
||||
// Accessors.
|
||||
T const* ptr() const { return reinterpret_cast<T const*>(mMemory); }
|
||||
T* ptr() { return reinterpret_cast<T*>(mMemory); }
|
||||
@@ -185,6 +242,14 @@ public:
|
||||
llassert(object == AIThreadSafeBits<T>::ptr());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LL_DEBUG
|
||||
// Can only be locked when there still exists an AIAccess object that
|
||||
// references this object and will access it upon destruction.
|
||||
// If the assertion fails, make sure that such AIAccess object is
|
||||
// destructed before the deletion of this object.
|
||||
~AIThreadSafe() { llassert(!mRWLock.isLocked()); }
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -194,48 +259,39 @@ public:
|
||||
*
|
||||
* <code>
|
||||
* Foo foo(x, y);
|
||||
* static Bar bar;
|
||||
* static Bar bar(0.1, true);
|
||||
* </code>
|
||||
*
|
||||
* One can instantiate a thread-safe instance with
|
||||
*
|
||||
* <code>
|
||||
* AITHREADSAFE(Foo, foo, (x, y));
|
||||
* static AITHREADSAFE(Bar, bar, );
|
||||
* static AITHREADSAFE(Bar, bar, (0.1, true));
|
||||
* </code>
|
||||
*
|
||||
* Note: This macro does not allow to allocate such object on the heap.
|
||||
* If that is needed, have a look at AIThreadSafeDC.
|
||||
*/
|
||||
#if LL_WINDOWS
|
||||
template<typename T>
|
||||
AIThreadSafeWindowsHack<T>::AIThreadSafeWindowsHack(AIThreadSafeBits<T>& var, T* object)
|
||||
{
|
||||
llassert(object == var.ptr());
|
||||
}
|
||||
#define AITHREADSAFE(type, var, paramlist) \
|
||||
AIThreadSafe<type> var(NULL); \
|
||||
AIThreadSafeWindowsHack<type> dummy_##var(var, new (var.memory()) type paramlist)
|
||||
#else
|
||||
#define AITHREADSAFE(type, var, paramlist) AIThreadSafe<type> var(new (var.memory()) type paramlist)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* This class is the same as an AIThreadSafe wrapper, except that it can only
|
||||
* be used for default constructed objects.
|
||||
* be used for default constructed objects, or constructed with one parameter.
|
||||
*
|
||||
* For example, instead of
|
||||
*
|
||||
* <code>
|
||||
* Foo foo;
|
||||
* Bar bar(3);
|
||||
* </code>
|
||||
*
|
||||
* One would use
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeDC<Foo> foo;
|
||||
* AIThreadSafeDC<Bar> bar(3);
|
||||
* </code>
|
||||
*
|
||||
* The advantage over AITHREADSAFE is that this object can be allocated with
|
||||
@@ -253,6 +309,8 @@ class AIThreadSafeDC : public AIThreadSafe<T>
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object.
|
||||
AIThreadSafeDC(void) { new (AIThreadSafe<T>::ptr()) T; }
|
||||
// Allow an arbitrary parameter to be passed for construction.
|
||||
template<typename T2> AIThreadSafeDC(T2 const& val) { new (AIThreadSafe<T>::ptr()) T(val); }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -390,6 +448,7 @@ struct AIWriteAccess : public AIReadAccess<T>
|
||||
*
|
||||
* AIAccess<Foo> foo_w(foo);
|
||||
* // Use foo_w-> for read and write access.
|
||||
* </code>
|
||||
*
|
||||
* See also AIThreadSafe
|
||||
*/
|
||||
@@ -398,6 +457,7 @@ class AIThreadSafeSimple : public AIThreadSafeBits<T>
|
||||
{
|
||||
protected:
|
||||
// Only this one may access the object (through ptr()).
|
||||
friend struct AIAccessConst<T>;
|
||||
friend struct AIAccess<T>;
|
||||
|
||||
// Locking control.
|
||||
@@ -411,6 +471,14 @@ protected:
|
||||
public:
|
||||
// Only for use by AITHREADSAFESIMPLE, see below.
|
||||
AIThreadSafeSimple(T* object) { llassert(object == AIThreadSafeBits<T>::ptr()); }
|
||||
|
||||
#if LL_DEBUG
|
||||
// Can only be locked when there still exists an AIAccess object that
|
||||
// references this object and will access it upon destruction.
|
||||
// If the assertion fails, make sure that such AIAccess object is
|
||||
// destructed before the deletion of this object.
|
||||
~AIThreadSafeSimple() { llassert(!mMutex.isLocked()); }
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -420,14 +488,14 @@ public:
|
||||
*
|
||||
* <code>
|
||||
* Foo foo(x, y);
|
||||
* static Bar bar;
|
||||
* static Bar bar(0.1, true);
|
||||
* </code>
|
||||
*
|
||||
* One can instantiate a thread-safe instance with
|
||||
*
|
||||
* <code>
|
||||
* AITHREADSAFESIMPLE(Foo, foo, (x, y));
|
||||
* static AITHREADSAFESIMPLE(Bar, bar, );
|
||||
* static AITHREADSAFESIMPLE(Bar, bar, (0.1, true));
|
||||
* </code>
|
||||
*
|
||||
* Note: This macro does not allow to allocate such object on the heap.
|
||||
@@ -439,18 +507,20 @@ public:
|
||||
* @brief A wrapper class for objects that need to be accessed by more than one thread.
|
||||
*
|
||||
* This class is the same as an AIThreadSafeSimple wrapper, except that it can only
|
||||
* be used for default constructed objects.
|
||||
* be used for default constructed objects, or constructed with one parameter.
|
||||
*
|
||||
* For example, instead of
|
||||
*
|
||||
* <code>
|
||||
* Foo foo;
|
||||
* Bar bar(0.1);
|
||||
* </code>
|
||||
*
|
||||
* One would use
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeSimpleDC<Foo> foo;
|
||||
* AIThreadSafeSimpleDC<Bar> bar(0.1);
|
||||
* </code>
|
||||
*
|
||||
* The advantage over AITHREADSAFESIMPLE is that this object can be allocated with
|
||||
@@ -468,10 +538,12 @@ class AIThreadSafeSimpleDC : public AIThreadSafeSimple<T>
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object.
|
||||
AIThreadSafeSimpleDC(void) { new (AIThreadSafeSimple<T>::ptr()) T; }
|
||||
// Allow an arbitrary parameter to be passed for construction.
|
||||
template<typename T2> AIThreadSafeSimpleDC(T2 const& val) { new (AIThreadSafeSimple<T>::ptr()) T(val); }
|
||||
|
||||
protected:
|
||||
// For use by AIThreadSafeSimpleDCRootPool
|
||||
AIThreadSafeSimpleDC(LLAPRPool& parent) : AIThreadSafeSimple<T>(parent) { new (AIThreadSafeSimple<T>::ptr()) T; }
|
||||
AIThreadSafeSimpleDC(LLAPRRootPool& parent) : AIThreadSafeSimple<T>(parent) { new (AIThreadSafeSimple<T>::ptr()) T; }
|
||||
};
|
||||
|
||||
// Helper class for AIThreadSafeSimpleDCRootPool to assure initialization of
|
||||
@@ -493,7 +565,7 @@ private:
|
||||
* for the internally used mutexes and condition, instead of using the current threads
|
||||
* root pool. The advantage of this is that it can be used for objects that need to
|
||||
* be accessed from the destructors of global objects (after main). The disadvantage
|
||||
* is that it's less efficient to use your own root pool, therefore it's use should be
|
||||
* is that it's less efficient to use your own root pool, therefore its use should be
|
||||
* restricted to those cases where it is absolutely necessary.
|
||||
*/
|
||||
template<typename T>
|
||||
@@ -509,13 +581,13 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Write lock object and provide read/write access.
|
||||
* @brief Write lock object and provide read access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIAccess
|
||||
struct AIAccessConst
|
||||
{
|
||||
//! Construct a AIAccess from a non-constant AIThreadSafeSimple.
|
||||
AIAccess(AIThreadSafeSimple<T>& wrapper) : mWrapper(wrapper)
|
||||
//! Construct a AIAccessConst from a constant AIThreadSafeSimple.
|
||||
AIAccessConst(AIThreadSafeSimple<T> const& wrapper) : mWrapper(const_cast<AIThreadSafeSimple<T>&>(wrapper))
|
||||
#if AI_NEED_ACCESS_CC
|
||||
, mIsCopyConstructed(false)
|
||||
#endif
|
||||
@@ -524,12 +596,12 @@ struct AIAccess
|
||||
}
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T* operator->() const { return this->mWrapper.ptr(); }
|
||||
T const* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T& operator*() const { return *this->mWrapper.ptr(); }
|
||||
T const& operator*() const { return *this->mWrapper.ptr(); }
|
||||
|
||||
~AIAccess()
|
||||
~AIAccessConst()
|
||||
{
|
||||
#if AI_NEED_ACCESS_CC
|
||||
if (mIsCopyConstructed) return;
|
||||
@@ -543,12 +615,224 @@ protected:
|
||||
#if AI_NEED_ACCESS_CC
|
||||
bool mIsCopyConstructed;
|
||||
public:
|
||||
AIAccess(AIAccess const& orig) : mWrapper(orig.mWrapper), mIsCopyConstructed(true) { }
|
||||
AIAccessConst(AIAccessConst const& orig) : mWrapper(orig.mWrapper), mIsCopyConstructed(true) { }
|
||||
#else
|
||||
private:
|
||||
// Disallow copy constructing directly.
|
||||
AIAccess(AIAccess const&);
|
||||
AIAccessConst(AIAccessConst const&);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Write lock object and provide read/write access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AIAccess : public AIAccessConst<T>
|
||||
{
|
||||
//! Construct a AIAccess from a non-constant AIThreadSafeSimple.
|
||||
AIAccess(AIThreadSafeSimple<T>& wrapper) : AIAccessConst<T>(wrapper) { }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T& operator*() const { return *this->mWrapper.ptr(); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that should only be accessed by a single thread.
|
||||
*
|
||||
* Use AITHREADSAFESINGLETHREAD to define instances of any type, and use AISTAccess
|
||||
* to get access to the instance.
|
||||
*
|
||||
* For example,
|
||||
*
|
||||
* <code>
|
||||
* class Foo { public: Foo(int, int); };
|
||||
*
|
||||
* AITHREADSAFESINGLETHREAD(Foo, foo, (2, 3));
|
||||
*
|
||||
* AISTAccess<Foo> foo_w(foo);
|
||||
* // Use foo_w-> for read and write access.
|
||||
* </code>
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeSingleThread : public AIThreadSafeBits<T>
|
||||
{
|
||||
protected:
|
||||
// Only these one may access the object (through ptr()).
|
||||
friend struct AISTAccessConst<T>;
|
||||
friend struct AISTAccess<T>;
|
||||
|
||||
// For use by AIThreadSafeSingleThreadDC.
|
||||
AIThreadSafeSingleThread(void)
|
||||
#ifdef LL_DEBUG
|
||||
: mAccessed(false)
|
||||
#endif
|
||||
{ }
|
||||
|
||||
#ifdef LL_DEBUG
|
||||
mutable bool mAccessed;
|
||||
mutable apr_os_thread_t mTheadID;
|
||||
|
||||
void accessed(void) const
|
||||
{
|
||||
if (!mAccessed)
|
||||
{
|
||||
mAccessed = true;
|
||||
mTheadID = apr_os_thread_current();
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert_always(apr_os_thread_equal(mTheadID, apr_os_thread_current()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Only for use by AITHREADSAFESINGLETHREAD, see below.
|
||||
AIThreadSafeSingleThread(T* object)
|
||||
#ifdef LL_DEBUG
|
||||
: mAccessed(false)
|
||||
#endif
|
||||
{
|
||||
llassert(object == AIThreadSafeBits<T>::ptr());
|
||||
}
|
||||
|
||||
private:
|
||||
// Disallow copying or assignments.
|
||||
AIThreadSafeSingleThread(AIThreadSafeSingleThread const&);
|
||||
void operator=(AIThreadSafeSingleThread const&);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A wrapper class for objects that should only be accessed by a single thread.
|
||||
*
|
||||
* This class is the same as an AIThreadSafeSingleThread wrapper, except that it can only
|
||||
* be used for default constructed objects, or constructed with one parameter.
|
||||
*
|
||||
* For example, instead of
|
||||
*
|
||||
* <code>
|
||||
* Foo foo;
|
||||
* Bar bar(0.1);
|
||||
* </code>
|
||||
*
|
||||
* One would use
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeSingleThreadDC<Foo> foo;
|
||||
* AIThreadSafeSingleThreadDC<Bar> bar(0.1);
|
||||
* </code>
|
||||
*
|
||||
* The advantage over AITHREADSAFESINGLETHREAD is that this object can be allocated with
|
||||
* new on the heap. For example:
|
||||
*
|
||||
* <code>
|
||||
* AIThreadSafeSingleThreadDC<Foo>* ptr = new AIThreadSafeSingleThreadDC<Foo>;
|
||||
* </code>
|
||||
*
|
||||
* which is not possible with AITHREADSAFESINGLETHREAD.
|
||||
*
|
||||
* This class is primarily intended to test if some (member) variable needs locking,
|
||||
* during development (in debug mode), and is therefore more flexible in that it
|
||||
* automatically converts to the underlying type, can be assigned to and can be
|
||||
* written to an ostream, as if it wasn't wrapped at all. This is to reduce the
|
||||
* impact on the source code.
|
||||
*/
|
||||
template<typename T>
|
||||
class AIThreadSafeSingleThreadDC : public AIThreadSafeSingleThread<T>
|
||||
{
|
||||
public:
|
||||
// Construct a wrapper around a default constructed object.
|
||||
AIThreadSafeSingleThreadDC(void) { new (AIThreadSafeSingleThread<T>::ptr()) T; }
|
||||
// Allow an arbitrary parameter to be passed for construction.
|
||||
template<typename T2> AIThreadSafeSingleThreadDC(T2 const& val) { new (AIThreadSafeSingleThread<T>::ptr()) T(val); }
|
||||
|
||||
// Allow assigning with T.
|
||||
AIThreadSafeSingleThreadDC& operator=(T const& val) { AIThreadSafeSingleThread<T>::accessed(); *AIThreadSafeSingleThread<T>::ptr() = val; return *this; }
|
||||
// Allow writing to an ostream.
|
||||
friend std::ostream& operator<<(std::ostream& os, AIThreadSafeSingleThreadDC const& wrapped_val) { wrapped_val.accessed(); return os << *wrapped_val.ptr(); }
|
||||
|
||||
// Automatic conversion to T.
|
||||
operator T&(void) { AIThreadSafeSingleThread<T>::accessed(); return *AIThreadSafeSingleThread<T>::ptr(); }
|
||||
operator T const&(void) const { AIThreadSafeSingleThread<T>::accessed(); return *AIThreadSafeSingleThread<T>::ptr(); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Instantiate a static, global or local object of a given type wrapped in AIThreadSafeSingleThread, using an arbitrary constructor.
|
||||
*
|
||||
* For example, instead of doing
|
||||
*
|
||||
* <code>
|
||||
* Foo foo(x, y);
|
||||
* static Bar bar;
|
||||
* </code>
|
||||
*
|
||||
* One can instantiate a thread-safe instance with
|
||||
*
|
||||
* <code>
|
||||
* AITHREADSAFESINGLETHREAD(Foo, foo, (x, y));
|
||||
* static AITHREADSAFESINGLETHREAD(Bar, bar, );
|
||||
* </code>
|
||||
*
|
||||
* Note: This macro does not allow to allocate such object on the heap.
|
||||
* If that is needed, have a look at AIThreadSafeSingleThreadDC.
|
||||
*/
|
||||
#define AITHREADSAFESINGLETHREAD(type, var, paramlist) AIThreadSafeSingleThread<type> var(new (var.memory()) type paramlist)
|
||||
|
||||
/**
|
||||
* @brief Access single threaded object for read access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AISTAccessConst
|
||||
{
|
||||
//! Construct a AISTAccessConst from a constant AIThreadSafeSingleThread.
|
||||
AISTAccessConst(AIThreadSafeSingleThread<T> const& wrapper) : mWrapper(const_cast<AIThreadSafeSingleThread<T>&>(wrapper))
|
||||
{
|
||||
#if LL_DEBUG
|
||||
wrapper.accessed();
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Access the underlaying object for read access.
|
||||
T const* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for read write access.
|
||||
T const& operator*() const { return *this->mWrapper.ptr(); }
|
||||
|
||||
protected:
|
||||
AIThreadSafeSingleThread<T>& mWrapper; //!< Reference to the object that we provide access to.
|
||||
|
||||
#if AI_NEED_ACCESS_CC
|
||||
public:
|
||||
AISTAccessConst(AISTAccessConst const& orig) : mWrapper(orig.mWrapper) { }
|
||||
#else
|
||||
private:
|
||||
// Disallow copy constructing directly.
|
||||
AISTAccessConst(AISTAccessConst const&);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Access single threaded object for read/write access.
|
||||
*/
|
||||
template<typename T>
|
||||
struct AISTAccess : public AISTAccessConst<T>
|
||||
{
|
||||
//! Construct a AISTAccess from a non-constant AIThreadSafeSingleThread.
|
||||
AISTAccess(AIThreadSafeSingleThread<T>& wrapper) : AISTAccessConst<T>(wrapper)
|
||||
{
|
||||
#if LL_DEBUG
|
||||
wrapper.accessed();
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T* operator->() const { return this->mWrapper.ptr(); }
|
||||
|
||||
//! Access the underlaying object for (read and) write access.
|
||||
T& operator*() const { return *this->mWrapper.ptr(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -375,7 +375,7 @@ const U32 PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
|
||||
const U32 MAP_ITEM_TELEHUB = 0x01;
|
||||
const U32 MAP_ITEM_PG_EVENT = 0x02;
|
||||
const U32 MAP_ITEM_MATURE_EVENT = 0x03;
|
||||
const U32 MAP_ITEM_POPULAR = 0x04;
|
||||
//const U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW
|
||||
//const U32 MAP_ITEM_AGENT_COUNT = 0x05;
|
||||
const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
|
||||
const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
|
||||
|
||||
@@ -74,7 +74,7 @@ S32 LL_HEARTBEAT_SIGNAL = (SIGRTMAX >= 0) ? (SIGRTMAX-0) : SIGUSR2;
|
||||
// the static application instance
|
||||
LLApp* LLApp::sApplication = NULL;
|
||||
|
||||
// Allows the generation of core files for post mortum under gdb
|
||||
// Allows the generation of core files for post mortem under gdb
|
||||
// and disables crashlogger
|
||||
BOOL LLApp::sDisableCrashlogger = FALSE;
|
||||
|
||||
@@ -396,6 +396,7 @@ bool LLApp::isQuitting()
|
||||
return (APP_STATUS_QUITTING == sStatus);
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLApp::isExiting()
|
||||
{
|
||||
return isQuitting() || isError();
|
||||
|
||||
@@ -88,7 +88,7 @@ bool ll_apr_warn_status(apr_status_t status)
|
||||
|
||||
void ll_apr_assert_status(apr_status_t status)
|
||||
{
|
||||
llassert(ll_apr_warn_status(status) == false);
|
||||
llassert(!ll_apr_warn_status(status));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
@@ -146,7 +146,7 @@ apr_status_t LLAPRFile::open(std::string const& filename, apr_int32_t flags, acc
|
||||
|
||||
apr_status_t status;
|
||||
{
|
||||
apr_pool_t* apr_file_open_pool;
|
||||
apr_pool_t* apr_file_open_pool; // The use of apr_pool_t is OK here.
|
||||
// This is a temporary variable for a pool that is passed directly to apr_file_open below.
|
||||
if (access_type == short_lived)
|
||||
{
|
||||
@@ -199,7 +199,6 @@ apr_status_t LLAPRFile::open(const std::string& filename, apr_int32_t flags, BOO
|
||||
// File I/O
|
||||
S32 LLAPRFile::read(void *buf, S32 nbytes)
|
||||
{
|
||||
//llassert_always(mFile); (ASC-TUDCC) -HgB
|
||||
if(!mFile)
|
||||
{
|
||||
llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ;
|
||||
@@ -222,7 +221,6 @@ S32 LLAPRFile::read(void *buf, S32 nbytes)
|
||||
|
||||
S32 LLAPRFile::write(const void *buf, S32 nbytes)
|
||||
{
|
||||
// llassert_always(mFile); (ASC-TUDCC) -HgB
|
||||
if(!mFile)
|
||||
{
|
||||
llwarns << "apr mFile is removed by somebody else. Can not write." << llendl ;
|
||||
|
||||
@@ -91,29 +91,8 @@ protected:
|
||||
apr_thread_mutex_t* mMutex;
|
||||
};
|
||||
|
||||
template <typename Type> class LLAtomic32
|
||||
{
|
||||
public:
|
||||
LLAtomic32<Type>() {};
|
||||
LLAtomic32<Type>(Type x) {apr_atomic_set32(&mData, apr_uint32_t(x)); };
|
||||
~LLAtomic32<Type>() {};
|
||||
|
||||
operator const Type() { apr_uint32_t data = apr_atomic_read32(&mData); return Type(data); }
|
||||
Type operator =(const Type& x) { apr_atomic_set32(&mData, apr_uint32_t(x)); return Type(mData); }
|
||||
void operator -=(Type x) { apr_atomic_sub32(&mData, apr_uint32_t(x)); }
|
||||
void operator +=(Type x) { apr_atomic_add32(&mData, apr_uint32_t(x)); }
|
||||
Type operator ++(int) { return apr_atomic_inc32(&mData); } // Type++
|
||||
Type operator --(int) { return apr_atomic_dec32(&mData); } // Type--
|
||||
|
||||
private:
|
||||
apr_uint32_t mData;
|
||||
};
|
||||
|
||||
typedef LLAtomic32<U32> LLAtomicU32;
|
||||
typedef LLAtomic32<S32> LLAtomicS32;
|
||||
|
||||
// File IO convenience functions.
|
||||
// Returns NULL if the file fails to openm sets *sizep to file size of not NULL
|
||||
// Returns NULL if the file fails to open, sets *sizep to file size if not NULL
|
||||
// abbreviated flags
|
||||
#define LL_APR_R (APR_READ) // "r"
|
||||
#define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w"
|
||||
@@ -131,7 +110,7 @@ typedef LLAtomic32<S32> LLAtomicS32;
|
||||
// especially do not put some time-costly operations between open() and close().
|
||||
// otherwise it might lock the APRFilePool.
|
||||
//there are two different apr_pools the APRFile can use:
|
||||
// 1, a temperary pool passed to an APRFile function, which is used within this function and only once.
|
||||
// 1, a temporary pool passed to an APRFile function, which is used within this function and only once.
|
||||
// 2, a global pool.
|
||||
//
|
||||
|
||||
@@ -189,7 +168,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Function which approprately logs error or remains quiet on
|
||||
* @brief Function which appropriately logs error or remains quiet on
|
||||
* APR_SUCCESS.
|
||||
* @return Returns <code>true</code> if status is an error condition.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file LLAPRPool.cpp
|
||||
* @file llaprpool.cpp
|
||||
*
|
||||
* Copyright (c) 2010, Aleric Inglewood.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file LLAPRPool.h
|
||||
* @file llaprpool.h
|
||||
* @brief Implementation of LLAPRPool.
|
||||
*
|
||||
* Copyright (c) 2010, Aleric Inglewood.
|
||||
|
||||
61
indra/llcommon/llatomic.h
Normal file
61
indra/llcommon/llatomic.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @file llatomic.h
|
||||
* @brief Definition of LLAtomic
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2004-2009, Linden Research, Inc.
|
||||
* Copyright (c) 2012, Aleric Inglewood
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLATOMIC_H
|
||||
#define LL_LLATOMIC_H
|
||||
|
||||
#include "apr_atomic.h"
|
||||
|
||||
template <typename Type> class LLAtomic32
|
||||
{
|
||||
public:
|
||||
LLAtomic32(void) { }
|
||||
LLAtomic32(LLAtomic32 const& atom) { apr_uint32_t data = apr_atomic_read32(const_cast<apr_uint32_t*>(&atom.mData)); apr_atomic_set32(&mData, data); }
|
||||
LLAtomic32(Type x) { apr_atomic_set32(&mData, static_cast<apr_uint32_t>(x)); }
|
||||
LLAtomic32& operator=(LLAtomic32 const& atom) { apr_uint32_t data = apr_atomic_read32(const_cast<apr_uint32_t*>(&atom.mData)); apr_atomic_set32(&mData, data); return *this; }
|
||||
|
||||
operator Type() const { apr_uint32_t data = apr_atomic_read32(const_cast<apr_uint32_t*>(&mData)); return static_cast<Type>(data); }
|
||||
void operator=(Type x) { apr_atomic_set32(&mData, static_cast<apr_uint32_t>(x)); }
|
||||
void operator-=(Type x) { apr_atomic_sub32(&mData, static_cast<apr_uint32_t>(x)); }
|
||||
void operator+=(Type x) { apr_atomic_add32(&mData, static_cast<apr_uint32_t>(x)); }
|
||||
Type operator++(int) { return apr_atomic_inc32(&mData); } // Type++
|
||||
bool operator--() { return apr_atomic_dec32(&mData); } // Returns (--Type != 0)
|
||||
|
||||
private:
|
||||
apr_uint32_t mData;
|
||||
};
|
||||
|
||||
typedef LLAtomic32<U32> LLAtomicU32;
|
||||
typedef LLAtomic32<S32> LLAtomicS32;
|
||||
|
||||
#endif
|
||||
@@ -99,7 +99,7 @@ std::string LLAvatarName::getCompleteName(bool linefeed) const
|
||||
}
|
||||
else
|
||||
{
|
||||
name = mDisplayName + (linefeed ? "\n(" : "(") + mUsername + ")";
|
||||
name = mDisplayName + (linefeed ? "\n(" : " (") + mUsername + ")";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifndef LLBASE32_H
|
||||
#define LLBASE32_h
|
||||
#define LLBASE32_H
|
||||
|
||||
class LL_COMMON_API LLBase32
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifndef LLBASE64_H
|
||||
#define LLBASE64_h
|
||||
#define LLBASE64_H
|
||||
|
||||
class LL_COMMON_API LLBase64
|
||||
{
|
||||
|
||||
@@ -75,14 +75,15 @@ public:
|
||||
: mText(text),
|
||||
mFromName(),
|
||||
mFromID(),
|
||||
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
mRlvLocFiltered(FALSE),
|
||||
mRlvNamesFiltered(FALSE),
|
||||
// [/RLVa:KB]
|
||||
|
||||
mSourceType(CHAT_SOURCE_AGENT),
|
||||
mChatType(CHAT_TYPE_NORMAL),
|
||||
mAudible(CHAT_AUDIBLE_FULLY),
|
||||
mMuted(FALSE),
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
|
||||
mRlvLocFiltered(FALSE),
|
||||
mRlvNamesFiltered(FALSE),
|
||||
// [/RLVa:KB]
|
||||
mTime(0.0),
|
||||
mPosAgent(),
|
||||
mURL()
|
||||
@@ -104,14 +105,14 @@ public:
|
||||
std::string mText; // UTF-8 line of text
|
||||
std::string mFromName; // agent or object name
|
||||
LLUUID mFromID; // agent id or object id
|
||||
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
BOOL mRlvLocFiltered;
|
||||
BOOL mRlvNamesFiltered;
|
||||
// [/RLVa:KB]
|
||||
EChatSourceType mSourceType;
|
||||
EChatType mChatType;
|
||||
EChatAudible mAudible;
|
||||
BOOL mMuted; // pass muted chat to maintain list of chatters
|
||||
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
|
||||
BOOL mRlvLocFiltered;
|
||||
BOOL mRlvNamesFiltered;
|
||||
// [/RLVa:KB]
|
||||
F64 mTime; // viewer only, seconds from viewer start
|
||||
LLVector3 mPosAgent;
|
||||
std::string mURL;
|
||||
|
||||
@@ -39,7 +39,6 @@ void LLCommon::initClass()
|
||||
{
|
||||
LLMemory::initClass();
|
||||
LLTimer::initClass();
|
||||
LLThreadSafeRefCount::initThreadSafeRefCount();
|
||||
// LLWorkerThread::initClass();
|
||||
// LLFrameCallbackManager::initClass();
|
||||
}
|
||||
@@ -49,7 +48,6 @@ void LLCommon::cleanupClass()
|
||||
{
|
||||
// LLFrameCallbackManager::cleanupClass();
|
||||
// LLWorkerThread::cleanupClass();
|
||||
LLThreadSafeRefCount::cleanupThreadSafeRefCount();
|
||||
LLTimer::cleanupClass();
|
||||
LLMemory::cleanupClass();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llcursortypes.h"
|
||||
|
||||
ECursorType getCursorFromString(const std::string& cursor_string)
|
||||
@@ -66,14 +68,14 @@ ECursorType getCursorFromString(const std::string& cursor_string)
|
||||
cursor_string_table["UI_CURSOR_TOOLPAN"] = UI_CURSOR_TOOLPAN;
|
||||
cursor_string_table["UI_CURSOR_TOOLZOOMIN"] = UI_CURSOR_TOOLZOOMIN;
|
||||
cursor_string_table["UI_CURSOR_TOOLPICKOBJECT3"] = UI_CURSOR_TOOLPICKOBJECT3;
|
||||
cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT;
|
||||
cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY;
|
||||
cursor_string_table["UI_CURSOR_TOOLPAY"] = UI_CURSOR_TOOLPAY;
|
||||
cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN;
|
||||
cursor_string_table["UI_CURSOR_TOOLPLAY"] = UI_CURSOR_TOOLPLAY;
|
||||
cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE;
|
||||
cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN;
|
||||
cursor_string_table["UI_CURSOR_PIPETTE"] = UI_CURSOR_PIPETTE;
|
||||
cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT;
|
||||
cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY;
|
||||
cursor_string_table["UI_CURSOR_TOOLPAY"] = UI_CURSOR_TOOLPAY;
|
||||
cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN;
|
||||
}
|
||||
|
||||
std::map<std::string,U32>::const_iterator iter = cursor_string_table.find(cursor_string);
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
#ifndef LL_LLCURSORTYPES_H
|
||||
#define LL_LLCURSORTYPES_H
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
// If you add types here, add them in LLCursor::getCursorFromString
|
||||
enum ECursorType {
|
||||
UI_CURSOR_ARROW,
|
||||
@@ -66,14 +64,14 @@ enum ECursorType {
|
||||
UI_CURSOR_TOOLPAN,
|
||||
UI_CURSOR_TOOLZOOMIN,
|
||||
UI_CURSOR_TOOLPICKOBJECT3,
|
||||
UI_CURSOR_TOOLSIT,
|
||||
UI_CURSOR_TOOLBUY,
|
||||
UI_CURSOR_TOOLPAY,
|
||||
UI_CURSOR_TOOLOPEN,
|
||||
UI_CURSOR_TOOLPLAY,
|
||||
UI_CURSOR_TOOLPAUSE,
|
||||
UI_CURSOR_TOOLMEDIAOPEN,
|
||||
UI_CURSOR_PIPETTE,
|
||||
UI_CURSOR_TOOLSIT,
|
||||
UI_CURSOR_TOOLBUY,
|
||||
UI_CURSOR_TOOLPAY,
|
||||
UI_CURSOR_TOOLOPEN,
|
||||
UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor)
|
||||
};
|
||||
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace
|
||||
{
|
||||
/* This pattern, of returning a reference to a static function
|
||||
variable, is to ensure that this global is constructed before
|
||||
it is used, no matter what the global initializeation sequence
|
||||
it is used, no matter what the global initialization sequence
|
||||
is.
|
||||
See C++ FAQ Lite, sections 10.12 through 10.14
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
Information for most users:
|
||||
|
||||
Code can log messages with constuctions like this:
|
||||
Code can log messages with constructions like this:
|
||||
|
||||
LL_INFOS("StringTag") << "request to fizzbip agent " << agent_id
|
||||
<< " denied due to timeout" << LL_ENDL;
|
||||
@@ -53,9 +53,9 @@
|
||||
Messages can be logged to one of four increasing levels of concern,
|
||||
using one of four "streams":
|
||||
|
||||
LL_DEBUGS("StringTag") - debug messages that are normally supressed
|
||||
LL_INFOS("StringTag") - informational messages that are normall shown
|
||||
LL_WARNS("StringTag") - warning messages that singal a problem
|
||||
LL_DEBUGS("StringTag") - debug messages that are normally suppressed
|
||||
LL_INFOS("StringTag") - informational messages that are normally shown
|
||||
LL_WARNS("StringTag") - warning messages that signal a problem
|
||||
LL_ERRS("StringTag") - error messages that are major, unrecoverable failures
|
||||
|
||||
The later (LL_ERRS("StringTag")) automatically crashes the process after the message
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
WARN: LLFoo::doSomething: called with a big value for i: 283
|
||||
|
||||
Which messages are logged and which are supressed can be controled at run
|
||||
Which messages are logged and which are suppressed can be controlled at run
|
||||
time from the live file logcontrol.xml based on function, class and/or
|
||||
source file. See etc/logcontrol-dev.xml for details.
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace LLError
|
||||
enum ELevel
|
||||
{
|
||||
LEVEL_ALL = 0,
|
||||
// used to indicate that all messagess should be logged
|
||||
// used to indicate that all messages should be logged
|
||||
|
||||
LEVEL_DEBUG = 0,
|
||||
LEVEL_INFO = 1,
|
||||
@@ -226,7 +226,7 @@ namespace LLError
|
||||
// See top of file for example of how to use this
|
||||
|
||||
typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
|
||||
// Outside a class declartion, or in class without LOG_CLASS(), this
|
||||
// Outside a class declaration, or in class without LOG_CLASS(), this
|
||||
// typedef causes the messages to not be associated with any class.
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llerrorthread.h"
|
||||
|
||||
#include "llapp.h"
|
||||
#include "lltimer.h" // ms_sleep()
|
||||
|
||||
@@ -117,13 +118,8 @@ void LLErrorThread::run()
|
||||
#if !LL_WINDOWS
|
||||
U32 last_sig_child_count = 0;
|
||||
#endif
|
||||
while (1)
|
||||
while (! (LLApp::isError() || LLApp::isStopped()))
|
||||
{
|
||||
if (LLApp::isError() || LLApp::isStopped())
|
||||
{
|
||||
// The application has stopped running, time to take action (maybe)
|
||||
break;
|
||||
}
|
||||
#if !LL_WINDOWS
|
||||
// Check whether or not the main thread had a sig child we haven't handled.
|
||||
U32 current_sig_child_count = LLApp::getSigChildCount();
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#if LL_WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <hash_map>
|
||||
#include <algorithm>
|
||||
#elif LL_DARWIN || LL_LINUX
|
||||
#if CC_GCC
|
||||
# if GCC_VERSION >= 40300 // gcc 4.3 and up
|
||||
# include <backward/hashtable.h>
|
||||
# elif GCC_VERSION >= 30400 // gcc 3.4 and up
|
||||
@@ -48,6 +49,9 @@
|
||||
# else
|
||||
# include <hashtable.h>
|
||||
# endif
|
||||
#elif CC_CLANG
|
||||
# include <hashtable.h>
|
||||
#endif
|
||||
#elif LL_SOLARIS
|
||||
#include <ext/hashtable.h>
|
||||
#else
|
||||
|
||||
@@ -134,7 +134,4 @@ private:
|
||||
LL_COMMON_API bool operator==(const LLMD5& a, const LLMD5& b);
|
||||
LL_COMMON_API bool operator!=(const LLMD5& a, const LLMD5& b);
|
||||
|
||||
LL_COMMON_API bool operator==(const LLMD5& a, const LLMD5& b);
|
||||
LL_COMMON_API bool operator!=(const LLMD5& a, const LLMD5& b);
|
||||
|
||||
#endif // LL_LLMD5_H
|
||||
|
||||
@@ -39,7 +39,7 @@ class LLSD;
|
||||
class LLOptionInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLOptionInterface() = 0;
|
||||
virtual ~LLOptionInterface();
|
||||
virtual LLSD getOption(const std::string& name) const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#if LL_DARWIN || LL_LINUX
|
||||
// not required or present on Win32
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
LLProcessLauncher::LLProcessLauncher()
|
||||
|
||||
@@ -115,7 +115,7 @@ void LLQueuedThread::shutdown()
|
||||
|
||||
// MAIN THREAD
|
||||
// virtual
|
||||
S32 LLQueuedThread::update(U32 max_time_ms)
|
||||
S32 LLQueuedThread::update(F32 max_time_ms)
|
||||
{
|
||||
if (!mStarted)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ S32 LLQueuedThread::update(U32 max_time_ms)
|
||||
return updateQueue(max_time_ms);
|
||||
}
|
||||
|
||||
S32 LLQueuedThread::updateQueue(U32 max_time_ms)
|
||||
S32 LLQueuedThread::updateQueue(F32 max_time_ms)
|
||||
{
|
||||
F64 max_time = (F64)max_time_ms * .001;
|
||||
LLTimer timer;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "llsimplehash.h"
|
||||
|
||||
//============================================================================
|
||||
// Note: ~LLQueuedThread is O(N) N=# of queued threads, assumed to be small
|
||||
// Note: ~LLQueuedThread is O(N) N=# of queued requests, assumed to be small
|
||||
// It is assumed that LLQueuedThreads are rarely created/destroyed.
|
||||
|
||||
class LL_COMMON_API LLQueuedThread : public LLThread
|
||||
@@ -178,8 +178,8 @@ protected:
|
||||
public:
|
||||
bool waitForResult(handle_t handle, bool auto_complete = true);
|
||||
|
||||
virtual S32 update(U32 max_time_ms);
|
||||
S32 updateQueue(U32 max_time_ms);
|
||||
virtual S32 update(F32 max_time_ms);
|
||||
S32 updateQueue(F32 max_time_ms);
|
||||
|
||||
void waitOnPending();
|
||||
void printQueueStats();
|
||||
|
||||
@@ -50,6 +50,16 @@ public:
|
||||
|
||||
const LLStrider<Object>& operator = (Object *first) { mObjectp = first; return *this;}
|
||||
void setStride (S32 skipBytes) { mSkip = (skipBytes ? skipBytes : sizeof(Object));}
|
||||
|
||||
LLStrider<Object> operator+(const S32& index)
|
||||
{
|
||||
LLStrider<Object> ret;
|
||||
ret.mBytep = mBytep + mSkip*index;
|
||||
ret.mSkip = mSkip;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//void setTypeSize (S32 typeBytes){ mTypeSize = (typeBytes ? typeBytes : sizeof(Object)); }
|
||||
|
||||
//bool isStrided() const { return mTypeSize != mSkip; }
|
||||
|
||||
@@ -737,6 +737,7 @@ std::string LLStringOps::sDayFormat;
|
||||
std::string LLStringOps::sAM;
|
||||
std::string LLStringOps::sPM;
|
||||
|
||||
|
||||
S32 LLStringOps::collate(const llwchar* a, const llwchar* b)
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
@@ -936,22 +937,24 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions);
|
||||
template<>
|
||||
void LLStringUtil::getTokens(const std::string& instr, std::vector<std::string >& tokens, const std::string& delims)
|
||||
{
|
||||
std::string currToken;
|
||||
std::string::size_type begIdx, endIdx;
|
||||
|
||||
begIdx = instr.find_first_not_of (delims);
|
||||
while (begIdx != std::string::npos)
|
||||
// Starting at offset 0, scan forward for the next non-delimiter. We're
|
||||
// done when the only characters left in 'instr' are delimiters.
|
||||
for (std::string::size_type begIdx, endIdx = 0;
|
||||
(begIdx = instr.find_first_not_of (delims, endIdx)) != std::string::npos; )
|
||||
{
|
||||
// Found a non-delimiter. After that, find the next delimiter.
|
||||
endIdx = instr.find_first_of (delims, begIdx);
|
||||
if (endIdx == std::string::npos)
|
||||
{
|
||||
// No more delimiters: this token extends to the end of the string.
|
||||
endIdx = instr.length();
|
||||
}
|
||||
|
||||
currToken = instr.substr(begIdx, endIdx - begIdx);
|
||||
// extract the token between begIdx and endIdx; substr() needs length
|
||||
std::string currToken(instr.substr(begIdx, endIdx - begIdx));
|
||||
LLStringUtil::trim (currToken);
|
||||
tokens.push_back(currToken);
|
||||
begIdx = instr.find_first_not_of (delims, endIdx);
|
||||
// next scan past delimiters starts at endIdx
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1401,7 +1404,7 @@ void LLStringUtilBase<T>::testHarness()
|
||||
|
||||
s2.erase( 4, 1 );
|
||||
llassert( s2 == "hell");
|
||||
s2.insert( 0, 'y' );
|
||||
s2.insert( 0, 1, 'y' );
|
||||
llassert( s2 == "yhell");
|
||||
s2.erase( 1, 3 );
|
||||
llassert( s2 == "yl");
|
||||
|
||||
@@ -833,11 +833,21 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
|
||||
src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */
|
||||
if (! src) goto err;
|
||||
|
||||
do
|
||||
while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE, src)) > 0)
|
||||
{
|
||||
bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE,src);
|
||||
gzwrite(dst, buffer, bytes);
|
||||
} while(feof(src) == 0);
|
||||
if (gzwrite(dst, buffer, bytes) <= 0)
|
||||
{
|
||||
llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (ferror(src))
|
||||
{
|
||||
llwarns << "Error reading " << srcfile << llendl;
|
||||
goto err;
|
||||
}
|
||||
|
||||
gzclose(dst);
|
||||
dst = NULL;
|
||||
#if LL_WINDOWS
|
||||
|
||||
@@ -67,6 +67,8 @@ U32 ll_thread_local local_thread_ID = 0;
|
||||
#endif
|
||||
|
||||
U32 LLThread::sIDIter = 0;
|
||||
LLAtomicS32 LLThread::sCount = 0;
|
||||
LLAtomicS32 LLThread::sRunning = 0;
|
||||
|
||||
LL_COMMON_API void assert_main_thread()
|
||||
{
|
||||
@@ -103,6 +105,11 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
|
||||
// the moment it happens... therefore make a copy here.
|
||||
char const* volatile name = threadp->mName.c_str();
|
||||
|
||||
// Always make sure that sRunning <= number of threads with status RUNNING,
|
||||
// so do this before changing mStatus (meaning that once we see that we
|
||||
// are STOPPED, then sRunning is also up to date).
|
||||
--sRunning;
|
||||
|
||||
// We're done with the run function, this thread is done executing now.
|
||||
threadp->mStatus = STOPPED;
|
||||
|
||||
@@ -113,6 +120,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
|
||||
// the critical area of the mSignal lock)].
|
||||
lldebugs << "LLThread::staticRun() Exiting: " << name << llendl;
|
||||
|
||||
--sRunning; // Would be better to do this after joining with the thread, but we don't join :/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -125,6 +133,8 @@ LLThread::LLThread(std::string const& name) :
|
||||
mThreadLocalData(NULL)
|
||||
{
|
||||
mID = ++sIDIter;
|
||||
sCount++;
|
||||
llassert(sCount <= 50);
|
||||
mRunCondition = new LLCondition;
|
||||
}
|
||||
|
||||
@@ -175,7 +185,7 @@ void LLThread::shutdown()
|
||||
}
|
||||
mAPRThreadp = NULL;
|
||||
}
|
||||
|
||||
--sCount;
|
||||
delete mRunCondition;
|
||||
mRunCondition = 0;
|
||||
}
|
||||
@@ -186,6 +196,7 @@ void LLThread::start()
|
||||
|
||||
// Set thread state to running
|
||||
mStatus = RUNNING;
|
||||
sRunning++;
|
||||
|
||||
apr_status_t status =
|
||||
apr_thread_create(&mAPRThreadp, NULL, staticRun, (void *)this, tldata().mRootPool());
|
||||
@@ -197,6 +208,7 @@ void LLThread::start()
|
||||
}
|
||||
else
|
||||
{
|
||||
--sRunning;
|
||||
mStatus = STOPPED;
|
||||
llwarns << "failed to start thread " << mName << llendl;
|
||||
ll_apr_warn_status(status);
|
||||
@@ -399,6 +411,15 @@ LLMutexBase::LLMutexBase() :
|
||||
{
|
||||
}
|
||||
|
||||
bool LLMutexBase::isSelfLocked() const
|
||||
{
|
||||
#if LL_DARWIN
|
||||
return mLockingThread == LLThread::currentID();
|
||||
#else
|
||||
return mLockingThread == local_thread_ID;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLMutexBase::lock()
|
||||
{
|
||||
#if LL_DARWIN
|
||||
@@ -432,28 +453,6 @@ void LLMutexBase::unlock()
|
||||
apr_thread_mutex_unlock(mAPRMutexp);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//static
|
||||
LLMutex* LLThreadSafeRefCount::sMutex = 0;
|
||||
|
||||
//static
|
||||
void LLThreadSafeRefCount::initThreadSafeRefCount()
|
||||
{
|
||||
if (!sMutex)
|
||||
{
|
||||
sMutex = new LLMutex;
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLThreadSafeRefCount::cleanupThreadSafeRefCount()
|
||||
{
|
||||
delete sMutex;
|
||||
sMutex = NULL;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LLThreadSafeRefCount::LLThreadSafeRefCount() :
|
||||
|
||||
@@ -38,9 +38,13 @@
|
||||
#include "llmemory.h"
|
||||
#include "apr_thread_cond.h"
|
||||
#include "llaprpool.h"
|
||||
#include "llatomic.h"
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
extern LL_COMMON_API bool is_main_thread(void);
|
||||
#define ASSERT_SINGLE_THREAD do { static apr_os_thread_t first_thread_id = apr_os_thread_current(); llassert(apr_os_thread_equal(first_thread_id, apr_os_thread_current())); } while(0)
|
||||
#else
|
||||
#define ASSERT_SINGLE_THREAD do { } while(0)
|
||||
#endif
|
||||
|
||||
class LLThread;
|
||||
@@ -73,6 +77,8 @@ class LL_COMMON_API LLThread
|
||||
{
|
||||
private:
|
||||
static U32 sIDIter;
|
||||
static LLAtomicS32 sCount;
|
||||
static LLAtomicS32 sRunning;
|
||||
|
||||
public:
|
||||
typedef enum e_thread_status
|
||||
@@ -90,6 +96,8 @@ public:
|
||||
bool isStopped() const { return (STOPPED == mStatus); }
|
||||
|
||||
static U32 currentID(); // Return ID of current thread
|
||||
static S32 getCount() { return sCount; }
|
||||
static S32 getRunning() { return sRunning; }
|
||||
static void yield(); // Static because it can be called by the main thread, which doesn't have an LLThread data structure.
|
||||
|
||||
public:
|
||||
@@ -179,13 +187,17 @@ public:
|
||||
|
||||
LLMutexBase() ;
|
||||
|
||||
void lock(); //blocks
|
||||
void lock(); // blocks
|
||||
void unlock();
|
||||
// Returns true if lock was obtained successfully.
|
||||
bool tryLock() { return !APR_STATUS_IS_EBUSY(apr_thread_mutex_trylock(mAPRMutexp)); }
|
||||
|
||||
// non-blocking, but does do a lock/unlock so not free
|
||||
bool isLocked() { bool is_not_locked = tryLock(); if (is_not_locked) unlock(); return !is_not_locked; }
|
||||
|
||||
// Returns true if locked by this thread.
|
||||
bool isSelfLocked() const;
|
||||
|
||||
// get ID of locking thread
|
||||
U32 lockingThread() const { return mLockingThread; }
|
||||
|
||||
@@ -267,11 +279,11 @@ public:
|
||||
LLMutexLock(LLMutexBase* mutex)
|
||||
{
|
||||
mMutex = mutex;
|
||||
mMutex->lock();
|
||||
if(mMutex) mMutex->lock();
|
||||
}
|
||||
~LLMutexLock()
|
||||
{
|
||||
mMutex->unlock();
|
||||
if(mMutex) mMutex->unlock();
|
||||
}
|
||||
private:
|
||||
LLMutexBase* mMutex;
|
||||
@@ -370,6 +382,16 @@ public:
|
||||
mNoHoldersCondition.signal(); // Tell waiting readers, see [5].
|
||||
mNoHoldersCondition.unlock(); // Release lock on mHoldersCount.
|
||||
}
|
||||
#if LL_DEBUG
|
||||
// Really only intended for debugging purposes:
|
||||
bool isLocked(void)
|
||||
{
|
||||
mNoHoldersCondition.lock();
|
||||
bool res = mHoldersCount;
|
||||
mNoHoldersCondition.unlock();
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
@@ -391,13 +413,6 @@ void LLThread::unlockData()
|
||||
|
||||
class LL_COMMON_API LLThreadSafeRefCount
|
||||
{
|
||||
public:
|
||||
static void initThreadSafeRefCount(); // creates sMutex
|
||||
static void cleanupThreadSafeRefCount(); // destroys sMutex
|
||||
|
||||
private:
|
||||
static LLMutex* sMutex;
|
||||
|
||||
private:
|
||||
LLThreadSafeRefCount(const LLThreadSafeRefCount&); // not implemented
|
||||
LLThreadSafeRefCount&operator=(const LLThreadSafeRefCount&); // not implemented
|
||||
@@ -410,23 +425,12 @@ public:
|
||||
|
||||
void ref()
|
||||
{
|
||||
if (sMutex) sMutex->lock();
|
||||
mRef++;
|
||||
if (sMutex) sMutex->unlock();
|
||||
}
|
||||
|
||||
S32 unref()
|
||||
void unref()
|
||||
{
|
||||
llassert(mRef >= 1);
|
||||
if (sMutex) sMutex->lock();
|
||||
S32 res = --mRef;
|
||||
if (sMutex) sMutex->unlock();
|
||||
if (0 == res)
|
||||
{
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
return res;
|
||||
if (!--mRef) delete this;
|
||||
}
|
||||
S32 getNumRefs() const
|
||||
{
|
||||
@@ -434,7 +438,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
S32 mRef;
|
||||
LLAtomicS32 mRef;
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
|
||||
@@ -82,7 +82,7 @@ void LLWorkerThread::clearDeleteList()
|
||||
}
|
||||
|
||||
// virtual
|
||||
S32 LLWorkerThread::update(U32 max_time_ms)
|
||||
S32 LLWorkerThread::update(F32 max_time_ms)
|
||||
{
|
||||
S32 res = LLQueuedThread::update(max_time_ms);
|
||||
// Delete scheduled workers
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false);
|
||||
~LLWorkerThread();
|
||||
|
||||
/*virtual*/ S32 update(U32 max_time_ms);
|
||||
/*virtual*/ S32 update(F32 max_time_ms);
|
||||
|
||||
handle_t addWorkRequest(LLWorkerClass* workerclass, S32 param, U32 priority = PRIORITY_NORMAL);
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ U8* LLImageBase::allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 si
|
||||
// LLImageRaw
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
AITHREADSAFESIMPLE(S32, LLImageRaw::sGlobalRawMemory, );
|
||||
AIThreadSafeSimpleDC<S32> LLImageRaw::sGlobalRawMemory;
|
||||
S32 LLImageRaw::sRawImageCount = 0;
|
||||
S32 LLImageRaw::sRawImageCachedCount = 0;
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ protected:
|
||||
void setDataAndSize(U8 *data, S32 width, S32 height, S8 components) ;
|
||||
|
||||
public:
|
||||
static AIThreadSafeSimple<S32> sGlobalRawMemory;
|
||||
static AIThreadSafeSimpleDC<S32> sGlobalRawMemory;
|
||||
static S32 sRawImageCount;
|
||||
|
||||
static S32 sRawImageCachedCount;
|
||||
|
||||
@@ -1,37 +1,32 @@
|
||||
/**
|
||||
* @file llimagedxt.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llimagedxt.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
//static
|
||||
void LLImageDXT::checkMinWidthHeight(EFileFormat format, S32& width, S32& height)
|
||||
|
||||
@@ -366,6 +366,9 @@ S32 LLImageJ2C::calcHeaderSizeJ2C()
|
||||
//static
|
||||
S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate)
|
||||
{
|
||||
// Note: this only provides an *estimate* of the size in bytes of an image level
|
||||
// *TODO: find a way to read the true size (when available) and convey the fact
|
||||
// that the result is an estimate in the other cases
|
||||
if (rate <= 0.f) rate = .125f;
|
||||
while (discard_level > 0)
|
||||
{
|
||||
@@ -376,7 +379,7 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
|
||||
discard_level--;
|
||||
}
|
||||
S32 bytes = (S32)((F32)(w*h*comp)*rate);
|
||||
//bytes = llmax(bytes, calcHeaderSizeJ2C());
|
||||
bytes = llmax(bytes, calcHeaderSizeJ2C());
|
||||
return bytes;
|
||||
}
|
||||
|
||||
@@ -392,15 +395,7 @@ S32 LLImageJ2C::calcDataSize(S32 discard_level)
|
||||
static const LLCachedControl<bool> legacy_size("SianaLegacyJ2CSize", false);
|
||||
|
||||
if (legacy_size) {
|
||||
static const LLCachedControl<F32> exponent("SianaJ2CSizeExponent", 1.0f);
|
||||
static const LLCachedControl<S32> offset("SianaJ2CSizeOffset", 0);
|
||||
|
||||
S32 size = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), discard_level, mRate);
|
||||
S32 size_d0 = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), 0, mRate);
|
||||
llassert_always(size_d0);
|
||||
S32 bytes = pow(size/size_d0, exponent)*size_d0 + offset;
|
||||
bytes = llmax(bytes, calcHeaderSizeJ2C());
|
||||
return bytes;
|
||||
return calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), discard_level, mRate);
|
||||
}
|
||||
|
||||
discard_level = llclamp(discard_level, 0, MAX_DISCARD_LEVEL);
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llimagepng.cpp
|
||||
* @brief LLImageFormatted glue to encode / decode PNG files.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -66,6 +60,12 @@ BOOL LLImagePNG::updateData()
|
||||
|
||||
// Decode the PNG data and extract sizing information
|
||||
LLPngWrapper pngWrapper;
|
||||
if (!pngWrapper.isValidPng(getData()))
|
||||
{
|
||||
setLastError("LLImagePNG data does not have a valid PNG header!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LLPngWrapper::ImageInfo infop;
|
||||
if (! pngWrapper.readPng(getData(), NULL, &infop))
|
||||
{
|
||||
@@ -96,6 +96,12 @@ BOOL LLImagePNG::decode(LLImageRaw* raw_image, F32 decode_time)
|
||||
|
||||
// Decode the PNG data into the raw image
|
||||
LLPngWrapper pngWrapper;
|
||||
if (!pngWrapper.isValidPng(getData()))
|
||||
{
|
||||
setLastError("LLImagePNG data does not have a valid PNG header!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (! pngWrapper.readPng(getData(), raw_image))
|
||||
{
|
||||
setLastError(pngWrapper.getErrorMessage());
|
||||
|
||||
@@ -1,40 +1,36 @@
|
||||
/**
|
||||
* @file llimagetga.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "lldir.h"
|
||||
#include "llimagetga.h"
|
||||
|
||||
#include "lldir.h"
|
||||
#include "llerror.h"
|
||||
#include "llmath.h"
|
||||
#include "llpointer.h"
|
||||
|
||||
// For expanding 5-bit pixel values to 8-bit with best rounding
|
||||
// static
|
||||
|
||||
@@ -50,7 +50,7 @@ LLImageDecodeThread::~LLImageDecodeThread()
|
||||
|
||||
// MAIN THREAD
|
||||
// virtual
|
||||
S32 LLImageDecodeThread::update(U32 max_time_ms)
|
||||
S32 LLImageDecodeThread::update(F32 max_time_ms)
|
||||
{
|
||||
LLMutexLock lock(&mCreationMutex);
|
||||
for (creation_list_t::iterator iter = mCreationList.begin();
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
handle_t decodeImage(LLImageFormatted* image,
|
||||
U32 priority, S32 discard, BOOL needs_aux,
|
||||
Responder* responder);
|
||||
S32 update(U32 max_time_ms);
|
||||
S32 update(F32 max_time_ms);
|
||||
|
||||
// Used by unit tests to check the consistency of the thread instance
|
||||
S32 tut_size();
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llimagej2coj.cpp
|
||||
* @brief This is an implementation of JPEG2000 encode/decode using OpenJPEG.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2006-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -37,7 +31,7 @@
|
||||
#include "openjpeg.h"
|
||||
|
||||
#include "lltimer.h"
|
||||
#include "llmemory.h"
|
||||
//#include "llmemory.h"
|
||||
|
||||
const char* fallbackEngineInfoLLImageJ2CImpl()
|
||||
{
|
||||
@@ -96,8 +90,15 @@ void info_callback(const char* msg, void*)
|
||||
lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
|
||||
}
|
||||
|
||||
// Divide a by 2 to the power of b and round upwards
|
||||
int ceildivpow2(int a, int b)
|
||||
{
|
||||
return (a + (1 << b) - 1) >> b;
|
||||
}
|
||||
|
||||
LLImageJ2COJ::LLImageJ2COJ() : LLImageJ2CImpl()
|
||||
|
||||
LLImageJ2COJ::LLImageJ2COJ()
|
||||
: LLImageJ2CImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -149,7 +150,19 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
opj_setup_decoder(dinfo, ¶meters);
|
||||
|
||||
/* open a byte stream */
|
||||
#if 0
|
||||
std::vector<U8> data(base.getData(), base.getData()+base.getDataSize());
|
||||
S32 size = data.size();
|
||||
if (data[size-1] == 0xFF) {
|
||||
data.push_back((U8)0xD9);
|
||||
} else if (data[size-2] != 0xFF || data[size-1] != 0xD9) {
|
||||
data.push_back((U8)0xFF);
|
||||
data.push_back((U8)0xD9);
|
||||
}
|
||||
cio = opj_cio_open((opj_common_ptr)dinfo, &data[0], data.size());
|
||||
#else
|
||||
cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize());
|
||||
#endif
|
||||
|
||||
/* decode the stream and fill the image structure */
|
||||
image = opj_decode(dinfo, cio);
|
||||
@@ -168,7 +181,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
// dereference the array.
|
||||
if(!image || !image->numcomps)
|
||||
{
|
||||
llwarns << "failed to decode image!" << llendl;
|
||||
LL_WARNS("Texture") << "ERROR -> decodeImpl: failed to decode image!" << LL_ENDL;
|
||||
if (image)
|
||||
{
|
||||
opj_image_destroy(image);
|
||||
@@ -183,7 +196,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
{
|
||||
if (image->comps[i].factor != base.getRawDiscardLevel())
|
||||
{
|
||||
llwarns << "Expected discard level not reached!" << llendl;
|
||||
LL_WARNS("Texture") << "Expected discard level not reached!" << llendl;
|
||||
// if we didn't get the discard level we're expecting, fail
|
||||
opj_image_destroy(image);
|
||||
base.decodeFailed();
|
||||
@@ -244,7 +257,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
}
|
||||
else // Some rare OpenJPEG versions have this bug.
|
||||
{
|
||||
llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl;
|
||||
LL_WARNS("Texture") << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl;
|
||||
opj_image_destroy(image);
|
||||
|
||||
base.decodeFailed();
|
||||
@@ -379,7 +392,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
|
||||
if (!bSuccess)
|
||||
{
|
||||
opj_cio_close(cio);
|
||||
llinfos << "Failed to encode image." << llendl;
|
||||
LL_WARNS("Texture") << "Failed to encode image." << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
codestream_length = cio_tell(cio);
|
||||
|
||||
@@ -45,9 +45,8 @@
|
||||
#include "llsdutil.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// exported functions
|
||||
/// Exported functions
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
static const std::string INV_ITEM_ID_LABEL("item_id");
|
||||
static const std::string INV_FOLDER_ID_LABEL("folder_id");
|
||||
static const std::string INV_PARENT_ID_LABEL("parent_id");
|
||||
@@ -423,7 +422,7 @@ U32 LLInventoryItem::getCRC32() const
|
||||
//lldebugs << "7 crc: " << std::hex << crc << std::dec << llendl;
|
||||
crc += mSaleInfo.getCRC32();
|
||||
//lldebugs << "8 crc: " << std::hex << crc << std::dec << llendl;
|
||||
crc += mCreationDate;
|
||||
crc += (U32)mCreationDate;
|
||||
//lldebugs << "9 crc: " << std::hex << crc << std::dec << llendl;
|
||||
return crc;
|
||||
}
|
||||
@@ -539,7 +538,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const
|
||||
mSaleInfo.packMessage(msg);
|
||||
msg->addStringFast(_PREHASH_Name, mName);
|
||||
msg->addStringFast(_PREHASH_Description, mDescription);
|
||||
msg->addS32Fast(_PREHASH_CreationDate, mCreationDate);
|
||||
msg->addS32Fast(_PREHASH_CreationDate, (S32)mCreationDate);
|
||||
U32 crc = getCRC32();
|
||||
msg->addU32Fast(_PREHASH_CRC, crc);
|
||||
}
|
||||
@@ -1199,109 +1198,8 @@ fail:
|
||||
|
||||
}
|
||||
|
||||
LLXMLNode *LLInventoryItem::exportFileXML(BOOL include_asset_key) const
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_INVENTORY);
|
||||
LLXMLNode *ret = new LLXMLNode("item", FALSE);
|
||||
|
||||
ret->createChild("uuid", TRUE)->setUUIDValue(1, &mUUID);
|
||||
ret->createChild("parent_uuid", TRUE)->setUUIDValue(1, &mParentUUID);
|
||||
|
||||
mPermissions.exportFileXML()->setParent(ret);
|
||||
|
||||
// Check for permissions to see the asset id, and if so write it
|
||||
// out as an asset id. Otherwise, apply our cheesy encryption.
|
||||
if(include_asset_key)
|
||||
{
|
||||
U32 mask = mPermissions.getMaskBase();
|
||||
if(((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
|
||||
|| (mAssetUUID.isNull()))
|
||||
{
|
||||
ret->createChild("asset_id", FALSE)->setUUIDValue(1, &mAssetUUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUUID shadow_id(mAssetUUID);
|
||||
LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
|
||||
cipher.encrypt(shadow_id.mData, UUID_BYTES);
|
||||
|
||||
ret->createChild("shadow_id", FALSE)->setUUIDValue(1, &shadow_id);
|
||||
}
|
||||
}
|
||||
|
||||
std::string type_str = LLAssetType::lookup(mType);
|
||||
std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
|
||||
ret->createChild("asset_type", FALSE)->setStringValue(type_str);
|
||||
ret->createChild("inventory_type", FALSE)->setStringValue(inv_type_str);
|
||||
S32 tmp_flags = (S32) mFlags;
|
||||
ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX);
|
||||
|
||||
mSaleInfo.exportFileXML()->setParent(ret);
|
||||
|
||||
std::string temp;
|
||||
temp.assign(mName);
|
||||
ret->createChild("name", FALSE)->setStringValue(temp);
|
||||
temp.assign(mDescription);
|
||||
ret->createChild("description", FALSE)->setStringValue(temp);
|
||||
S32 date = mCreationDate;
|
||||
ret->createChild("creation_date", FALSE)->setIntValue(1, &date);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL LLInventoryItem::importXML(LLXMLNode* node)
|
||||
{
|
||||
BOOL success = FALSE;
|
||||
if (node)
|
||||
{
|
||||
success = TRUE;
|
||||
LLXMLNodePtr sub_node;
|
||||
if (node->getChild("uuid", sub_node))
|
||||
success = (1 == sub_node->getUUIDValue(1, &mUUID));
|
||||
if (node->getChild("parent_uuid", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mParentUUID));
|
||||
if (node->getChild("permissions", sub_node))
|
||||
success = success && mPermissions.importXML(sub_node);
|
||||
if (node->getChild("asset_id", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
|
||||
if (node->getChild("shadow_id", sub_node))
|
||||
{
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
|
||||
LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
|
||||
cipher.decrypt(mAssetUUID.mData, UUID_BYTES);
|
||||
}
|
||||
if (node->getChild("asset_type", sub_node))
|
||||
mType = LLAssetType::lookup(sub_node->getValue());
|
||||
if (node->getChild("inventory_type", sub_node))
|
||||
mInventoryType = LLInventoryType::lookup(sub_node->getValue());
|
||||
if (node->getChild("flags", sub_node))
|
||||
{
|
||||
S32 tmp_flags = 0;
|
||||
success = success && (1 == sub_node->getIntValue(1, &tmp_flags));
|
||||
mFlags = (U32) tmp_flags;
|
||||
}
|
||||
if (node->getChild("sale_info", sub_node))
|
||||
success = success && mSaleInfo.importXML(sub_node);
|
||||
if (node->getChild("name", sub_node))
|
||||
mName = sub_node->getValue();
|
||||
if (node->getChild("description", sub_node))
|
||||
mDescription = sub_node->getValue();
|
||||
if (node->getChild("creation_date", sub_node))
|
||||
{
|
||||
S32 date = 0;
|
||||
success = success && (1 == sub_node->getIntValue(1, &date));
|
||||
mCreationDate = date;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
lldebugs << "LLInventory::importXML() failed for node named '"
|
||||
<< node->getName() << "'" << llendl;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
// Deleted LLInventoryItem::exportFileXML() and LLInventoryItem::importXML()
|
||||
// because I can't find any non-test code references to it. 2009-05-04 JC
|
||||
|
||||
S32 LLInventoryItem::packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override) const
|
||||
{
|
||||
|
||||
@@ -214,15 +214,11 @@ public:
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
|
||||
BOOL importXML(LLXMLNode* node);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// Pack all information needed to reconstruct this item into the given binary bucket.
|
||||
|
||||
S32 packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override = NULL) const;
|
||||
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
|
||||
LLSD asLLSD() const;
|
||||
@@ -249,7 +245,6 @@ protected:
|
||||
// items. Users come with a set of default categories, and can create
|
||||
// new ones as needed.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLInventoryCategory : public LLInventoryObject
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -200,8 +200,6 @@ void LLParcel::init(const LLUUID &owner_id,
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
mMediaURLFilterEnable = FALSE;
|
||||
mMediaURLFilterList = LLSD::emptyArray();
|
||||
mMediaAllowNavigate = TRUE;
|
||||
mMediaURLTimeout = 0.0f;
|
||||
mMediaPreventCameraZoom = FALSE;
|
||||
@@ -343,38 +341,6 @@ void LLParcel::setMediaURLResetTimer(F32 time)
|
||||
mMediaResetTimer.setTimerExpirySec(time);
|
||||
}
|
||||
|
||||
void LLParcel::setMediaURLFilterList(LLSD list)
|
||||
{
|
||||
// sanity check LLSD
|
||||
// must be array of strings
|
||||
if (!list.isArray())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (S32 i = 0; i < list.size(); i++)
|
||||
{
|
||||
if (!list[i].isString())
|
||||
return;
|
||||
}
|
||||
|
||||
// can't be too big
|
||||
const S32 MAX_SIZE = 50;
|
||||
if (list.size() > MAX_SIZE)
|
||||
{
|
||||
LLSD new_list = LLSD::emptyArray();
|
||||
|
||||
for (S32 i = 0; i < llmin(list.size(), MAX_SIZE); i++)
|
||||
{
|
||||
new_list.append(list[i]);
|
||||
}
|
||||
|
||||
list = new_list;
|
||||
}
|
||||
|
||||
mMediaURLFilterList = list;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLParcel::setLocalID(S32 local_id)
|
||||
{
|
||||
@@ -629,34 +595,6 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
|
||||
return input_stream.good();
|
||||
}
|
||||
|
||||
BOOL LLParcel::importMediaURLFilter(std::istream& input_stream, std::string& url)
|
||||
{
|
||||
skip_to_end_of_next_keyword("{", input_stream);
|
||||
|
||||
while(input_stream.good())
|
||||
{
|
||||
skip_comments_and_emptyspace(input_stream);
|
||||
std::string line, keyword, value;
|
||||
get_line(line, input_stream, MAX_STRING);
|
||||
get_keyword_and_value(keyword, value, line);
|
||||
|
||||
if ("}" == keyword)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ("url" == keyword)
|
||||
{
|
||||
url = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unknown keyword in parcel media url filter section: <"
|
||||
<< keyword << ">" << llendl;
|
||||
}
|
||||
}
|
||||
return input_stream.good();
|
||||
}
|
||||
|
||||
// Assumes we are in a block "ParcelData"
|
||||
void LLParcel::packMessage(LLMessageSystem* msg)
|
||||
{
|
||||
@@ -703,8 +641,6 @@ void LLParcel::packMessage(LLSD& msg)
|
||||
msg["media_allow_navigate"] = getMediaAllowNavigate();
|
||||
msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
|
||||
msg["media_url_timeout"] = getMediaURLTimeout();
|
||||
msg["media_url_filter_enable"] = getMediaURLFilterEnable();
|
||||
msg["media_url_filter_list"] = getMediaURLFilterList();
|
||||
msg["group_id"] = getGroupID();
|
||||
msg["pass_price"] = mPassPrice;
|
||||
msg["pass_hours"] = mPassHours;
|
||||
@@ -795,7 +731,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
|
||||
msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer);
|
||||
setMediaCurrentURL(buffer);
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate );
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaURLFilterEnable", mMediaURLFilterEnable );
|
||||
msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom );
|
||||
msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout);
|
||||
}
|
||||
@@ -1256,8 +1191,6 @@ void LLParcel::clearParcel()
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
setMediaURLFilterList(LLSD::emptyArray());
|
||||
setMediaURLFilterEnable(FALSE);
|
||||
setMediaAllowNavigate(TRUE);
|
||||
setMediaPreventCameraZoom(FALSE);
|
||||
setMediaURLTimeout(0.0f);
|
||||
|
||||
@@ -253,8 +253,6 @@ public:
|
||||
void setMediaWidth(S32 width);
|
||||
void setMediaHeight(S32 height);
|
||||
void setMediaCurrentURL(const std::string& url);
|
||||
void setMediaURLFilterEnable(U8 enable) { mMediaURLFilterEnable = enable; }
|
||||
void setMediaURLFilterList(LLSD list);
|
||||
void setMediaAllowNavigate(U8 enable) { mMediaAllowNavigate = enable; }
|
||||
void setMediaURLTimeout(F32 timeout) { mMediaURLTimeout = timeout; }
|
||||
void setMediaPreventCameraZoom(U8 enable) { mMediaPreventCameraZoom = enable; }
|
||||
@@ -317,7 +315,6 @@ public:
|
||||
// BOOL importStream(std::istream& input_stream);
|
||||
BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
|
||||
// BOOL exportStream(std::ostream& output_stream);
|
||||
BOOL importMediaURLFilter(std::istream& input_stream, std::string& url);
|
||||
|
||||
void packMessage(LLMessageSystem* msg);
|
||||
void packMessage(LLSD& msg);
|
||||
@@ -360,8 +357,6 @@ public:
|
||||
U8 getMediaAutoScale() const { return mMediaAutoScale; }
|
||||
U8 getMediaLoop() const { return mMediaLoop; }
|
||||
const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
|
||||
U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; }
|
||||
LLSD getMediaURLFilterList() const { return mMediaURLFilterList; }
|
||||
U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; }
|
||||
F32 getMediaURLTimeout() const { return mMediaURLTimeout; }
|
||||
U8 getMediaPreventCameraZoom() const { return mMediaPreventCameraZoom; }
|
||||
@@ -657,8 +652,6 @@ protected:
|
||||
U8 mMediaLoop;
|
||||
std::string mMediaCurrentURL;
|
||||
LLUUID mMediaID;
|
||||
U8 mMediaURLFilterEnable;
|
||||
LLSD mMediaURLFilterList;
|
||||
U8 mMediaAllowNavigate;
|
||||
U8 mMediaPreventCameraZoom;
|
||||
F32 mMediaURLTimeout;
|
||||
|
||||
@@ -853,67 +853,8 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
LLXMLNode *LLPermissions::exportFileXML() const
|
||||
{
|
||||
LLXMLNode *ret = new LLXMLNode("permissions", FALSE);
|
||||
|
||||
ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);
|
||||
|
||||
ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
|
||||
ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
|
||||
ret->createChild("group_mask", FALSE)->setByteValue(4, (U8*)&mMaskGroup, LLXMLNode::ENCODING_HEX);
|
||||
ret->createChild("everyone_mask", FALSE)->setByteValue(4, (U8*)&mMaskEveryone, LLXMLNode::ENCODING_HEX);
|
||||
ret->createChild("next_owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskNextOwner, LLXMLNode::ENCODING_HEX);
|
||||
|
||||
ret->createChild("creator_id", FALSE)->setUUIDValue(1, &mCreator);
|
||||
ret->createChild("owner_id", FALSE)->setUUIDValue(1, &mOwner);
|
||||
ret->createChild("last_owner_id", FALSE)->setUUIDValue(1, &mLastOwner);
|
||||
ret->createChild("group_id", FALSE)->setUUIDValue(1, &mGroup);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool LLPermissions::importXML(LLXMLNode* node)
|
||||
{
|
||||
bool success = false;
|
||||
if (node)
|
||||
{
|
||||
success = true;
|
||||
LLXMLNodePtr sub_node;
|
||||
if (node->getChild("base_mask", sub_node))
|
||||
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskBase));
|
||||
if (node->getChild("owner_mask", sub_node))
|
||||
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskOwner));
|
||||
if (node->getChild("group_mask", sub_node))
|
||||
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskGroup));
|
||||
if (node->getChild("everyone_mask", sub_node))
|
||||
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskEveryone));
|
||||
if (node->getChild("next_owner_mask", sub_node))
|
||||
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskNextOwner));
|
||||
|
||||
if (node->getChild("creator_id", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mCreator));
|
||||
if (node->getChild("owner_id", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mOwner));
|
||||
if (node->getChild("last_owner_id", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mLastOwner));
|
||||
if (node->getChild("group_id", sub_node))
|
||||
success = success && (1 == sub_node->getUUIDValue(1, &mGroup));
|
||||
if (node->getChild("group_owned", sub_node))
|
||||
{
|
||||
BOOL tmpbool = FALSE;
|
||||
success = success && (1 == sub_node->getBoolValue(1, &tmpbool));
|
||||
mIsGroupOwned = (bool)tmpbool;
|
||||
}
|
||||
if (!success)
|
||||
{
|
||||
lldebugs << "LLPermissions::importXML() failed for node named '"
|
||||
<< node->getName() << "'" << llendl;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
|
||||
// because I can't find any non-test code references to it. 2009-05-04 JC
|
||||
|
||||
bool LLPermissions::operator==(const LLPermissions &rhs) const
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
const LLUUID& getGroup() const { return mGroup; }
|
||||
|
||||
// return the agent_id of the last agent owner. Only returns
|
||||
// LLUUID::null if there has never been a previous owner.
|
||||
// LLUUID::null if there has never been a previous owner (*note: this is apparently not true, say for textures in inventory, it may return LLUUID::null even if there was a previous owner).
|
||||
const LLUUID& getLastOwner() const { return mLastOwner; }
|
||||
|
||||
U32 getMaskBase() const { return mMaskBase; }
|
||||
@@ -235,6 +235,7 @@ public:
|
||||
// Last owner doesn't have much in the way of permissions so it's
|
||||
//not too dangerous to do this.
|
||||
void setLastOwner(const LLUUID& last_owner);
|
||||
|
||||
// saves last owner, sets owner to uuid null, sets group
|
||||
// owned. group_id must be the group of the object (that's who it
|
||||
// is being deeded to) and the object must be group
|
||||
@@ -324,9 +325,6 @@ public:
|
||||
BOOL importLegacyStream(std::istream& input_stream);
|
||||
BOOL exportLegacyStream(std::ostream& output_stream) const;
|
||||
|
||||
LLXMLNode *exportFileXML() const;
|
||||
bool importXML(LLXMLNode* node);
|
||||
|
||||
bool operator==(const LLPermissions &rhs) const;
|
||||
bool operator!=(const LLPermissions &rhs) const;
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include <iostream>
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llsaleinfo.h"
|
||||
|
||||
@@ -135,38 +135,8 @@ bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
return true;
|
||||
}
|
||||
|
||||
LLXMLNode *LLSaleInfo::exportFileXML() const
|
||||
{
|
||||
LLXMLNode *ret = new LLXMLNode("sale_info", FALSE);
|
||||
std::string type_str = ll_safe_string( lookup(mSaleType));
|
||||
ret->createChild("type", TRUE)->setStringValue(1, &type_str);
|
||||
ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice);
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL LLSaleInfo::importXML(LLXMLNode* node)
|
||||
{
|
||||
BOOL success = FALSE;
|
||||
if (node)
|
||||
{
|
||||
success = TRUE;
|
||||
LLXMLNodePtr sub_node;
|
||||
if (node->getChild("type", sub_node))
|
||||
{
|
||||
mSaleType = lookup(sub_node->getValue().c_str());
|
||||
}
|
||||
if (node->getChild("price", sub_node))
|
||||
{
|
||||
success &= (1 == sub_node->getIntValue(1, &mSalePrice));
|
||||
}
|
||||
if (!success)
|
||||
{
|
||||
lldebugs << "LLSaleInfo::importXML() failed for node named '"
|
||||
<< node->getName() << "'" << llendl;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
// Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML()
|
||||
// because I can't find any non-test code references to it. 2009-05-04 JC
|
||||
|
||||
BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask)
|
||||
{
|
||||
|
||||
@@ -101,9 +101,6 @@ public:
|
||||
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
|
||||
|
||||
LLXMLNode *exportFileXML() const;
|
||||
BOOL importXML(LLXMLNode* node);
|
||||
|
||||
LLSD packMessage() const;
|
||||
void unpackMessage(LLSD sales);
|
||||
|
||||
|
||||
@@ -1,9 +1,26 @@
|
||||
/*
|
||||
* LLCalcParser.h
|
||||
* SecondLife
|
||||
*
|
||||
* Created by Aimee Walton on 28/09/2008.
|
||||
* Copyright 2008 Aimee Walton.
|
||||
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2008, 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$
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -157,7 +174,7 @@ private:
|
||||
F32 _log(const F32& a) const { return log(a); }
|
||||
F32 _exp(const F32& a) const { return exp(a); }
|
||||
F32 _fabs(const F32& a) const { return fabs(a); }
|
||||
F32 _floor(const F32& a) const { return llfloor(a); }
|
||||
F32 _floor(const F32& a) const { return (F32)llfloor(a); }
|
||||
F32 _ceil(const F32& a) const { return llceil(a); }
|
||||
|
||||
F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
|
||||
|
||||
@@ -1,111 +1,112 @@
|
||||
/**
|
||||
* @file llcoord.h
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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 LL_LLCOORD_H
|
||||
#define LL_LLCOORD_H
|
||||
|
||||
// A two-dimensional pixel value
|
||||
class LLCoord
|
||||
template<typename> class LLCoord;
|
||||
struct LL_COORD_TYPE_GL;
|
||||
struct LL_COORD_TYPE_WINDOW;
|
||||
struct LL_COORD_TYPE_SCREEN;
|
||||
|
||||
typedef LLCoord<LL_COORD_TYPE_GL> LLCoordGL;
|
||||
typedef LLCoord<LL_COORD_TYPE_WINDOW> LLCoordWindow;
|
||||
typedef LLCoord<LL_COORD_TYPE_SCREEN> LLCoordScreen;
|
||||
|
||||
struct LLCoordCommon
|
||||
{
|
||||
public:
|
||||
LLCoordCommon(S32 x, S32 y) : mX(x), mY(y) {}
|
||||
LLCoordCommon() : mX(0), mY(0) {}
|
||||
S32 mX;
|
||||
S32 mY;
|
||||
};
|
||||
|
||||
// A two-dimensional pixel value
|
||||
template<typename COORD_FRAME>
|
||||
class LLCoord : protected COORD_FRAME
|
||||
{
|
||||
public:
|
||||
typedef LLCoord<COORD_FRAME> self_t;
|
||||
typename COORD_FRAME::value_t mX;
|
||||
typename COORD_FRAME::value_t mY;
|
||||
|
||||
LLCoord(): mX(0), mY(0)
|
||||
{}
|
||||
LLCoord(S32 x, S32 y): mX(x), mY(y)
|
||||
{}
|
||||
virtual ~LLCoord()
|
||||
LLCoord(typename COORD_FRAME::value_t x, typename COORD_FRAME::value_t y): mX(x), mY(y)
|
||||
{}
|
||||
|
||||
virtual void set(S32 x, S32 y) { mX = x; mY = y; }
|
||||
LLCoord(const LLCoordCommon& other)
|
||||
{
|
||||
COORD_FRAME::convertFromCommon(other);
|
||||
}
|
||||
|
||||
LLCoordCommon convert() const
|
||||
{
|
||||
return COORD_FRAME::convertToCommon();
|
||||
}
|
||||
|
||||
void set(typename COORD_FRAME::value_t x, typename COORD_FRAME::value_t y) { mX = x; mY = y;}
|
||||
bool operator==(const self_t& other) const { return mX == other.mX && mY == other.mY; }
|
||||
bool operator!=(const self_t& other) const { return !(*this == other); }
|
||||
|
||||
static const self_t& getTypedCoords(const COORD_FRAME& self) { return static_cast<const self_t&>(self); }
|
||||
static self_t& getTypedCoords(COORD_FRAME& self) { return static_cast<self_t&>(self); }
|
||||
};
|
||||
|
||||
|
||||
// GL coordinates start in the client region of a window,
|
||||
// with left, bottom = 0, 0
|
||||
class LLCoordGL : public LLCoord
|
||||
struct LL_COORD_TYPE_GL
|
||||
{
|
||||
public:
|
||||
LLCoordGL() : LLCoord()
|
||||
{}
|
||||
LLCoordGL(S32 x, S32 y) : LLCoord(x, y)
|
||||
{}
|
||||
bool operator==(const LLCoordGL& other) const { return mX == other.mX && mY == other.mY; }
|
||||
bool operator!=(const LLCoordGL& other) const { return !(*this == other); }
|
||||
typedef S32 value_t;
|
||||
|
||||
LLCoordCommon convertToCommon() const
|
||||
{
|
||||
const LLCoordGL& self = LLCoordGL::getTypedCoords(*this);
|
||||
return LLCoordCommon(self.mX, self.mY);
|
||||
}
|
||||
|
||||
void convertFromCommon(const LLCoordCommon& from)
|
||||
{
|
||||
LLCoordGL& self = LLCoordGL::getTypedCoords(*this);
|
||||
self.mX = from.mX;
|
||||
self.mY = from.mY;
|
||||
}
|
||||
};
|
||||
|
||||
//bool operator ==(const LLCoordGL& a, const LLCoordGL& b);
|
||||
|
||||
// Window coords include things like window borders,
|
||||
// menu regions, etc.
|
||||
class LLCoordWindow : public LLCoord
|
||||
struct LL_COORD_TYPE_WINDOW
|
||||
{
|
||||
public:
|
||||
LLCoordWindow() : LLCoord()
|
||||
{}
|
||||
LLCoordWindow(S32 x, S32 y) : LLCoord(x, y)
|
||||
{}
|
||||
bool operator==(const LLCoordWindow& other) const { return mX == other.mX && mY == other.mY; }
|
||||
bool operator!=(const LLCoordWindow& other) const { return !(*this == other); }
|
||||
typedef S32 value_t;
|
||||
|
||||
LLCoordCommon convertToCommon() const;
|
||||
void convertFromCommon(const LLCoordCommon& from);
|
||||
};
|
||||
|
||||
|
||||
// Screen coords start at left, top = 0, 0
|
||||
class LLCoordScreen : public LLCoord
|
||||
struct LL_COORD_TYPE_SCREEN
|
||||
{
|
||||
public:
|
||||
LLCoordScreen() : LLCoord()
|
||||
{}
|
||||
LLCoordScreen(S32 x, S32 y) : LLCoord(x, y)
|
||||
{}
|
||||
bool operator==(const LLCoordScreen& other) const { return mX == other.mX && mY == other.mY; }
|
||||
bool operator!=(const LLCoordScreen& other) const { return !(*this == other); }
|
||||
typedef S32 value_t;
|
||||
|
||||
LLCoordCommon convertToCommon() const;
|
||||
void convertFromCommon(const LLCoordCommon& from);
|
||||
};
|
||||
|
||||
class LLCoordFont : public LLCoord
|
||||
{
|
||||
public:
|
||||
F32 mZ;
|
||||
|
||||
LLCoordFont() : LLCoord(), mZ(0.f)
|
||||
{}
|
||||
LLCoordFont(S32 x, S32 y, F32 z = 0) : LLCoord(x,y), mZ(z)
|
||||
{}
|
||||
|
||||
void set(S32 x, S32 y) { LLCoord::set(x,y); mZ = 0.f; }
|
||||
void set(S32 x, S32 y, F32 z) { mX = x; mY = y; mZ = z; }
|
||||
bool operator==(const LLCoordFont& other) const { return mX == other.mX && mY == other.mY; }
|
||||
bool operator!=(const LLCoordFont& other) const { return !(*this == other); }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -91,7 +91,7 @@ const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
|
||||
const F32 FP_MAG_THRESHOLD = 0.0000001f;
|
||||
|
||||
// TODO: Replace with logic like is_approx_equal
|
||||
inline BOOL is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
|
||||
inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
|
||||
|
||||
// These functions work by interpreting sign+exp+mantissa as an unsigned
|
||||
// integer.
|
||||
@@ -117,13 +117,13 @@ inline BOOL is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f <
|
||||
// WARNING: Infinity is comparable with F32_MAX and negative
|
||||
// infinity is comparable with F32_MIN
|
||||
|
||||
inline BOOL is_approx_equal(F32 x, F32 y)
|
||||
inline bool is_approx_equal(F32 x, F32 y)
|
||||
{
|
||||
const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
|
||||
return (std::abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
|
||||
}
|
||||
|
||||
inline BOOL is_approx_equal(F64 x, F64 y)
|
||||
inline bool is_approx_equal(F64 x, F64 y)
|
||||
{
|
||||
const S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
|
||||
return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
|
||||
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
//is it here?
|
||||
if (isInside(data->getPositionGroup()))
|
||||
{
|
||||
if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) ||
|
||||
if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) ||
|
||||
(data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
|
||||
{ //it belongs here
|
||||
#if LL_OCTREE_PARANOIA_CHECK
|
||||
@@ -416,7 +416,7 @@ public:
|
||||
{ //we have data
|
||||
mData.erase(data);
|
||||
mElementCount = mData.size();
|
||||
notifyRemoval(data);
|
||||
this->notifyRemoval(data);
|
||||
checkAlive();
|
||||
return true;
|
||||
}
|
||||
@@ -454,7 +454,7 @@ public:
|
||||
{
|
||||
mData.erase(data);
|
||||
mElementCount = mData.size();
|
||||
notifyRemoval(data);
|
||||
this->notifyRemoval(data);
|
||||
llwarns << "FOUND!" << llendl;
|
||||
checkAlive();
|
||||
return;
|
||||
@@ -663,7 +663,7 @@ public:
|
||||
//(don't notify listeners of addition)
|
||||
for (U32 i = 0; i < child->getChildCount(); i++)
|
||||
{
|
||||
addChild(child->getChild(i), TRUE);
|
||||
this->addChild(child->getChild(i), TRUE);
|
||||
}
|
||||
|
||||
//destroy child
|
||||
@@ -707,10 +707,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup()))
|
||||
if (this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup()))
|
||||
{
|
||||
//we got it, just act like a branch
|
||||
oct_node* node = getNodeAt(data);
|
||||
oct_node* node = this->getNodeAt(data);
|
||||
if (node == this)
|
||||
{
|
||||
LLOctreeNode<T>::insert(data);
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
else if (this->getChildCount() == 0)
|
||||
{
|
||||
//first object being added, just wrap it up
|
||||
while (!(this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup())))
|
||||
while (!(this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup())))
|
||||
{
|
||||
LLVector4a center, size;
|
||||
center = this->getCenter();
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
while (!(this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup())))
|
||||
while (!(this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup())))
|
||||
{
|
||||
//the data is outside the root node, we need to grow
|
||||
LLVector4a center(this->getCenter());
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
|
||||
//clear our children and add the root copy
|
||||
this->clearChildren();
|
||||
addChild(newnode);
|
||||
this->addChild(newnode);
|
||||
}
|
||||
|
||||
//insert the data
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
/**
|
||||
|
||||
* @file llvolume.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -2102,7 +2097,7 @@ LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL ge
|
||||
|
||||
generate();
|
||||
|
||||
if (mParams.getSculptID().isNull() && mParams.getSculptType() == LL_SCULPT_TYPE_NONE || mParams.getSculptType() == LL_SCULPT_TYPE_MESH)
|
||||
if ((mParams.getSculptID().isNull() && mParams.getSculptType() == LL_SCULPT_TYPE_NONE) || mParams.getSculptType() == LL_SCULPT_TYPE_MESH)
|
||||
{
|
||||
createVolumeFaces();
|
||||
}
|
||||
@@ -2905,7 +2900,7 @@ F32 LLVolume::sculptGetSurfaceArea()
|
||||
// compute the area of the quad by taking the length of the cross product of the two triangles
|
||||
LLVector3 cross1 = (p1 - p2) % (p1 - p3);
|
||||
LLVector3 cross2 = (p4 - p2) % (p4 - p3);
|
||||
area += (cross1.magVec() + cross2.magVec()) / 2.0;
|
||||
area += (cross1.magVec() + cross2.magVec()) / 2.f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5896,7 +5891,7 @@ F32 find_vertex_score(LLVCacheVertexData& data)
|
||||
}
|
||||
|
||||
//bonus points for having low valence
|
||||
F32 valence_boost = powf(data.mActiveTriangles, -FindVertexScore_ValenceBoostPower);
|
||||
F32 valence_boost = powf((F32)data.mActiveTriangles, -FindVertexScore_ValenceBoostPower);
|
||||
score += FindVertexScore_ValenceBoostScale * valence_boost;
|
||||
|
||||
return score;
|
||||
|
||||
@@ -60,6 +60,7 @@ class LLVolumeTriangle;
|
||||
#include "llstrider.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llrefcount.h"
|
||||
#include "llpointer.h"
|
||||
#include "llfile.h"
|
||||
|
||||
//============================================================================
|
||||
@@ -926,6 +927,10 @@ public:
|
||||
LLVector2* mTexCoords;
|
||||
U16* mIndices;
|
||||
|
||||
//vertex buffer filled in by LLFace to cache this volume face geometry in vram
|
||||
// (declared as a LLPointer to LLRefCount to avoid dependency on LLVertexBuffer)
|
||||
mutable LLPointer<LLRefCount> mVertexBuffer;
|
||||
|
||||
std::vector<S32> mEdge;
|
||||
|
||||
//list of skin weights for rigged volumes
|
||||
|
||||
@@ -895,25 +895,25 @@ LLSD LLMatrix4::getValue() const
|
||||
|
||||
void LLMatrix4::setValue(const LLSD& data)
|
||||
{
|
||||
mMatrix[0][0] = data[0].asReal();
|
||||
mMatrix[0][1] = data[1].asReal();
|
||||
mMatrix[0][2] = data[2].asReal();
|
||||
mMatrix[0][3] = data[3].asReal();
|
||||
mMatrix[0][0] = (F32)data[0].asReal();
|
||||
mMatrix[0][1] = (F32)data[1].asReal();
|
||||
mMatrix[0][2] = (F32)data[2].asReal();
|
||||
mMatrix[0][3] = (F32)data[3].asReal();
|
||||
|
||||
mMatrix[1][0] = data[4].asReal();
|
||||
mMatrix[1][1] = data[5].asReal();
|
||||
mMatrix[1][2] = data[6].asReal();
|
||||
mMatrix[1][3] = data[7].asReal();
|
||||
mMatrix[1][0] = (F32)data[4].asReal();
|
||||
mMatrix[1][1] = (F32)data[5].asReal();
|
||||
mMatrix[1][2] = (F32)data[6].asReal();
|
||||
mMatrix[1][3] = (F32)data[7].asReal();
|
||||
|
||||
mMatrix[2][0] = data[8].asReal();
|
||||
mMatrix[2][1] = data[9].asReal();
|
||||
mMatrix[2][2] = data[10].asReal();
|
||||
mMatrix[2][3] = data[11].asReal();
|
||||
mMatrix[2][0] = (F32)data[8].asReal();
|
||||
mMatrix[2][1] = (F32)data[9].asReal();
|
||||
mMatrix[2][2] = (F32)data[10].asReal();
|
||||
mMatrix[2][3] = (F32)data[11].asReal();
|
||||
|
||||
mMatrix[3][0] = data[12].asReal();
|
||||
mMatrix[3][1] = data[13].asReal();
|
||||
mMatrix[3][2] = data[14].asReal();
|
||||
mMatrix[3][3] = data[15].asReal();
|
||||
mMatrix[3][0] = (F32)data[12].asReal();
|
||||
mMatrix[3][1] = (F32)data[13].asReal();
|
||||
mMatrix[3][2] = (F32)data[14].asReal();
|
||||
mMatrix[3][3] = (F32)data[15].asReal();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -704,9 +704,9 @@ BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color)
|
||||
{
|
||||
color->set(LLColor4::orange6);
|
||||
}
|
||||
else if ( "clear" == color_name )
|
||||
else if ( "clear" == color_name || "transparent" == color_name )
|
||||
{
|
||||
color->set(0.f, 0.f, 0.f, 0.f);
|
||||
color->set(LLColor4::transparent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7,8 +7,6 @@ include(LLCommon)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
include(LLAddBuildTest)
|
||||
include(Tut)
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -21,6 +19,7 @@ include_directories(
|
||||
|
||||
set(llmessage_SOURCE_FILES
|
||||
llares.cpp
|
||||
llareslistener.cpp
|
||||
llassetstorage.cpp
|
||||
llavatarnamecache.cpp
|
||||
llblowfishcipher.cpp
|
||||
@@ -35,7 +34,6 @@ set(llmessage_SOURCE_FILES
|
||||
lldispatcher.cpp
|
||||
llfiltersd2xmlrpc.cpp
|
||||
llhost.cpp
|
||||
llhttpassetstorage.cpp
|
||||
llhttpclient.cpp
|
||||
llhttpclientadapter.cpp
|
||||
llhttpnode.cpp
|
||||
@@ -49,7 +47,6 @@ set(llmessage_SOURCE_FILES
|
||||
llmail.cpp
|
||||
llmessagebuilder.cpp
|
||||
llmessageconfig.cpp
|
||||
llmessagelog.cpp
|
||||
llmessagereader.cpp
|
||||
llmessagetemplate.cpp
|
||||
llmessagetemplateparser.cpp
|
||||
@@ -61,6 +58,7 @@ set(llmessage_SOURCE_FILES
|
||||
llpacketbuffer.cpp
|
||||
llpacketring.cpp
|
||||
llpartdata.cpp
|
||||
llproxy.cpp
|
||||
llpumpio.cpp
|
||||
llregionpresenceverifier.cpp
|
||||
llsdappservices.cpp
|
||||
@@ -100,7 +98,6 @@ set(llmessage_SOURCE_FILES
|
||||
patch_code.cpp
|
||||
patch_dct.cpp
|
||||
patch_idct.cpp
|
||||
llsocks5.cpp
|
||||
sound_ids.cpp
|
||||
)
|
||||
|
||||
@@ -108,6 +105,7 @@ set(llmessage_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
llares.h
|
||||
llareslistener.h
|
||||
llassetstorage.h
|
||||
llavatarnamecache.h
|
||||
llblowfishcipher.h
|
||||
@@ -126,7 +124,6 @@ set(llmessage_HEADER_FILES
|
||||
llfiltersd2xmlrpc.h
|
||||
llfollowcamparams.h
|
||||
llhost.h
|
||||
llhttpassetstorage.h
|
||||
llhttpclient.h
|
||||
llhttpclientinterface.h
|
||||
llhttpclientadapter.h
|
||||
@@ -144,7 +141,6 @@ set(llmessage_HEADER_FILES
|
||||
llmail.h
|
||||
llmessagebuilder.h
|
||||
llmessageconfig.h
|
||||
llmessagelog.h
|
||||
llmessagereader.h
|
||||
llmessagetemplate.h
|
||||
llmessagetemplateparser.h
|
||||
@@ -158,6 +154,7 @@ set(llmessage_HEADER_FILES
|
||||
llpacketring.h
|
||||
llpartdata.h
|
||||
llpumpio.h
|
||||
llproxy.h
|
||||
llqueryflags.h
|
||||
llregionflags.h
|
||||
llregionhandle.h
|
||||
@@ -202,7 +199,6 @@ set(llmessage_HEADER_FILES
|
||||
patch_code.h
|
||||
patch_dct.h
|
||||
sound_ids.h
|
||||
llsocks5.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llmessage_HEADER_FILES}
|
||||
@@ -221,13 +217,44 @@ target_link_libraries(
|
||||
${XMLRPCEPI_LIBRARIES}
|
||||
)
|
||||
|
||||
IF (LL_TESTS)
|
||||
# When building the viewer the tests links against the shared objects.
|
||||
# These can not be found when we try to run the tests, so we had to disable them, for the viewer build.
|
||||
# TODO: Can someone with viewer knowledge figure out how to make these find the correct so.
|
||||
#ADD_BUILD_TEST(llhttpclientadapter llmessage)
|
||||
ADD_BUILD_TEST(llhttpclientadapter llmessage)
|
||||
ADD_BUILD_TEST(lltrustedmessageservice llmessage)
|
||||
ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage)
|
||||
ENDIF (LL_TESTS)
|
||||
# tests
|
||||
if (LL_TESTS)
|
||||
include(GoogleMock)
|
||||
include(LLAddBuildTest)
|
||||
include(Python)
|
||||
include(Tut)
|
||||
|
||||
SET(llmessage_TEST_SOURCE_FILES
|
||||
# llhttpclientadapter.cpp
|
||||
llmime.cpp
|
||||
llnamevalue.cpp
|
||||
lltrustedmessageservice.cpp
|
||||
lltemplatemessagedispatcher.cpp
|
||||
llregionpresenceverifier.cpp
|
||||
)
|
||||
LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
|
||||
|
||||
# set(TEST_DEBUG on)
|
||||
set(test_libs
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${GOOGLEMOCK_LIBRARIES}
|
||||
)
|
||||
|
||||
LL_ADD_INTEGRATION_TEST(
|
||||
llsdmessage
|
||||
"llsdmessage.cpp"
|
||||
"${test_libs}"
|
||||
${PYTHON_EXECUTABLE}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py"
|
||||
)
|
||||
|
||||
LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llpartdata "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llxfer_file "" "${test_libs}")
|
||||
endif (LL_TESTS)
|
||||
|
||||
|
||||
@@ -4,36 +4,29 @@
|
||||
* @date 2007-08-15
|
||||
* @brief Wrapper for asynchronous DNS lookups.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#define CARES_STATICLIB
|
||||
#include "llares.h"
|
||||
#include "llscopedvolatileaprpool.h"
|
||||
|
||||
@@ -45,9 +38,11 @@
|
||||
#include "apr_poll.h"
|
||||
|
||||
#include "llapr.h"
|
||||
|
||||
#include "llareslistener.h"
|
||||
#include "llscopedvolatileaprpool.h"
|
||||
|
||||
#if defined(LL_WINDOWS)
|
||||
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
|
||||
# define ns_c_in 1
|
||||
# define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||
# define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||
@@ -105,9 +100,11 @@ void LLAres::QueryResponder::queryError(int code)
|
||||
}
|
||||
|
||||
LLAres::LLAres() :
|
||||
chan_(NULL), mInitSuccess(false)
|
||||
chan_(NULL),
|
||||
mInitSuccess(false),
|
||||
mListener(new LLAresListener(this))
|
||||
{
|
||||
if (ares_library_init(ARES_LIB_INIT_ALL) != ARES_SUCCESS ||
|
||||
if (ares_library_init( ARES_LIB_INIT_ALL ) != ARES_SUCCESS ||
|
||||
ares_init(&chan_) != ARES_SUCCESS)
|
||||
{
|
||||
llwarns << "Could not succesfully initialize ares!" << llendl;
|
||||
|
||||
@@ -4,31 +4,25 @@
|
||||
* @date 2007-08-15
|
||||
* @brief Wrapper for asynchronous DNS lookups.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -55,7 +49,10 @@
|
||||
#include "llrefcount.h"
|
||||
#include "lluri.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class LLQueryResponder;
|
||||
class LLAresListener;
|
||||
|
||||
/**
|
||||
* @brief Supported DNS RR types.
|
||||
@@ -450,6 +447,9 @@ public:
|
||||
protected:
|
||||
ares_channel chan_;
|
||||
bool mInitSuccess;
|
||||
// boost::scoped_ptr would actually fit the requirement better, but it
|
||||
// can't handle incomplete types as boost::shared_ptr can.
|
||||
boost::shared_ptr<LLAresListener> mListener;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
97
indra/llmessage/llareslistener.cpp
Normal file
97
indra/llmessage/llareslistener.cpp
Normal file
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* @file llareslistener.cpp
|
||||
* @author Nat Goodspeed
|
||||
* @date 2009-03-18
|
||||
* @brief Implementation for llareslistener.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, 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$
|
||||
*/
|
||||
|
||||
// Precompiled header
|
||||
#include "linden_common.h"
|
||||
// associated header
|
||||
#include "llareslistener.h"
|
||||
// STL headers
|
||||
// std headers
|
||||
// external library headers
|
||||
// other Linden headers
|
||||
#include "llares.h"
|
||||
#include "llerror.h"
|
||||
#include "llevents.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
LLAresListener::LLAresListener(LLAres* llares):
|
||||
LLEventAPI("LLAres",
|
||||
"LLAres listener to request DNS operations"),
|
||||
mAres(llares)
|
||||
{
|
||||
// add() every method we want to be able to invoke via this event API.
|
||||
// Optional last parameter validates expected LLSD request structure.
|
||||
add("rewriteURI",
|
||||
"Given [\"uri\"], return on [\"reply\"] an array of alternative URIs.\n"
|
||||
"On failure, returns an array containing only the original URI, so\n"
|
||||
"failure case can be processed like success case.",
|
||||
&LLAresListener::rewriteURI,
|
||||
LLSD().with("uri", LLSD()).with("reply", LLSD()));
|
||||
}
|
||||
|
||||
/// This UriRewriteResponder subclass packages returned URIs as an LLSD
|
||||
/// array to send back to the requester.
|
||||
class UriRewriteResponder: public LLAres::UriRewriteResponder
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Specify the request, containing the event pump name on which to send
|
||||
* the reply.
|
||||
*/
|
||||
UriRewriteResponder(const LLSD& request):
|
||||
mReqID(request),
|
||||
mPumpName(request["reply"])
|
||||
{}
|
||||
|
||||
/// Called by base class with results. This is called in both the
|
||||
/// success and error cases. On error, the calling logic passes the
|
||||
/// original URI.
|
||||
virtual void rewriteResult(const std::vector<std::string>& uris)
|
||||
{
|
||||
LLSD result;
|
||||
for (std::vector<std::string>::const_iterator ui(uris.begin()), uend(uris.end());
|
||||
ui != uend; ++ui)
|
||||
{
|
||||
result.append(*ui);
|
||||
}
|
||||
// This call knows enough to avoid trying to insert a map key into an
|
||||
// LLSD array. It's there so that if, for any reason, we ever decide
|
||||
// to change the response from array to map, it will Just Start Working.
|
||||
mReqID.stamp(result);
|
||||
LLEventPumps::instance().obtain(mPumpName).post(result);
|
||||
}
|
||||
|
||||
private:
|
||||
LLReqID mReqID;
|
||||
const std::string mPumpName;
|
||||
};
|
||||
|
||||
void LLAresListener::rewriteURI(const LLSD& data)
|
||||
{
|
||||
mAres->rewriteURI(data["uri"], new UriRewriteResponder(data));
|
||||
}
|
||||
53
indra/llmessage/llareslistener.h
Normal file
53
indra/llmessage/llareslistener.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @file llareslistener.h
|
||||
* @author Nat Goodspeed
|
||||
* @date 2009-03-18
|
||||
* @brief LLEventPump API for LLAres. This header doesn't actually define the
|
||||
* API; the API is defined by the pump name on which this class
|
||||
* listens, and by the expected content of LLSD it receives.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, 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$
|
||||
*/
|
||||
|
||||
#if ! defined(LL_LLARESLISTENER_H)
|
||||
#define LL_LLARESLISTENER_H
|
||||
|
||||
#include "lleventapi.h"
|
||||
|
||||
class LLAres;
|
||||
class LLSD;
|
||||
|
||||
/// Listen on an LLEventPump with specified name for LLAres request events.
|
||||
class LLAresListener: public LLEventAPI
|
||||
{
|
||||
public:
|
||||
/// Bind the LLAres instance to use (e.g. gAres)
|
||||
LLAresListener(LLAres* llares);
|
||||
|
||||
private:
|
||||
/// command["op"] == "rewriteURI"
|
||||
void rewriteURI(const LLSD& data);
|
||||
|
||||
LLAres* mAres;
|
||||
};
|
||||
|
||||
#endif /* ! defined(LL_LLARESLISTENER_H) */
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llassetstorage.cpp
|
||||
* @brief Implementation of the base asset storage system.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -155,8 +149,8 @@ void LLAssetInfo::setFromNameValue( const LLNameValue& nv )
|
||||
setName( buf );
|
||||
buf.assign( str, pos2, std::string::npos );
|
||||
setDescription( buf );
|
||||
llinfos << "uuid: " << mUuid << llendl;
|
||||
llinfos << "creator: " << mCreatorID << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "uuid: " << mUuid << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << llendl;
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
@@ -440,9 +434,9 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse
|
||||
// IW - uuid is passed by value to avoid side effects, please don't re-add &
|
||||
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority)
|
||||
{
|
||||
lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
|
||||
|
||||
llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
|
||||
|
||||
if (user_data)
|
||||
{
|
||||
@@ -452,7 +446,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
||||
|
||||
if (mShutDown)
|
||||
{
|
||||
llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
|
||||
|
||||
if (callback)
|
||||
{
|
||||
@@ -486,11 +480,10 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
||||
// Try static VFS first.
|
||||
if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
|
||||
{
|
||||
llinfos << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOL exists = mVFS->getExists(uuid, type);
|
||||
LLVFile file(mVFS, uuid, type);
|
||||
U32 size = exists ? file.getSize() : 0;
|
||||
@@ -505,7 +498,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
||||
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
|
||||
}
|
||||
|
||||
llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -539,7 +532,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
||||
}
|
||||
if (duplicate)
|
||||
{
|
||||
llinfos << "Adding additional non-duplicate request for asset " << uuid
|
||||
LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid
|
||||
<< "." << LLAssetType::lookup(type) << llendl;
|
||||
}
|
||||
|
||||
@@ -603,9 +596,9 @@ void LLAssetStorage::downloadCompleteCallback(
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status)
|
||||
{
|
||||
llinfos << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
|
||||
|
||||
lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
|
||||
LL_DEBUGS("AssetStorage") << "LLAssetStorage::downloadCompleteCallback() for " << file_id
|
||||
<< "," << LLAssetType::lookup(file_type) << llendl;
|
||||
LLAssetRequest* req = (LLAssetRequest*)user_data;
|
||||
if(!req)
|
||||
@@ -750,7 +743,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
|
||||
tpvf.setAsset(asset_id, atype);
|
||||
tpvf.setCallback(downloadEstateAssetCompleteCallback, req);
|
||||
|
||||
llinfos << "Starting transfer for " << asset_id << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "Starting transfer for " << asset_id << llendl;
|
||||
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
||||
ttcp->requestTransfer(spe, tpvf, 100.f + (is_priority ? 1.f : 0.f));
|
||||
}
|
||||
@@ -890,7 +883,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
|
||||
tpvf.setAsset(asset_id, atype);
|
||||
tpvf.setCallback(downloadInvItemCompleteCallback, req);
|
||||
|
||||
llinfos << "Starting transfer for inventory asset "
|
||||
LL_DEBUGS("AssetStorage") << "Starting transfer for inventory asset "
|
||||
<< item_id << " owned by " << owner_id << "," << task_id
|
||||
<< llendl;
|
||||
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
||||
@@ -1230,7 +1223,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
|
||||
request_list_t* requests = getRequestList(rt);
|
||||
if (deletePendingRequestImpl(requests, asset_type, asset_id))
|
||||
{
|
||||
llinfos << "Asset " << getRequestName(rt) << " request for "
|
||||
LL_DEBUGS("AssetStorage") << "Asset " << getRequestName(rt) << " request for "
|
||||
<< asset_id << "." << LLAssetType::lookup(asset_type)
|
||||
<< " removed from pending queue." << llendl;
|
||||
return true;
|
||||
@@ -1326,7 +1319,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
|
||||
user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData)
|
||||
{
|
||||
// this is a duplicate from the same subsystem - throw it away
|
||||
llinfos << "Discarding duplicate request for UUID " << uuid << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << llendl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1509,7 +1502,7 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET
|
||||
{
|
||||
if( !metric_recipient )
|
||||
{
|
||||
llinfos << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
|
||||
LL_DEBUGS("AssetStorage") << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,31 +3,25 @@
|
||||
* @brief definition of LLAssetStorage class which allows simple
|
||||
* up/downloads of uuid,type asets
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace LLAvatarNameCache
|
||||
// supports it.
|
||||
bool sUseDisplayNames = true;
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
// RLVa override for display names
|
||||
bool sForceDisplayNames = false;
|
||||
// [/RLVa:KB]
|
||||
@@ -733,7 +733,7 @@ void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
|
||||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
bool LLAvatarNameCache::getForceDisplayNames()
|
||||
{
|
||||
return sForceDisplayNames;
|
||||
@@ -751,7 +751,7 @@ void LLAvatarNameCache::setForceDisplayNames(bool force)
|
||||
|
||||
void LLAvatarNameCache::setUseDisplayNames(bool use)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
// We need to force the use of the "display names" cache when @shownames=n restricted (and disallow toggling it)
|
||||
use |= getForceDisplayNames();
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace LLAvatarNameCache
|
||||
void setUseDisplayNames(bool use);
|
||||
bool useDisplayNames();
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
|
||||
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
|
||||
bool getForceDisplayNames();
|
||||
void setForceDisplayNames(bool force);
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llblowfishcipher.cpp
|
||||
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,31 +5,25 @@
|
||||
* two UUIDs and a timestamp (16x2 + 4 = 36 bytes) with only 40 bytes of
|
||||
* output. AES has a block size of 32 bytes, so this would require 64 bytes.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,41 +4,38 @@
|
||||
* @date 2005-09-20
|
||||
* @brief Implementation of the segments, buffers, and buffer arrays.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2005-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llbuffer.h"
|
||||
#include <iterator>
|
||||
|
||||
#include "llmath.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llstl.h"
|
||||
#include <iterator> //VS2010
|
||||
#include "llthread.h"
|
||||
|
||||
#define ASSERT_LLBUFFERARRAY_MUTEX_LOCKED llassert(!mMutexp || mMutexp->isSelfLocked());
|
||||
|
||||
/**
|
||||
* LLSegment
|
||||
@@ -231,7 +228,8 @@ void LLHeapBuffer::allocate(S32 size)
|
||||
* LLBufferArray
|
||||
*/
|
||||
LLBufferArray::LLBufferArray() :
|
||||
mNextBaseChannel(0)
|
||||
mNextBaseChannel(0),
|
||||
mMutexp(NULL)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
}
|
||||
@@ -240,6 +238,8 @@ LLBufferArray::~LLBufferArray()
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
|
||||
|
||||
delete mMutexp;
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -250,14 +250,57 @@ LLChannelDescriptors LLBufferArray::makeChannelConsumer(
|
||||
return rv;
|
||||
}
|
||||
|
||||
void LLBufferArray::lock()
|
||||
{
|
||||
if(mMutexp)
|
||||
{
|
||||
mMutexp->lock() ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLBufferArray::unlock()
|
||||
{
|
||||
if(mMutexp)
|
||||
{
|
||||
mMutexp->unlock() ;
|
||||
}
|
||||
}
|
||||
|
||||
LLMutex* LLBufferArray::getMutex()
|
||||
{
|
||||
return mMutexp ;
|
||||
}
|
||||
|
||||
void LLBufferArray::setThreaded(bool threaded)
|
||||
{
|
||||
if(threaded)
|
||||
{
|
||||
if(!mMutexp)
|
||||
{
|
||||
mMutexp = new LLMutex();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mMutexp)
|
||||
{
|
||||
delete mMutexp ;
|
||||
mMutexp = NULL ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLChannelDescriptors LLBufferArray::nextChannel()
|
||||
{
|
||||
LLChannelDescriptors rv(mNextBaseChannel++);
|
||||
return rv;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
S32 LLBufferArray::capacity() const
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
|
||||
S32 total = 0;
|
||||
const_buffer_iterator_t iter = mBuffers.begin();
|
||||
const_buffer_iterator_t end = mBuffers.end();
|
||||
@@ -270,6 +313,8 @@ S32 LLBufferArray::capacity() const
|
||||
|
||||
bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
||||
{
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
if(copyIntoBuffers(channel, src, len, segments))
|
||||
@@ -280,8 +325,11 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
||||
return false;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
if(copyIntoBuffers(channel, src, len, segments))
|
||||
@@ -300,6 +348,8 @@ bool LLBufferArray::insertAfter(
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
std::vector<LLSegment> segments;
|
||||
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
if(mSegments.end() != segment)
|
||||
{
|
||||
++segment;
|
||||
@@ -312,8 +362,11 @@ bool LLBufferArray::insertAfter(
|
||||
return false;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
segment_iterator_t end = mSegments.end();
|
||||
segment_iterator_t it = getSegment(address);
|
||||
@@ -342,20 +395,26 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
||||
return rv;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::beginSegment()
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
return mSegments.begin();
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::endSegment()
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
return mSegments.end();
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
||||
U8* address,
|
||||
LLSegment& segment)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
segment_iterator_t rv = mSegments.begin();
|
||||
segment_iterator_t end = mSegments.end();
|
||||
@@ -402,8 +461,10 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
||||
return rv;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
segment_iterator_t end = mSegments.end();
|
||||
if(!address)
|
||||
{
|
||||
@@ -421,9 +482,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address)
|
||||
return end;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::const_segment_iterator_t LLBufferArray::getSegment(
|
||||
U8* address) const
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
const_segment_iterator_t end = mSegments.end();
|
||||
if(!address)
|
||||
{
|
||||
@@ -473,6 +536,8 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const
|
||||
S32 count = 0;
|
||||
S32 offset = 0;
|
||||
const_segment_iterator_t it;
|
||||
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
const_segment_iterator_t end = mSegments.end();
|
||||
if(start)
|
||||
{
|
||||
@@ -524,6 +589,8 @@ U8* LLBufferArray::readAfter(
|
||||
len = 0;
|
||||
S32 bytes_to_copy = 0;
|
||||
const_segment_iterator_t it;
|
||||
|
||||
LLMutexLock lock(mMutexp) ;
|
||||
const_segment_iterator_t end = mSegments.end();
|
||||
if(start)
|
||||
{
|
||||
@@ -575,6 +642,7 @@ U8* LLBufferArray::seek(
|
||||
U8* start,
|
||||
S32 delta) const
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
const_segment_iterator_t it;
|
||||
const_segment_iterator_t end = mSegments.end();
|
||||
@@ -716,9 +784,14 @@ U8* LLBufferArray::seek(
|
||||
return rv;
|
||||
}
|
||||
|
||||
//test use only
|
||||
bool LLBufferArray::takeContents(LLBufferArray& source)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
|
||||
LLMutexLock lock(mMutexp);
|
||||
source.lock();
|
||||
|
||||
std::copy(
|
||||
source.mBuffers.begin(),
|
||||
source.mBuffers.end(),
|
||||
@@ -730,13 +803,17 @@ bool LLBufferArray::takeContents(LLBufferArray& source)
|
||||
std::back_insert_iterator<segment_list_t>(mSegments));
|
||||
source.mSegments.clear();
|
||||
source.mNextBaseChannel = 0;
|
||||
source.unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
||||
S32 channel,
|
||||
S32 len)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
// start at the end of the buffers, because it is the most likely
|
||||
// to have free space.
|
||||
@@ -772,8 +849,10 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
||||
return send;
|
||||
}
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
|
||||
// Find out which buffer contains the segment, and if it is found,
|
||||
@@ -799,13 +878,14 @@ bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
//mMutexp should be locked before calling this.
|
||||
bool LLBufferArray::copyIntoBuffers(
|
||||
S32 channel,
|
||||
const U8* src,
|
||||
S32 len,
|
||||
std::vector<LLSegment>& segments)
|
||||
{
|
||||
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||
if(!src || !len) return false;
|
||||
S32 copied = 0;
|
||||
|
||||
@@ -4,31 +4,25 @@
|
||||
* @date 2005-09-20
|
||||
* @brief Declaration of buffer and buffer arrays primarily used in I/O.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2005-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -45,6 +39,7 @@
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
class LLMutex;
|
||||
/**
|
||||
* @class LLChannelDescriptors
|
||||
* @brief A way simple interface to accesss channels inside a buffer
|
||||
@@ -570,6 +565,29 @@ public:
|
||||
* @return Returns true on success.
|
||||
*/
|
||||
bool eraseSegment(const segment_iterator_t& iter);
|
||||
|
||||
/**
|
||||
* @brief Lock the mutex if it exists
|
||||
* This method locks mMutexp to make accessing LLBufferArray thread-safe
|
||||
*/
|
||||
void lock();
|
||||
|
||||
/**
|
||||
* @brief Unlock the mutex if it exists
|
||||
*/
|
||||
void unlock();
|
||||
|
||||
/**
|
||||
* @brief Return mMutexp
|
||||
*/
|
||||
LLMutex* getMutex();
|
||||
|
||||
/**
|
||||
* @brief Set LLBufferArray to be shared across threads or not
|
||||
* This method is to create mMutexp if is threaded.
|
||||
* @param threaded Indicates this LLBufferArray instance is shared across threads if true.
|
||||
*/
|
||||
void setThreaded(bool threaded);
|
||||
//@}
|
||||
|
||||
protected:
|
||||
@@ -601,6 +619,7 @@ protected:
|
||||
S32 mNextBaseChannel;
|
||||
buffer_list_t mBuffers;
|
||||
segment_list_t mSegments;
|
||||
LLMutex* mMutexp;
|
||||
};
|
||||
|
||||
#endif // LL_LLBUFFER_H
|
||||
|
||||
@@ -4,31 +4,25 @@
|
||||
* @date 2005-10-10
|
||||
* @brief Implementation of the buffer iostream classes
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2005-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
@@ -37,6 +31,7 @@
|
||||
|
||||
#include "llbuffer.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llthread.h"
|
||||
|
||||
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
|
||||
|
||||
@@ -68,6 +63,7 @@ int LLBufferStreamBuf::underflow()
|
||||
return EOF;
|
||||
}
|
||||
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
LLBufferArray::segment_iterator_t iter;
|
||||
LLBufferArray::segment_iterator_t end = mBuffer->endSegment();
|
||||
U8* last_pos = (U8*)gptr();
|
||||
@@ -155,6 +151,7 @@ int LLBufferStreamBuf::overflow(int c)
|
||||
// since we got here, we have a buffer, and we have a character to
|
||||
// put on it.
|
||||
LLBufferArray::segment_iterator_t it;
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
it = mBuffer->makeSegment(mChannels.out(), DEFAULT_OUTPUT_SEGMENT_SIZE);
|
||||
if(it != mBuffer->endSegment())
|
||||
{
|
||||
@@ -216,6 +213,7 @@ int LLBufferStreamBuf::sync()
|
||||
|
||||
// *NOTE: I bet we could just --address if address is not NULL.
|
||||
// Need to think about that.
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
address = mBuffer->seek(mChannels.out(), address, -1);
|
||||
if(address)
|
||||
{
|
||||
@@ -279,6 +277,8 @@ streampos LLBufferStreamBuf::seekoff(
|
||||
// NULL is fine
|
||||
break;
|
||||
}
|
||||
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
address = mBuffer->seek(mChannels.in(), base_addr, off);
|
||||
if(address)
|
||||
{
|
||||
@@ -310,6 +310,8 @@ streampos LLBufferStreamBuf::seekoff(
|
||||
// NULL is fine
|
||||
break;
|
||||
}
|
||||
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
address = mBuffer->seek(mChannels.out(), base_addr, off);
|
||||
if(address)
|
||||
{
|
||||
|
||||
@@ -4,31 +4,25 @@
|
||||
* @date 2005-10-10
|
||||
* @brief Classes to treat an LLBufferArray as a c++ iostream.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2005-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* 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.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user