Compare commits
1191 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e321306517 | ||
|
|
acfe7e555e | ||
|
|
5023cc86f0 | ||
|
|
4455140f30 | ||
|
|
71e484516a | ||
|
|
38f878952c | ||
|
|
d80422eba7 | ||
|
|
ee078f717a | ||
|
|
73f34de1f9 | ||
|
|
b3d152f3ba | ||
|
|
a7dc7e636e | ||
|
|
44d84bc277 | ||
|
|
215acbcc96 | ||
|
|
7273e05995 | ||
|
|
ddca5347c3 | ||
|
|
e8cc1bd329 | ||
|
|
9c84a8162f | ||
|
|
16c4636048 | ||
|
|
7c888f6af1 | ||
|
|
dbe32a1f6d | ||
|
|
3fa61c4a39 | ||
|
|
dfa19e23f0 | ||
|
|
9c6ba8d18f | ||
|
|
d5c08c44bf | ||
|
|
bef2a368f4 | ||
|
|
236e1c45f2 | ||
|
|
a4367e75d3 | ||
|
|
c87751a822 | ||
|
|
1f402fdf5e | ||
|
|
bd928218dd | ||
|
|
773994723a | ||
|
|
7583768b9e | ||
|
|
de255321f1 | ||
|
|
37049180f6 | ||
|
|
c22970448f | ||
|
|
038d1bf742 | ||
|
|
a829f20828 | ||
|
|
54fc78013d | ||
|
|
130b1c0665 | ||
|
|
a5fcdde179 | ||
|
|
0904772a6f | ||
|
|
4e11983c7c | ||
|
|
8923ad755d | ||
|
|
35f14a262d | ||
|
|
13999dfc1d | ||
|
|
36ed0dcdaa | ||
|
|
44badf452e | ||
|
|
df07b97abd | ||
|
|
43b4e4cfc3 | ||
|
|
ce5e900721 | ||
|
|
6034e5d112 | ||
|
|
8779ff3c8f | ||
|
|
edc11a1d39 | ||
|
|
09d6521361 | ||
|
|
6c252a0fa1 | ||
|
|
9b762a5a84 | ||
|
|
2b6c5fcb31 | ||
|
|
312e1457dd | ||
|
|
bd9d7484f0 | ||
|
|
4f8f44d9c3 | ||
|
|
ea19e50919 | ||
|
|
0742630d81 | ||
|
|
107cef2b0e | ||
|
|
ce34b359ad | ||
|
|
5c545d1d2e | ||
|
|
83ef13a79a | ||
|
|
6234264211 | ||
|
|
f17066b7bf | ||
|
|
1a18948935 | ||
|
|
0dbfa70443 | ||
|
|
61adf36339 | ||
|
|
ed846f11f1 | ||
|
|
3257dbe76d | ||
|
|
146d78edfa | ||
|
|
ee2b2aadc3 | ||
|
|
bce5dfe711 | ||
|
|
76a658324c | ||
|
|
573a64ad24 | ||
|
|
574c240202 | ||
|
|
bdc31bddfc | ||
|
|
447a66d660 | ||
|
|
54d473e200 | ||
|
|
264c83aec4 | ||
|
|
8f8b5f9a4d | ||
|
|
07c487a28f | ||
|
|
17df4185ce | ||
|
|
dbf6381e34 | ||
|
|
fd7e82ee72 | ||
|
|
857d4e60cc | ||
|
|
567f4c51f8 | ||
|
|
6fe4b6fbe8 | ||
|
|
dbc3f1ff92 | ||
|
|
0ce9ad4a56 | ||
|
|
c10193c72b | ||
|
|
45ad9e39a6 | ||
|
|
e5ae84b42b | ||
|
|
16aa00e944 | ||
|
|
003bd9f1b3 | ||
|
|
cc1476fc36 | ||
|
|
241ddd031f | ||
|
|
c08d6df7e1 | ||
|
|
fcc1fa2c32 | ||
|
|
3d7b5e5e93 | ||
|
|
99e71222f0 | ||
|
|
e3680f216e | ||
|
|
8b3da1bff4 | ||
|
|
437de6743c | ||
|
|
f028dca711 | ||
|
|
996cc6097e | ||
|
|
ac7cded080 | ||
|
|
ab89adfaef | ||
|
|
647b326edc | ||
|
|
77b032549e | ||
|
|
e3e38e34c5 | ||
|
|
9bd02b5da1 | ||
|
|
727ddffb71 | ||
|
|
2f84d5397b | ||
|
|
1505c22995 | ||
|
|
d76ca9cd93 | ||
|
|
1b63b21a4d | ||
|
|
10b9348071 | ||
|
|
f3780b9eae | ||
|
|
a98a146c50 | ||
|
|
c305b55012 | ||
|
|
d2dfa4cfe7 | ||
|
|
71012ef883 | ||
|
|
fe0975dc24 | ||
|
|
2b84b6d8b1 | ||
|
|
dbc039783b | ||
|
|
a0206e5a17 | ||
|
|
0f181fe5d0 | ||
|
|
cfe924e4a8 | ||
|
|
e1cad4c34f | ||
|
|
9dbb58ee8b | ||
|
|
53c3faac5d | ||
|
|
c4cc626dff | ||
|
|
bde2ff5e78 | ||
|
|
ea16c9f858 | ||
|
|
df9c35bc0f | ||
|
|
9d93c4808e | ||
|
|
54e6b2402c | ||
|
|
00d1c88c59 | ||
|
|
ad02e01e77 | ||
|
|
1b600e7803 | ||
|
|
3de534896e | ||
|
|
9a86a713d3 | ||
|
|
5e60afe5ed | ||
|
|
e8b688b61f | ||
|
|
7c824f02b4 | ||
|
|
498fe1afe7 | ||
|
|
dac826da4e | ||
|
|
f7c237c0e1 | ||
|
|
ae057a7589 | ||
|
|
1a20b60d82 | ||
|
|
2e31f12cf4 | ||
|
|
2ef9fd05fa | ||
|
|
6fbc48ee9c | ||
|
|
6db9109b3f | ||
|
|
abffda269f | ||
|
|
154ba0124a | ||
|
|
fbe324cc5e | ||
|
|
090164ff7a | ||
|
|
428407c5e4 | ||
|
|
088f1213b4 | ||
|
|
e391d6390c | ||
|
|
deeb7287a2 | ||
|
|
7352aea9ac | ||
|
|
7837c611fb | ||
|
|
26a4e8a161 | ||
|
|
31b87ff07b | ||
|
|
7c1d075a5a | ||
|
|
abf0dd4250 | ||
|
|
9939f94f08 | ||
|
|
86b9e6fbed | ||
|
|
91ac21b9ec | ||
|
|
9d60b84f78 | ||
|
|
6da82d9805 | ||
|
|
616373db16 | ||
|
|
7229f6e64b | ||
|
|
da720ce9be | ||
|
|
a537f7e1a3 | ||
|
|
a6abecf5fa | ||
|
|
093469c33c | ||
|
|
36e6edfc65 | ||
|
|
13d9b64b1d | ||
|
|
4ce42762ee | ||
|
|
55c6cbabfd | ||
|
|
8e5502fdc2 | ||
|
|
2de3a1b9da | ||
|
|
d053625663 | ||
|
|
e9de7e7107 | ||
|
|
2e7c1bcfd9 | ||
|
|
8f53c768f5 | ||
|
|
82c3d0cf89 | ||
|
|
e20cf3789b | ||
|
|
7444f3bfad | ||
|
|
f84b69cad1 | ||
|
|
b996517c94 | ||
|
|
24862eaf15 | ||
|
|
2ca80add14 | ||
|
|
959bcfa7f8 | ||
|
|
7c514fe155 | ||
|
|
3d1f43046d | ||
|
|
427ab55058 | ||
|
|
2d0412d366 | ||
|
|
8e0eaa980f | ||
|
|
09baa3e679 | ||
|
|
3ae6345f1b | ||
|
|
dc329202ef | ||
|
|
5e445aaf7b | ||
|
|
ab8956d58f | ||
|
|
e8f1e7e96e | ||
|
|
488fe0ae9c | ||
|
|
7e76397a26 | ||
|
|
a704d444f2 | ||
|
|
8b035dc3c7 | ||
|
|
18fd36cba4 | ||
|
|
855d3a3ba5 | ||
|
|
a4977bbe19 | ||
|
|
6581849d24 | ||
|
|
ef6d6d20b9 | ||
|
|
f10288ceae | ||
|
|
0369d21917 | ||
|
|
0d2e02efb1 | ||
|
|
c0e1784e86 | ||
|
|
cc02f78d4e | ||
|
|
d51ae0ecac | ||
|
|
696fbdfa24 | ||
|
|
69e4debc42 | ||
|
|
090bf7acca | ||
|
|
8fcb9bf418 | ||
|
|
7a87be5015 | ||
|
|
616f2b5861 | ||
|
|
7bb01a17ee | ||
|
|
07ad821157 | ||
|
|
87799c1f3d | ||
|
|
c36c916342 | ||
|
|
48379e6442 | ||
|
|
8db64dc77f | ||
|
|
6a85abbd14 | ||
|
|
c1f6478a37 | ||
|
|
0037577814 | ||
|
|
9cfc43005d | ||
|
|
39c9b656c8 | ||
|
|
22ae9331bb | ||
|
|
4e0bb49394 | ||
|
|
cd2bf64b87 | ||
|
|
f7bd7c5901 | ||
|
|
7c404375c7 | ||
|
|
d1ef7ee5ca | ||
|
|
74c1ed77a4 | ||
|
|
1cd26ba85e | ||
|
|
02572ab1d3 | ||
|
|
24b20f6e4b | ||
|
|
68365c20c0 | ||
|
|
32d58d6e3e | ||
|
|
ba3b0c69f1 | ||
|
|
590f707c42 | ||
|
|
b6f3de5028 | ||
|
|
a0fb1e1788 | ||
|
|
ea72428c9d | ||
|
|
d38e2c0c91 | ||
|
|
503faaea62 | ||
|
|
381f74276b | ||
|
|
c92a9a6640 | ||
|
|
d75899f2d1 | ||
|
|
8f871cca10 | ||
|
|
9356963bd3 | ||
|
|
edb2e4c5b3 | ||
|
|
bf9ce4709f | ||
|
|
e41f23dead | ||
|
|
5ced49aaa8 | ||
|
|
2c6272d11a | ||
|
|
f8079bcd72 | ||
|
|
eea726d74e | ||
|
|
e7619f7518 | ||
|
|
ba7d8cedec | ||
|
|
717656c453 | ||
|
|
9ed9720861 | ||
|
|
939d60da59 | ||
|
|
ef5575be1b | ||
|
|
4eef6725f4 | ||
|
|
08b6b3bb48 | ||
|
|
5afb70b9fe | ||
|
|
747c25e920 | ||
|
|
7549836986 | ||
|
|
e13a17cc0c | ||
|
|
b14a6acd2f | ||
|
|
59a0c50d48 | ||
|
|
82ad9d4e04 | ||
|
|
d6b9504c84 | ||
|
|
35911d2362 | ||
|
|
9447b6d15f | ||
|
|
068b8e1f9b | ||
|
|
2e4fbe6b17 | ||
|
|
43173f1b0d | ||
|
|
ec299bfa87 | ||
|
|
4cbf8d728e | ||
|
|
43128c9016 | ||
|
|
72247bdaef | ||
|
|
82f0e19349 | ||
|
|
b5bb559cc0 | ||
|
|
a30a02e7ae | ||
|
|
e1a2c44ebe | ||
|
|
cde80125ad | ||
|
|
02d6b033d0 | ||
|
|
adea92f8b7 | ||
|
|
57ba9ef5ad | ||
|
|
982f3d58a9 | ||
|
|
9dc7fef4f6 | ||
|
|
c5594e839e | ||
|
|
acbff305f5 | ||
|
|
d40ec1c346 | ||
|
|
3b59af2225 | ||
|
|
6e7154d55c | ||
|
|
47377f17c6 | ||
|
|
beab155434 | ||
|
|
c7757d1038 | ||
|
|
aa2cde2493 | ||
|
|
cf166d3f1e | ||
|
|
caa207f59f | ||
|
|
1ac5aa6808 | ||
|
|
c4972e7734 | ||
|
|
d27dd3714f | ||
|
|
ba3491c76e | ||
|
|
0a1d61950b | ||
|
|
cadd645076 | ||
|
|
b47c0d7e51 | ||
|
|
8bdd80abfa | ||
|
|
4492bc1bcd | ||
|
|
6214e6a217 | ||
|
|
34137ed4ea | ||
|
|
5d9e135b5c | ||
|
|
1a3a1e6665 | ||
|
|
38db874755 | ||
|
|
5f7e392c7c | ||
|
|
53fb20880c | ||
|
|
5002f06d24 | ||
|
|
ef074deb52 | ||
|
|
8fa1108b72 | ||
|
|
a4c2e7f599 | ||
|
|
a2fe3e2081 | ||
|
|
ce44f56af9 | ||
|
|
7b84942f86 | ||
|
|
18497cef73 | ||
|
|
a3bb1a81de | ||
|
|
66783398d0 | ||
|
|
d67e9916b8 | ||
|
|
3deb52d399 | ||
|
|
d67e8291c8 | ||
|
|
1cc685e820 | ||
|
|
a22d0dcab9 | ||
|
|
707c8c6f2b | ||
|
|
b3a12167d6 | ||
|
|
95345521f0 | ||
|
|
3640afdd95 | ||
|
|
bc08cc201b | ||
|
|
43145c7f67 | ||
|
|
520b8b342e | ||
|
|
34c42cdab0 | ||
|
|
0e855fea7c | ||
|
|
1ebd79e413 | ||
|
|
0cf59534ff | ||
|
|
d5c5bbe0a1 | ||
|
|
44cde8d5c6 | ||
|
|
37fc19fae0 | ||
|
|
fb16d49511 | ||
|
|
266167f5a3 | ||
|
|
4bf2e19898 | ||
|
|
32eb7ddc37 | ||
|
|
6f19e231b6 | ||
|
|
94fa6cb071 | ||
|
|
efe51fd5cb | ||
|
|
69c0f252a4 | ||
|
|
58cb7cd084 | ||
|
|
38ae479249 | ||
|
|
f4231f0628 | ||
|
|
ba163ab05b | ||
|
|
c5c079f6aa | ||
|
|
679d155a39 | ||
|
|
9668992493 | ||
|
|
1cffd8fa03 | ||
|
|
7518b075b7 | ||
|
|
3073370d0e | ||
|
|
9bab43b4d1 | ||
|
|
70157a4ec5 | ||
|
|
a47aa46962 | ||
|
|
a34278cfc3 | ||
|
|
5f682b51ec | ||
|
|
ff5a83d192 | ||
|
|
8c445dac67 | ||
|
|
eb9bf71726 | ||
|
|
7661a0b2a9 | ||
|
|
de9d6096a5 | ||
|
|
11c48ac807 | ||
|
|
e9b9eb6a4c | ||
|
|
f1846045a6 | ||
|
|
2304420f6d | ||
|
|
f8c15d38a6 | ||
|
|
3003133a66 | ||
|
|
81cf774fe8 | ||
|
|
fbb2a7e90d | ||
|
|
31dc5aa728 | ||
|
|
db482cb7dd | ||
|
|
b06d878790 | ||
|
|
23ce1dfc27 | ||
|
|
fdfc4ab2a8 | ||
|
|
f252161941 | ||
|
|
b86e7715a8 | ||
|
|
e393b47da8 | ||
|
|
2b4edd659f | ||
|
|
5ea9740f1b | ||
|
|
da0fc3c8f5 | ||
|
|
f06acc0a85 | ||
|
|
5b160f5b7b | ||
|
|
7319ba62dd | ||
|
|
f2ff6d5186 | ||
|
|
50e459d265 | ||
|
|
c201b54b85 | ||
|
|
da6c816204 | ||
|
|
2c401b7359 | ||
|
|
97ba3c9346 | ||
|
|
e9296721c7 | ||
|
|
85d82c8140 | ||
|
|
1ebc9d04aa | ||
|
|
045f3b8b11 | ||
|
|
32b8fa4a77 | ||
|
|
8fb70a2058 | ||
|
|
0634c38505 | ||
|
|
7e6c84c334 | ||
|
|
3a64522267 | ||
|
|
3a2ac0e2ee | ||
|
|
fc391d4b10 | ||
|
|
aa625da6a6 | ||
|
|
82df5de5cf | ||
|
|
ecf9824b63 | ||
|
|
0ab2289cdc | ||
|
|
6166a40440 | ||
|
|
983b49c0c8 | ||
|
|
01eacd3a31 | ||
|
|
e78a3913e0 | ||
|
|
2c8e72217e | ||
|
|
6941058824 | ||
|
|
fa79588a20 | ||
|
|
a6e305063e | ||
|
|
fac8c25851 | ||
|
|
014a86c26b | ||
|
|
87374274b9 | ||
|
|
56dbcae402 | ||
|
|
5d8ed077bc | ||
|
|
5aad1f7afe | ||
|
|
967ea51980 | ||
|
|
571efeddb2 | ||
|
|
42f5394677 | ||
|
|
98ab3dffa3 | ||
|
|
ef4d989f37 | ||
|
|
6974596e83 | ||
|
|
b756077269 | ||
|
|
70e36ee2b4 | ||
|
|
bde004c08e | ||
|
|
5b52440e61 | ||
|
|
bf4d727cd5 | ||
|
|
ad1c6442cd | ||
|
|
f36fe45fa7 | ||
|
|
b6cfe15c7c | ||
|
|
41f6d6a5ff | ||
|
|
2e07d24199 | ||
|
|
c4e16b26bb | ||
|
|
c9dbcfbb31 | ||
|
|
f2855d3668 | ||
|
|
5b28e29530 | ||
|
|
04806e02ed | ||
|
|
f9a1fd5748 | ||
|
|
d38b8caf2b | ||
|
|
26bb95fe3d | ||
|
|
c6ce464dbc | ||
|
|
b8a914b15b | ||
|
|
456c89a7a3 | ||
|
|
f394cb2e8f | ||
|
|
6b08c051a3 | ||
|
|
790ca65c84 | ||
|
|
7ccd8f8f1d | ||
|
|
eef6f92029 | ||
|
|
f7dbdba447 | ||
|
|
48113f0fc8 | ||
|
|
a15a58a7c1 | ||
|
|
469955889e | ||
|
|
b72dd852b7 | ||
|
|
7f527814d5 | ||
|
|
66a0471efa | ||
|
|
6412349dec | ||
|
|
c63d5f8e0c | ||
|
|
2347593dac | ||
|
|
b970d4f976 | ||
|
|
219ec7ef20 | ||
|
|
bb0c6a498b | ||
|
|
ddff2f246c | ||
|
|
651f9f47d0 | ||
|
|
7693e6a3a8 | ||
|
|
41b02a7208 | ||
|
|
ca6113a4d5 | ||
|
|
a1dc4e830d | ||
|
|
fa0a71253f | ||
|
|
dd69c9fd20 | ||
|
|
25cbba9bca | ||
|
|
2b4ebe657c | ||
|
|
87a2d8d51b | ||
|
|
efa4284391 | ||
|
|
92039f295d | ||
|
|
2899de1a5c | ||
|
|
e8fbeeba5f | ||
|
|
fc9400db07 | ||
|
|
0b91ec8dd2 | ||
|
|
6baee2e10b | ||
|
|
759f1d2dbe | ||
|
|
c4f1906b0a | ||
|
|
8a9a8ed5c9 | ||
|
|
4d065f0453 | ||
|
|
684482352c | ||
|
|
f9137c923b | ||
|
|
964ec57ffe | ||
|
|
99623894c7 | ||
|
|
9b56cc69c1 | ||
|
|
7f019cc196 | ||
|
|
4f628849f3 | ||
|
|
1bf05fbb1f | ||
|
|
a3a17e929e | ||
|
|
5c4056660f | ||
|
|
5d79f857b0 | ||
|
|
a9b39d6e5d | ||
|
|
8300bb651e | ||
|
|
3bf699ad36 | ||
|
|
7e4a2d69d5 | ||
|
|
8013c0d2f5 | ||
|
|
c0ba99e5ad | ||
|
|
99570d8ebb | ||
|
|
937c06db54 | ||
|
|
58ba81ae4e | ||
|
|
6f2d80cc93 | ||
|
|
69f29cb53e | ||
|
|
e830a77860 | ||
|
|
a110a7bd6a | ||
|
|
cec88872ae | ||
|
|
84023c8162 | ||
|
|
898549d13e | ||
|
|
f43e5f92fd | ||
|
|
39736e52d8 | ||
|
|
b242ceda1e | ||
|
|
df65245671 | ||
|
|
6d1d1c0dbf | ||
|
|
d18a9f22e7 | ||
|
|
3a06640730 | ||
|
|
4dfd2c7d47 | ||
|
|
e9b59e7627 | ||
|
|
8418288e26 | ||
|
|
afab4b276e | ||
|
|
c34ab0ee66 | ||
|
|
95d533ce8a | ||
|
|
52a4dbccbe | ||
|
|
943b37b8e6 | ||
|
|
3c55d2e776 | ||
|
|
db8fd1eb9f | ||
|
|
8ae824ff09 | ||
|
|
3a91085ac2 | ||
|
|
323ffd7a89 | ||
|
|
db98698bbe | ||
|
|
6b080d57cb | ||
|
|
3f42183797 | ||
|
|
e88ad5aab9 | ||
|
|
5f276c3212 | ||
|
|
0daa5d8b4d | ||
|
|
f24898d049 | ||
|
|
13b1c8c173 | ||
|
|
af3cd00048 | ||
|
|
5f6a4c4111 | ||
|
|
fc27806e90 | ||
|
|
cb0da425d5 | ||
|
|
94c242f792 | ||
|
|
4e9f50b878 | ||
|
|
00b36eb0fe | ||
|
|
f025387f10 | ||
|
|
07c26111af | ||
|
|
cf97809ff1 | ||
|
|
4eb3622bfe | ||
|
|
96b3eed1b0 | ||
|
|
d913303875 | ||
|
|
63fe673af1 | ||
|
|
50eebb5cba | ||
|
|
32d0ef89c6 | ||
|
|
14e407aff3 | ||
|
|
bc13855e64 | ||
|
|
0e265889dd | ||
|
|
55de189752 | ||
|
|
54360dd20e | ||
|
|
f61e54892f | ||
|
|
3b991a2222 | ||
|
|
96539ffc79 | ||
|
|
355cde464a | ||
|
|
8d7c353500 | ||
|
|
43732794dd | ||
|
|
3217bccfcd | ||
|
|
1e4842eaba | ||
|
|
7c7dd6269a | ||
|
|
ea1f5fb08d | ||
|
|
603ad905e1 | ||
|
|
ac82fc60f9 | ||
|
|
50aa89dae6 | ||
|
|
b459239833 | ||
|
|
dae58e0937 | ||
|
|
2b4de8f881 | ||
|
|
fb2f4f158c | ||
|
|
eda770e978 | ||
|
|
3d95015686 | ||
|
|
2b02d3dc84 | ||
|
|
415b7b7ec4 | ||
|
|
33c6067098 | ||
|
|
0fcd55aff3 | ||
|
|
fd023b317a | ||
|
|
a8ed185c00 | ||
|
|
6ec59ee892 | ||
|
|
e6272b8d56 | ||
|
|
ccba04f345 | ||
|
|
f317953290 | ||
|
|
d6486fe14a | ||
|
|
62d0a0cdbf | ||
|
|
8e542cfa03 | ||
|
|
5490a3e549 | ||
|
|
28da235888 | ||
|
|
8721841fc3 | ||
|
|
136a6a6e0f | ||
|
|
b9a461c5ad | ||
|
|
ec4f217af8 | ||
|
|
1b9eb52850 | ||
|
|
4be85eeaa5 | ||
|
|
d33d12ba83 | ||
|
|
319507f521 | ||
|
|
af9ccfa15c | ||
|
|
4567555c49 | ||
|
|
2d3dda6db3 | ||
|
|
09c043fe52 | ||
|
|
5b07370ec4 | ||
|
|
bc17e2e9cf | ||
|
|
47d0a50a19 | ||
|
|
e7cb63fcf7 | ||
|
|
66f4ce354f | ||
|
|
37889eb3fa | ||
|
|
6362df1202 | ||
|
|
1ece4feccd | ||
|
|
cc482ee865 | ||
|
|
2a8a46a32d | ||
|
|
5ab536a1e9 | ||
|
|
3281b99362 | ||
|
|
b7c9eb4bf7 | ||
|
|
68bdd0b7fe | ||
|
|
35800d6a86 | ||
|
|
19d6aa2bc9 | ||
|
|
a2d98c7293 | ||
|
|
080dfcc9c9 | ||
|
|
ec8c93aa5e | ||
|
|
a82aea53f8 | ||
|
|
a4d82895be | ||
|
|
3852f05e6e | ||
|
|
4919c60560 | ||
|
|
ced820bd5e | ||
|
|
c934901a05 | ||
|
|
aac3f2d04e | ||
|
|
aba42d8543 | ||
|
|
e75bcd4c59 | ||
|
|
6541fc08d4 | ||
|
|
585fc5e79d | ||
|
|
e26ef8aeca | ||
|
|
b66fe3e9ff | ||
|
|
a009871827 | ||
|
|
feef1dd732 | ||
|
|
f144baa9a8 | ||
|
|
f08aad8a40 | ||
|
|
b94ab10922 | ||
|
|
0ca8491bbe | ||
|
|
5bbfb082dd | ||
|
|
8185ce8b4a | ||
|
|
5ba8ca5662 | ||
|
|
96c191f4fd | ||
|
|
21f4ee8a3d | ||
|
|
054ebe8878 | ||
|
|
2a6597f61e | ||
|
|
1854c52ea3 | ||
|
|
5460f2e035 | ||
|
|
516c3dfbbb | ||
|
|
797982ee11 | ||
|
|
8f2d7881bd | ||
|
|
b60ff651a3 | ||
|
|
e7930b1d0f | ||
|
|
2a9c9ae340 | ||
|
|
fa63054c4f | ||
|
|
679a5f6c0b | ||
|
|
658d02b5e9 | ||
|
|
a17f93ff44 | ||
|
|
d3a46b03bf | ||
|
|
ff0d020007 | ||
|
|
b6b0bc7b32 | ||
|
|
dc612d0f08 | ||
|
|
80148bf784 | ||
|
|
19c10c892a | ||
|
|
ea0fc7b12c | ||
|
|
4efd9a3b7b | ||
|
|
86cc00aaa8 | ||
|
|
46e1bcb6b6 | ||
|
|
bafea2282a | ||
|
|
11c19b0d2e | ||
|
|
c5b636469d | ||
|
|
95a686dbf5 | ||
|
|
5b4fe23f7f | ||
|
|
676d32974a | ||
|
|
b785f204ce | ||
|
|
0688861aa7 | ||
|
|
8c82ff16ad | ||
|
|
0a0aa77cfd | ||
|
|
8e32ce85a7 | ||
|
|
2ae5b40ca6 | ||
|
|
cbbd992df4 | ||
|
|
a58f5b2f66 | ||
|
|
0a60e9537f | ||
|
|
63c137820b | ||
|
|
0174e326e3 | ||
|
|
decabe1181 | ||
|
|
bdcfd6afee | ||
|
|
a8270cb48c | ||
|
|
89b2fb2ff4 | ||
|
|
5485e3da46 | ||
|
|
0cb33a5398 | ||
|
|
11dfd7711b | ||
|
|
ed7ddeecf2 | ||
|
|
d145750e87 | ||
|
|
1126efdcd0 | ||
|
|
9ae0641871 | ||
|
|
e9f2a9bddb | ||
|
|
617f139aac | ||
|
|
e394f83df0 | ||
|
|
0738fc43e4 | ||
|
|
d4e3a7fe81 | ||
|
|
b56410285b | ||
|
|
ace4324e75 | ||
|
|
af90b52731 | ||
|
|
fcb066cb5f | ||
|
|
d639f7fdf3 | ||
|
|
b0fe0464af | ||
|
|
daf99f8c0a | ||
|
|
b89c48b1be | ||
|
|
c4e4a29478 | ||
|
|
4ddff7eb0f | ||
|
|
82dc7886fc | ||
|
|
7480f2fd0e | ||
|
|
546259b2ff | ||
|
|
25d9001de1 | ||
|
|
e33b0fa35b | ||
|
|
e67ba0ad06 | ||
|
|
063f0f5d97 | ||
|
|
225b925f4e | ||
|
|
54789706f4 | ||
|
|
3becda919e | ||
|
|
4faac1f090 | ||
|
|
898904d83d | ||
|
|
cead87005b | ||
|
|
4fdcfd79e4 | ||
|
|
39c1ae2408 | ||
|
|
58a1147870 | ||
|
|
e0887944a0 | ||
|
|
4485007fce | ||
|
|
a94ce3f1df | ||
|
|
bdb5ac96d9 | ||
|
|
dec8b9c98d | ||
|
|
2206e2fc96 | ||
|
|
726ca72c47 | ||
|
|
10a23a823e | ||
|
|
21353de9b7 | ||
|
|
b89534ad0a | ||
|
|
d05d065d85 | ||
|
|
7a18078177 | ||
|
|
01ae916bad | ||
|
|
f72c4bdba5 | ||
|
|
9d458fdd7f | ||
|
|
169387b390 | ||
|
|
6dbe793112 | ||
|
|
9c928e9dc6 | ||
|
|
352672eaf2 | ||
|
|
cacc028835 | ||
|
|
31736b1aac | ||
|
|
d1c80efd41 | ||
|
|
e9c386f6a6 | ||
|
|
b6d83e9c0f | ||
|
|
bd01c4a5cb | ||
|
|
baa65d4a15 | ||
|
|
e21949deaf | ||
|
|
9488b235d1 | ||
|
|
33b1e385ec | ||
|
|
92dff85afb | ||
|
|
31ffd5450b | ||
|
|
aea547cd11 | ||
|
|
5b9fe4497d | ||
|
|
29eb3b2eb5 | ||
|
|
ccae787d03 | ||
|
|
122304317c | ||
|
|
e11b9dddb6 | ||
|
|
7db38a351c | ||
|
|
94b1c16398 | ||
|
|
828e4a5b09 | ||
|
|
e16d7fe1da | ||
|
|
45c7789b54 | ||
|
|
a3c5f76942 | ||
|
|
affec18625 | ||
|
|
20f26eeb17 | ||
|
|
64784bc0cf | ||
|
|
430821d837 | ||
|
|
2b5b4ac167 | ||
|
|
50803dfe2c | ||
|
|
8d0aaa359f | ||
|
|
89632f3ea8 | ||
|
|
ed19284d85 | ||
|
|
df35720cf5 | ||
|
|
17f32b7773 | ||
|
|
e5ff7f389b | ||
|
|
afca742392 | ||
|
|
a64def8b73 | ||
|
|
348d15707d | ||
|
|
de895ee54a | ||
|
|
ff36a1bc7b | ||
|
|
49ec85ae15 | ||
|
|
6daa61d6ba | ||
|
|
efc6c6db7c | ||
|
|
5fd1749150 | ||
|
|
e61ea79c72 | ||
|
|
f130e1a86f | ||
|
|
25c32061e4 | ||
|
|
a4ec97cfdd | ||
|
|
6adaf1be74 | ||
|
|
84ad23234b | ||
|
|
acaf6937c5 | ||
|
|
a3052e40ad | ||
|
|
6ce3daff94 | ||
|
|
2a2cdaa211 | ||
|
|
ce8441132e | ||
|
|
2a7f4e0602 | ||
|
|
b1cb4f5b04 | ||
|
|
a658bddbcd | ||
|
|
01518de0bf | ||
|
|
8f4955f6a9 | ||
|
|
dc200d7bb5 | ||
|
|
ed9500f08c | ||
|
|
ad28238ece | ||
|
|
84ce0b487b | ||
|
|
53528b0372 | ||
|
|
de24e93a1f | ||
|
|
621fb9aba0 | ||
|
|
10e664eedc | ||
|
|
3a307878fd | ||
|
|
7432ca6daf | ||
|
|
96c59156a7 | ||
|
|
a9fbf3a4e0 | ||
|
|
d15d5bf181 | ||
|
|
a5838cf0a6 | ||
|
|
2bd4eaeb19 | ||
|
|
0daece6f2b | ||
|
|
8fbaa10ade | ||
|
|
9359293b11 | ||
|
|
f5abae5ac6 | ||
|
|
a081df75e2 | ||
|
|
e9055cec17 | ||
|
|
c0d280d948 | ||
|
|
2d4ac6288d | ||
|
|
008b213ec0 | ||
|
|
4939d99b57 | ||
|
|
f3fea81936 | ||
|
|
18c625bda6 | ||
|
|
e7fed80e85 | ||
|
|
81fbe7ffb1 | ||
|
|
b990914ec4 | ||
|
|
cb7ea68942 | ||
|
|
444b345cdf | ||
|
|
48d2300b8a | ||
|
|
9cba179dff | ||
|
|
f31a58bd99 | ||
|
|
063920e0a2 | ||
|
|
a1426739a2 | ||
|
|
ce4560bf8f | ||
|
|
37583063ee | ||
|
|
4f6915bad5 | ||
|
|
bbab7b6b4d | ||
|
|
674b521fdd | ||
|
|
d40d0e4596 | ||
|
|
d9b0d7e752 | ||
|
|
4f7fe58af8 | ||
|
|
554d2ddc03 | ||
|
|
5d8205f170 | ||
|
|
c081d7b7dd | ||
|
|
7e488cd635 | ||
|
|
39b967e214 | ||
|
|
adbc69bb07 | ||
|
|
6d92d65140 | ||
|
|
e775b3fc47 | ||
|
|
67780b00f0 | ||
|
|
69322b84ce | ||
|
|
323b76cee4 | ||
|
|
84a61cd00b | ||
|
|
559e6e52f5 | ||
|
|
c7dd7b13a2 | ||
|
|
51bad0f8ae | ||
|
|
fa992a020c | ||
|
|
0bf757e42b | ||
|
|
c9179be1ed | ||
|
|
927561383e | ||
|
|
dfbfc9826a | ||
|
|
89a1d7c37c | ||
|
|
1abb381c7a | ||
|
|
bd10d14bbd | ||
|
|
57194facdc | ||
|
|
facdc9c46e | ||
|
|
bbbcdaa462 | ||
|
|
9bded61ca4 | ||
|
|
01b6a4b62e | ||
|
|
4d3926694d | ||
|
|
71388fc02a | ||
|
|
5517e21068 | ||
|
|
534560df8c | ||
|
|
8fb6ae379a | ||
|
|
9c6025f928 | ||
|
|
ac3254a5f5 | ||
|
|
2dc452b4a7 | ||
|
|
b6df9e9fe4 | ||
|
|
0f279b1187 | ||
|
|
cc8e693fb9 | ||
|
|
506653ff00 | ||
|
|
1a6b2a6429 | ||
|
|
bda7b3dffe | ||
|
|
03f5bbcaf2 | ||
|
|
2cf6172689 | ||
|
|
e8a8e462ed | ||
|
|
e182cc198d | ||
|
|
4797ed6edd | ||
|
|
f0d2fcfbe9 | ||
|
|
e3885625a0 | ||
|
|
cfce2529ad | ||
|
|
8105794121 | ||
|
|
28c4dc9be4 | ||
|
|
b199aad037 | ||
|
|
c3a23ffcdc | ||
|
|
c803ed28c3 | ||
|
|
f7b8c54c24 | ||
|
|
d7815ace4a | ||
|
|
b9f7aebde3 | ||
|
|
ccca6ba935 | ||
|
|
24235006f4 | ||
|
|
b8d50b10fb | ||
|
|
94dc7d07eb | ||
|
|
69a4057135 | ||
|
|
e4bdf1e78f | ||
|
|
f26fdbd8da | ||
|
|
ca2c25ece2 | ||
|
|
5a67940acc | ||
|
|
3ea379e4cd | ||
|
|
66c60c56a0 | ||
|
|
a62ccb5c4c | ||
|
|
40a1eddfd1 | ||
|
|
457195466d | ||
|
|
6b4ae4f30c | ||
|
|
99a347ee11 | ||
|
|
d30971fdc2 | ||
|
|
e746840226 | ||
|
|
08fcf958c2 | ||
|
|
26a4f32013 | ||
|
|
afde92d8cc | ||
|
|
243acef917 | ||
|
|
52d8fa2d0f | ||
|
|
ce8419fdd0 | ||
|
|
a724ebacd7 | ||
|
|
e2c51a977d | ||
|
|
59232a6ea8 | ||
|
|
72923134e9 | ||
|
|
03993d0b14 | ||
|
|
b6873a7b5d | ||
|
|
afae9eafbe | ||
|
|
c5fb39e21f | ||
|
|
1b9ae3fb51 | ||
|
|
c55e161dc4 | ||
|
|
b9e700b60d | ||
|
|
7c8bfac11b | ||
|
|
3bead3eb50 | ||
|
|
9a8715ec9a | ||
|
|
b69f679122 | ||
|
|
4b58d4ff95 | ||
|
|
9456a540c5 | ||
|
|
8e2e4c47d9 | ||
|
|
40750b44a0 | ||
|
|
53f3b76a84 | ||
|
|
12bd0ebd34 | ||
|
|
9ef5107157 | ||
|
|
87ec8a4ecb | ||
|
|
9d214d4903 | ||
|
|
3c55f3015f | ||
|
|
b951c7fb1e | ||
|
|
210868a832 | ||
|
|
d366a08ebb | ||
|
|
0c6509098a | ||
|
|
43e07efbc8 | ||
|
|
3a2dcc7298 | ||
|
|
d3153f47fa | ||
|
|
b1647f6d04 | ||
|
|
74cc834fec | ||
|
|
e3f51df3c2 | ||
|
|
a9a24062a5 | ||
|
|
4002e205cb | ||
|
|
e431d5dae4 | ||
|
|
14646f2524 | ||
|
|
a85ff884d9 | ||
|
|
083b28de8c | ||
|
|
9bdf118e0d | ||
|
|
6d97545b6b | ||
|
|
9fdd1753fa | ||
|
|
ef8370fb8e | ||
|
|
a5ea9f8830 | ||
|
|
5ae8de3c00 | ||
|
|
61e97ee4c8 | ||
|
|
c2da1c4580 | ||
|
|
9bf8c3e7b7 | ||
|
|
0fe756e42c | ||
|
|
7b46506822 | ||
|
|
175d74e68c | ||
|
|
9b6ce41b0e | ||
|
|
955144584d | ||
|
|
b975cbcbed | ||
|
|
272bf71279 | ||
|
|
06577d7299 | ||
|
|
b98613091c | ||
|
|
40bee97015 | ||
|
|
76c50d23f2 | ||
|
|
e210d95821 | ||
|
|
2db6a8ce8f | ||
|
|
820242bc49 | ||
|
|
6a96c9546d | ||
|
|
c763419043 | ||
|
|
4a472b74c7 | ||
|
|
41395d5443 | ||
|
|
ae8786ea6b | ||
|
|
9a28e7a4e0 | ||
|
|
66bdd20628 | ||
|
|
059f4b6a3a | ||
|
|
fd22159d0c | ||
|
|
c275c22928 | ||
|
|
182908d216 | ||
|
|
e549f2f443 | ||
|
|
6a74a4c12b | ||
|
|
0f83f87233 | ||
|
|
c825c9a945 | ||
|
|
b9f106f484 | ||
|
|
5d37f0471e | ||
|
|
7b6b36cee9 | ||
|
|
1fbb379536 | ||
|
|
ee4c4e5058 | ||
|
|
a4d4f54848 | ||
|
|
968cae6c17 | ||
|
|
8a0a78cbcc | ||
|
|
27aca49a1f | ||
|
|
c8dfef1583 | ||
|
|
a055dd39ac | ||
|
|
8131ad0fb6 | ||
|
|
740077a291 | ||
|
|
4e9457ca0c | ||
|
|
e94574196f | ||
|
|
271c798813 | ||
|
|
84ea10a78c | ||
|
|
508f2ebb76 | ||
|
|
98b7bd01cb | ||
|
|
02f0aa592d | ||
|
|
8639b037e1 | ||
|
|
de8cdbda15 | ||
|
|
be2cfeb5c3 | ||
|
|
f6ea36b4fa | ||
|
|
e14cb45b9b | ||
|
|
9ec672c70b | ||
|
|
79d5bc9beb | ||
|
|
48295793b0 | ||
|
|
e28e2d24c7 | ||
|
|
4c9400e646 | ||
|
|
b868328d51 | ||
|
|
c2272a755f | ||
|
|
3fc47275cf | ||
|
|
655aee44c4 | ||
|
|
229ca09b79 | ||
|
|
ffdf59a57c | ||
|
|
30320505fa | ||
|
|
bc2da4eaad | ||
|
|
c4f8da7359 | ||
|
|
3e97b3ae33 | ||
|
|
8e137e31cd | ||
|
|
81186e76b6 | ||
|
|
3057974f31 | ||
|
|
bfd883f533 | ||
|
|
da5b7e199a | ||
|
|
64cc76bd79 | ||
|
|
bf374705c6 | ||
|
|
9ce2f95f37 | ||
|
|
316854dc13 | ||
|
|
9136e02ed3 | ||
|
|
1d6735f0ec | ||
|
|
373ac90156 | ||
|
|
6f591376dd | ||
|
|
95d9c773d9 | ||
|
|
4ae04dd0a8 | ||
|
|
61f9b3c2cf | ||
|
|
b2ef5658b1 | ||
|
|
a7f0af41ab | ||
|
|
c7a2e1b2d4 | ||
|
|
0116b80795 | ||
|
|
d743a221e8 | ||
|
|
92edbd3e47 | ||
|
|
cabb70d90a | ||
|
|
ae24548216 | ||
|
|
85c20e1493 | ||
|
|
821b8a5517 | ||
|
|
491d898db8 | ||
|
|
5f60eb136e | ||
|
|
8b3b89ecf4 | ||
|
|
0524458069 | ||
|
|
a160b44e07 | ||
|
|
255e05beb5 | ||
|
|
912f0c7fde | ||
|
|
693b5d0838 | ||
|
|
50ddb20204 | ||
|
|
cc2622660b | ||
|
|
bdeda18b52 | ||
|
|
8eb70f9719 | ||
|
|
2f6d401db1 | ||
|
|
82d0d1c092 | ||
|
|
f831a1778b | ||
|
|
20e6b7a320 | ||
|
|
c38f7c96e7 | ||
|
|
698066d7e3 | ||
|
|
c5cfae7bac | ||
|
|
241ed5734e | ||
|
|
0209033dd9 | ||
|
|
f5ca701273 | ||
|
|
0526a91206 | ||
|
|
4be13b1a42 | ||
|
|
992efdc283 | ||
|
|
c7d812802f | ||
|
|
5074d290e4 | ||
|
|
d6e1333810 | ||
|
|
66a833796c | ||
|
|
32c43bf59a | ||
|
|
a6c7995b71 | ||
|
|
8048a8a39d | ||
|
|
2603f9a134 | ||
|
|
3bd2ec7b2e | ||
|
|
e589a31bc4 | ||
|
|
e4114799c3 | ||
|
|
59546a348a | ||
|
|
427ae1087f | ||
|
|
1c63f6cd85 | ||
|
|
3b38cc10de | ||
|
|
d446b19e72 | ||
|
|
e9bac02fec | ||
|
|
8b5d012200 | ||
|
|
fa8def5e70 | ||
|
|
5fc990d9e7 | ||
|
|
8d832e3231 | ||
|
|
1ed7b591b2 | ||
|
|
76238715e3 | ||
|
|
009b15c436 | ||
|
|
dd1b99cd0d | ||
|
|
25bb80da77 | ||
|
|
3a8128d309 | ||
|
|
2c8d25a110 | ||
|
|
12ee3a3c93 | ||
|
|
e79eac238e | ||
|
|
2f6bb01370 | ||
|
|
9209657f93 | ||
|
|
547e027899 | ||
|
|
087f475893 | ||
|
|
a69cb5e390 | ||
|
|
8938fac4fd | ||
|
|
139f425f4c | ||
|
|
8966ed9c82 | ||
|
|
0b8b302aa0 | ||
|
|
d8b604b550 | ||
|
|
56fe4c24b8 | ||
|
|
955db6e4be | ||
|
|
705b675d28 | ||
|
|
b46380e373 | ||
|
|
a90054aa16 | ||
|
|
362007e5d3 | ||
|
|
7ce0ec874a | ||
|
|
959cd60225 |
18
.gitignore
vendored
18
.gitignore
vendored
@@ -73,4 +73,20 @@ TAGS
|
||||
Makefile.local
|
||||
bin/.version
|
||||
compile.bat
|
||||
|
||||
addon-modules
|
||||
OpenSim/Data/Tests/test-results/
|
||||
OpenSim/Framework/Serialization/Tests/test-results/
|
||||
OpenSim/Framework/Servers/Tests/test-results/
|
||||
OpenSim/Framework/Tests/test-results/
|
||||
OpenSim/Region/ClientStack/Linden/Caps/test-results/
|
||||
OpenSim/Region/ClientStack/Linden/UDP/Tests/test-results/
|
||||
OpenSim/Region/CoreModules/test-results/
|
||||
OpenSim/Region/Framework/test-results/
|
||||
OpenSim/Region/OptionalModules/test-results/
|
||||
OpenSim/Region/Physics/BulletDotNETPlugin/
|
||||
OpenSim/Region/Physics/Manager/test-results/
|
||||
OpenSim/Region/Physics/OdePlugin/Tests/test-results/
|
||||
OpenSim/Region/ScriptEngine/test-results/
|
||||
OpenSim/Tests/Common/test-results/
|
||||
OpenSim/Tests/test-results/
|
||||
test-results/
|
||||
|
||||
@@ -38,52 +38,8 @@
|
||||
<include name=".hgignore"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- I don't think these targets are being actively used. But just in case, we'll just comment them out for now - justincc -->
|
||||
<!--
|
||||
<property name="projectdir" value="opensim-0.6.9" />
|
||||
<target name="dist" depends="distdir">
|
||||
<zip zipfile="${projectdir}.zip">
|
||||
<fileset basedir=".">
|
||||
<include name="${projectdir}/**" />
|
||||
</fileset>
|
||||
</zip>
|
||||
<tar destfile="${projectdir}.tar.gz" compression="GZip">
|
||||
<fileset basedir=".">
|
||||
<include name="${projectdir}/**" />
|
||||
</fileset>
|
||||
</tar>
|
||||
</target>
|
||||
|
||||
<target name="distdir">
|
||||
<delete dir="${projectdir}" />
|
||||
<copy todir="${projectdir}">
|
||||
<fileset basedir=".">
|
||||
<include name="ThirdPartyLicenses/**" />
|
||||
<include name="CONTRIBUTORS.txt" />
|
||||
<include name="README" />
|
||||
<include name="OpenSim/**/*.cs" />
|
||||
<include name="**/*.build" />
|
||||
<include name="**/*.csproj" />
|
||||
<include name="**/*.csproj.user" />
|
||||
<include name="**/*.sln" />
|
||||
<include name="bin/*.dll" />
|
||||
<include name="bin/*.so" />
|
||||
<include name="bin/*.config" />
|
||||
<include name="bin/assets/**" />
|
||||
<include name="bin/data/**" />
|
||||
<include name="bin/OpenSim*xml" />
|
||||
<include name="bin/OpenSim.ini" />
|
||||
<include name="bin/defaultstripe.png" />
|
||||
<exclude name="bin/OpenSim.*dll" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<touch file="${projectdir}/bin/startup_commands.txt" />
|
||||
</target>
|
||||
-->
|
||||
|
||||
<target name="test" depends="build, find-nunit">
|
||||
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
||||
|
||||
@@ -112,12 +68,15 @@
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.serialization.tests)==0}" />
|
||||
|
||||
<!--
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindencaps.tests">
|
||||
<arg value="./bin/OpenSim.Region.ClientStack.LindenCaps.Tests.dll" />
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindencaps.tests)==0}" />
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
|
||||
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
|
||||
-->
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.scriptengine.tests">
|
||||
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
|
||||
@@ -144,117 +103,23 @@
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
||||
|
||||
<delete dir="%temp%"/>
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.capabilities.handlers.tests">
|
||||
<arg value="./bin/OpenSim.Capabilities.Handlers.Tests.dll" />
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" />
|
||||
|
||||
<delete dir="%temp%"/>
|
||||
</target>
|
||||
|
||||
<target name="test-cov" depends="build">
|
||||
<!-- Code Coverage Test. Prototype, only works with mono 1.2. Instructions in http://opensimulator.org/wiki/Automated_Testing -->
|
||||
<mkdir dir="cov" failonerror="false" />
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Framework.Servers.cov,+[OpenSim.Framework.Servers]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Framework.Servers" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Framework.Servers ./cov/OpenSim.Framework.Servers.cov" />
|
||||
</exec>
|
||||
<target name="torture" depends="build, find-nunit">
|
||||
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
||||
|
||||
<!--
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ClientStack.LindenUDP.cov,+[OpenSim.Region.ClientStack.LindenUDP]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.ClientStack.LindenUDP" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.ClientStack.LindenUDP ./cov/OpenSim.Region.ClientStack.LindenUDP.cov" />
|
||||
</exec>
|
||||
-->
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.cov,+[OpenSim.Region.ScriptEngine.Shared]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared ./cov/OpenSim.Region.ScriptEngine.Shared.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov,+[OpenSim.Region.ScriptEngine.Shared.CodeTools]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools ./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.CoreModules.cov,+[OpenSim.Region.CoreModules]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.CoreModules" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.OptionalModules.cov,+[OpenSim.Region.OptionalModules]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.OptionalModules" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.OptionalModules ./cov/OpenSim.Region.OptionalModules.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Region.Framework" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Region.Framework ./cov/OpenSim.Region.Framework.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.SQLite.cov,+[OpenSim.Data.SQLite]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Data.SQLite" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Data.SQLite ./cov/OpenSim.Data.SQLite.cov" />
|
||||
</exec>
|
||||
|
||||
<exec program="mono">
|
||||
<arg value="--debug" />
|
||||
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.MySQL.cov,+[OpenSim.Data.MySQL.Tests]" />
|
||||
<arg value="/usr/lib/nunit/nunit-console.exe" />
|
||||
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
|
||||
</exec>
|
||||
<delete dir="./cov/OpenSim.Data.MySQL" />
|
||||
<exec program="monocov">
|
||||
<arg value="--export-html=./cov/OpenSim.Data.MySQL ./cov/OpenSim.Data.MySQL.cov" />
|
||||
</exec>
|
||||
|
||||
<delete file="C:\NUnitPrimaryTrace.txt" failonerror="false" />
|
||||
<delete file="TestResult.xml" failonerror="false" />
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.torture">
|
||||
<arg value="./bin/OpenSim.Tests.Torture.dll" />
|
||||
</exec>
|
||||
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.torture)==0}" />
|
||||
<delete dir="%temp%"/>
|
||||
</target>
|
||||
|
||||
<target name="find-nunit">
|
||||
@@ -267,15 +132,12 @@
|
||||
if="${int::parse(hasnunit2)==0}" />
|
||||
<property name="nunitcmd" value="nunit-console"
|
||||
if="${int::parse(hasnunit2)==1}" />
|
||||
|
||||
</target>
|
||||
|
||||
<!-- this is used for panda test execution -->
|
||||
<!-- work in progress -->
|
||||
|
||||
<target name="test-xml" depends="build, find-nunit">
|
||||
|
||||
|
||||
<mkdir dir="test-results" failonerror="false" />
|
||||
<!-- Unit Test Assembly -->
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests">
|
||||
@@ -298,12 +160,15 @@
|
||||
<arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<!--
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindencaps.tests">
|
||||
<arg value="./bin/OpenSim.Region.ClientStack.LindenCaps.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenCaps.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
|
||||
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
-->
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests">
|
||||
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
|
||||
@@ -330,45 +195,22 @@
|
||||
<arg value="-xml=test-results/OpenSim.Data.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.capabilities.handlers.tests">
|
||||
<arg value="./bin/OpenSim.Capabilities.Handlers.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Capabilities.Handlers.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" />
|
||||
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.optionalmodules.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
||||
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" />
|
||||
</target>
|
||||
<!-- <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> -->
|
||||
<!-- <arg value="AcceptanceTestAssembly.dll" /> -->
|
||||
<!-- <arg value="/xml=AcceptanceTestAssembly-Results.xml" /> -->
|
||||
<!-- </exec> -->
|
||||
|
||||
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" /> -->
|
||||
<!-- <fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" /> -->
|
||||
<!-- </target> -->
|
||||
|
||||
|
||||
|
||||
<!-- <nunit2 failonerror="true" verbose="true"> -->
|
||||
<!-- <formatter type="Xml" usefile="true" extension=".xml" outputdir="./test-results" /> -->
|
||||
<!-- <test> -->
|
||||
<!-- <assemblies> -->
|
||||
<!-- <include name="./bin/OpenSim.Framework.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Region.OptionalModules.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
|
||||
<!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
|
||||
<!-- </assemblies> -->
|
||||
<!-- </test> -->
|
||||
<!-- </nunit2> -->
|
||||
<!-- </target> -->
|
||||
|
||||
<target name="doxygen">
|
||||
<exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />
|
||||
|
||||
13
BUILDING.txt
13
BUILDING.txt
@@ -12,18 +12,27 @@ Steps:
|
||||
=== Building on Linux ===
|
||||
|
||||
Prereqs:
|
||||
* Mono >= 2.4.2
|
||||
* Mono >= 2.4.3
|
||||
* Nant >= 0.85
|
||||
* On some Linux distributions you may need to install additional packages.
|
||||
See http://opensimulator.org/wiki/Dependencies for more information.
|
||||
|
||||
* May also use xbuild (included in mono distributions)
|
||||
* May use Monodevelop, a cross-platform IDE
|
||||
|
||||
From the distribution type:
|
||||
* ./runprebuild.sh
|
||||
* nant
|
||||
* nant (or xbuild)
|
||||
* cd bin
|
||||
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
|
||||
* run mono OpenSim.exe
|
||||
|
||||
=== Using Monodevelop ===
|
||||
|
||||
From the distribution type:
|
||||
* ./runprebuild.sh
|
||||
* type monodevelop OpenSim.sln
|
||||
|
||||
=== References ===
|
||||
|
||||
Helpful resources:
|
||||
|
||||
@@ -14,6 +14,7 @@ people that make the day to day of OpenSim happen.
|
||||
* Marck
|
||||
* Mic Bowman (Intel)
|
||||
* BlueWall (James Hughes)
|
||||
* Nebadon Izumi (Michael Cerquoni, OSgrid)
|
||||
* Snoopy Pfeffer
|
||||
* Richard Adams (Intel)
|
||||
|
||||
@@ -79,9 +80,11 @@ what it is today.
|
||||
* dmiles (Daxtron Labs)
|
||||
* dslake (Intel)
|
||||
* FredoChaplin
|
||||
* Garmin Kawaguichi
|
||||
* Gerhard
|
||||
* Godfrey
|
||||
* Grumly57
|
||||
* GuduleLapointe
|
||||
* Ewe Loon
|
||||
* Fly-Man
|
||||
* Flyte Xevious
|
||||
@@ -102,6 +105,7 @@ what it is today.
|
||||
* lulurun
|
||||
* M.Igarashi
|
||||
* maimedleech
|
||||
* Mana Janus
|
||||
* Mic Bowman
|
||||
* Michelle Argus
|
||||
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
|
||||
@@ -133,6 +137,7 @@ what it is today.
|
||||
* Salahzar Stenvaag
|
||||
* sempuki
|
||||
* SignpostMarv
|
||||
* SpotOn3D
|
||||
* Strawberry Fride
|
||||
* tglion
|
||||
* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
||||
|
||||
Rest.main.SceneManager.ForEachScene(delegate(Scene s)
|
||||
{
|
||||
s.ForEachScenePresence(delegate(ScenePresence sp)
|
||||
s.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
if (sp.Firstname == names[0] && sp.Lastname == names[1])
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
{
|
||||
#region GET methods
|
||||
public string GetHandler(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// foreach (string h in httpRequest.Headers.AllKeys)
|
||||
// foreach (string v in httpRequest.Headers.GetValues(h))
|
||||
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
}
|
||||
}
|
||||
|
||||
public string GetHandlerRegions(OSHttpResponse httpResponse)
|
||||
public string GetHandlerRegions(IOSHttpResponse httpResponse)
|
||||
{
|
||||
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
return rxw.ToString();
|
||||
}
|
||||
|
||||
public string GetHandlerRegion(OSHttpResponse httpResponse, string param)
|
||||
public string GetHandlerRegion(IOSHttpResponse httpResponse, string param)
|
||||
{
|
||||
// be resilient and don't get confused by a terminating '/'
|
||||
param = param.TrimEnd(new char[]{'/'});
|
||||
@@ -180,7 +180,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
}
|
||||
#endregion GET methods
|
||||
|
||||
protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene)
|
||||
protected string RegionTerrain(IOSHttpResponse httpResponse, Scene scene)
|
||||
{
|
||||
httpResponse.SendChunked = true;
|
||||
httpResponse.ContentType = "text/xml";
|
||||
@@ -190,7 +190,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
// "GET", "terrain not implemented");
|
||||
}
|
||||
|
||||
protected string RegionStats(OSHttpResponse httpResponse, Scene scene)
|
||||
protected string RegionStats(IOSHttpResponse httpResponse, Scene scene)
|
||||
{
|
||||
int users = scene.GetRootAgentCount();
|
||||
int objects = scene.Entities.Count - users;
|
||||
@@ -213,7 +213,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
return rxw.ToString();
|
||||
}
|
||||
|
||||
protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
|
||||
protected string RegionPrims(IOSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
|
||||
{
|
||||
httpResponse.SendChunked = true;
|
||||
httpResponse.ContentType = "text/xml";
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
{
|
||||
#region GET methods
|
||||
public string GetRegionInfoHandler(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// foreach (string h in httpRequest.Headers.AllKeys)
|
||||
// foreach (string v in httpRequest.Headers.GetValues(h))
|
||||
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
}
|
||||
}
|
||||
|
||||
public string GetRegionInfoHandlerRegions(OSHttpResponse httpResponse)
|
||||
public string GetRegionInfoHandlerRegions(IOSHttpResponse httpResponse)
|
||||
{
|
||||
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
#region POST methods
|
||||
|
||||
public string PostHandler(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// foreach (string h in httpRequest.Headers.AllKeys)
|
||||
// foreach (string v in httpRequest.Headers.GetValues(h))
|
||||
@@ -92,7 +92,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
}
|
||||
}
|
||||
|
||||
public string CreateRegion(OSHttpRequest request, OSHttpResponse response)
|
||||
public string CreateRegion(IOSHttpRequest request, IOSHttpResponse response)
|
||||
{
|
||||
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
return rxw.ToString();
|
||||
}
|
||||
|
||||
public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene)
|
||||
public string LoadPrims(string requestBody, IOSHttpRequest request, IOSHttpResponse response, Scene scene)
|
||||
{
|
||||
IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
|
||||
if (serialiser != null)
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
/// </summary>
|
||||
/// <param name="request">HTTP request header</param>
|
||||
/// <returns>true when the HTTP request came from god.</returns>
|
||||
protected bool IsGod(OSHttpRequest request)
|
||||
protected bool IsGod(IOSHttpRequest request)
|
||||
{
|
||||
string[] keys = request.Headers.GetValues("X-OpenSim-Godkey");
|
||||
if (null == keys) return false;
|
||||
@@ -342,7 +342,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
/// HTTP header is indeed the password on file for the avatar
|
||||
/// specified by the UUID
|
||||
/// </summary>
|
||||
protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid)
|
||||
protected bool IsVerifiedUser(IOSHttpRequest request, UUID uuid)
|
||||
{
|
||||
// XXX under construction
|
||||
return false;
|
||||
@@ -377,7 +377,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
/// <param name="message">failure message</param>
|
||||
/// <remarks>This should probably set a return code as
|
||||
/// well. (?)</remarks>
|
||||
protected string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
||||
protected string Failure(IOSHttpResponse response, OSHttpStatusCode status,
|
||||
string method, string format, params string[] msg)
|
||||
{
|
||||
string m = String.Format(format, msg);
|
||||
@@ -396,7 +396,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
/// <param name="e">exception causing the failure message</param>
|
||||
/// <remarks>This should probably set a return code as
|
||||
/// well. (?)</remarks>
|
||||
public string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
||||
public string Failure(IOSHttpResponse response, OSHttpStatusCode status,
|
||||
string method, Exception e)
|
||||
{
|
||||
string m = String.Format("exception occurred: {0}", e.Message);
|
||||
|
||||
@@ -98,14 +98,17 @@ namespace OpenSim.Framework.Capabilities
|
||||
{
|
||||
get { return m_httpListener.UseSSL; }
|
||||
}
|
||||
|
||||
public string SSLCommonName
|
||||
{
|
||||
get { return m_httpListener.SSLCommonName; }
|
||||
}
|
||||
|
||||
public CapsHandlers CapsHandlers
|
||||
{
|
||||
get { return m_capsHandlers; }
|
||||
}
|
||||
|
||||
public Dictionary<string, string> ExternalCapsHandlers
|
||||
{
|
||||
get { return m_externalCapsHandlers; }
|
||||
@@ -157,11 +160,7 @@ namespace OpenSim.Framework.Capabilities
|
||||
|
||||
/// <summary>
|
||||
/// Remove all CAPS service handlers.
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="httpListener"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="restMethod"></param>
|
||||
public void DeregisterHandlers()
|
||||
{
|
||||
if (m_capsHandlers != null)
|
||||
|
||||
@@ -51,11 +51,10 @@ namespace OpenSim.Framework.Capabilities
|
||||
/// supplied BaseHttpServer.
|
||||
/// </summary>
|
||||
/// <param name="httpListener">base HTTP server</param>
|
||||
/// <param name="httpListenerHostname">host name of the HTTP
|
||||
/// server</param>
|
||||
/// <param name="httpListenerHostname">host name of the HTTP server</param>
|
||||
/// <param name="httpListenerPort">HTTP port</param>
|
||||
public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort)
|
||||
: this (httpListener,httpListenerHostname,httpListenerPort, false)
|
||||
: this(httpListener,httpListenerHostname,httpListenerPort, false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -88,44 +87,52 @@ namespace OpenSim.Framework.Capabilities
|
||||
/// handler to be removed</param>
|
||||
public void Remove(string capsName)
|
||||
{
|
||||
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
|
||||
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
|
||||
m_capsHandlers.Remove(capsName);
|
||||
lock (m_capsHandlers)
|
||||
{
|
||||
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
|
||||
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
|
||||
m_capsHandlers.Remove(capsName);
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContainsCap(string cap)
|
||||
{
|
||||
return m_capsHandlers.ContainsKey(cap);
|
||||
lock (m_capsHandlers)
|
||||
return m_capsHandlers.ContainsKey(cap);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The indexer allows us to treat the CapsHandlers object
|
||||
/// in an intuitive dictionary like way.
|
||||
/// </summary>
|
||||
/// <Remarks>
|
||||
/// <remarks>
|
||||
/// The indexer will throw an exception when you try to
|
||||
/// retrieve a cap handler for a cap that is not contained in
|
||||
/// CapsHandlers.
|
||||
/// </Remarks>
|
||||
/// </remarks>
|
||||
public IRequestHandler this[string idx]
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_capsHandlers[idx];
|
||||
lock (m_capsHandlers)
|
||||
return m_capsHandlers[idx];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (m_capsHandlers.ContainsKey(idx))
|
||||
lock (m_capsHandlers)
|
||||
{
|
||||
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
|
||||
m_capsHandlers.Remove(idx);
|
||||
if (m_capsHandlers.ContainsKey(idx))
|
||||
{
|
||||
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
|
||||
m_capsHandlers.Remove(idx);
|
||||
}
|
||||
|
||||
if (null == value) return;
|
||||
|
||||
m_capsHandlers[idx] = value;
|
||||
m_httpListener.AddStreamHandler(value);
|
||||
}
|
||||
|
||||
if (null == value) return;
|
||||
|
||||
m_capsHandlers[idx] = value;
|
||||
m_httpListener.AddStreamHandler(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,9 +144,12 @@ namespace OpenSim.Framework.Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
string[] __keys = new string[m_capsHandlers.Keys.Count];
|
||||
m_capsHandlers.Keys.CopyTo(__keys, 0);
|
||||
return __keys;
|
||||
lock (m_capsHandlers)
|
||||
{
|
||||
string[] __keys = new string[m_capsHandlers.Keys.Count];
|
||||
m_capsHandlers.Keys.CopyTo(__keys, 0);
|
||||
return __keys;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,25 +157,29 @@ namespace OpenSim.Framework.Capabilities
|
||||
/// Return an LLSD-serializable Hashtable describing the
|
||||
/// capabilities and their handler details.
|
||||
/// </summary>
|
||||
public Hashtable CapsDetails
|
||||
/// <param name="excludeSeed">If true, then exclude the seed cap.</param>
|
||||
public Hashtable GetCapsDetails(bool excludeSeed)
|
||||
{
|
||||
get
|
||||
{
|
||||
Hashtable caps = new Hashtable();
|
||||
string protocol = "http://";
|
||||
|
||||
if (m_useSSL)
|
||||
protocol = "https://";
|
||||
Hashtable caps = new Hashtable();
|
||||
string protocol = "http://";
|
||||
|
||||
if (m_useSSL)
|
||||
protocol = "https://";
|
||||
|
||||
string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
|
||||
string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
|
||||
|
||||
lock (m_capsHandlers)
|
||||
{
|
||||
foreach (string capsName in m_capsHandlers.Keys)
|
||||
{
|
||||
// skip SEED cap
|
||||
if ("SEED" == capsName) continue;
|
||||
if (excludeSeed && "SEED" == capsName)
|
||||
continue;
|
||||
|
||||
caps[capsName] = baseUrl + m_capsHandlers[capsName].Path;
|
||||
}
|
||||
return caps;
|
||||
}
|
||||
|
||||
return caps;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
|
||||
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||
|
||||
namespace OpenSim.Capabilities.Handlers
|
||||
{
|
||||
public class FetchInventory2Handler
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IInventoryService m_inventoryService;
|
||||
|
||||
public FetchInventory2Handler(IInventoryService invService)
|
||||
{
|
||||
m_inventoryService = invService;
|
||||
}
|
||||
|
||||
public string FetchInventoryRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// m_log.DebugFormat("[FETCH INVENTORY HANDLER]: Received FetchInventory capabilty request");
|
||||
|
||||
OSDMap requestmap = (OSDMap)OSDParser.DeserializeLLSDXml(Utils.StringToBytes(request));
|
||||
OSDArray itemsRequested = (OSDArray)requestmap["items"];
|
||||
|
||||
string reply;
|
||||
LLSDFetchInventory llsdReply = new LLSDFetchInventory();
|
||||
|
||||
foreach (OSDMap osdItemId in itemsRequested)
|
||||
{
|
||||
UUID itemId = osdItemId["item_id"].AsUUID();
|
||||
|
||||
InventoryItemBase item = m_inventoryService.GetItem(new InventoryItemBase(itemId));
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
// We don't know the agent that this request belongs to so we'll use the agent id of the item
|
||||
// which will be the same for all items.
|
||||
llsdReply.agent_id = item.Owner;
|
||||
|
||||
llsdReply.items.Array.Add(ConvertInventoryItem(item));
|
||||
}
|
||||
}
|
||||
|
||||
reply = LLSDHelpers.SerialiseLLSDReply(llsdReply);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an internal inventory item object into an LLSD object.
|
||||
/// </summary>
|
||||
/// <param name="invItem"></param>
|
||||
/// <returns></returns>
|
||||
private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
|
||||
{
|
||||
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
|
||||
llsdItem.asset_id = invItem.AssetID;
|
||||
llsdItem.created_at = invItem.CreationDate;
|
||||
llsdItem.desc = invItem.Description;
|
||||
llsdItem.flags = (int)invItem.Flags;
|
||||
llsdItem.item_id = invItem.ID;
|
||||
llsdItem.name = invItem.Name;
|
||||
llsdItem.parent_id = invItem.Folder;
|
||||
|
||||
try
|
||||
{
|
||||
llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType);
|
||||
llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}",
|
||||
invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
|
||||
}
|
||||
|
||||
llsdItem.permissions = new LLSDPermissions();
|
||||
llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
|
||||
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
|
||||
llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
|
||||
llsdItem.permissions.group_id = invItem.GroupID;
|
||||
llsdItem.permissions.group_mask = (int)invItem.GroupPermissions;
|
||||
llsdItem.permissions.is_owner_group = invItem.GroupOwned;
|
||||
llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions;
|
||||
llsdItem.permissions.owner_id = invItem.Owner;
|
||||
llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions;
|
||||
llsdItem.sale_info = new LLSDSaleInfo();
|
||||
llsdItem.sale_info.sale_price = invItem.SalePrice;
|
||||
switch (invItem.SaleType)
|
||||
{
|
||||
default:
|
||||
llsdItem.sale_info.sale_type = "not";
|
||||
break;
|
||||
case 1:
|
||||
llsdItem.sale_info.sale_type = "original";
|
||||
break;
|
||||
case 2:
|
||||
llsdItem.sale_info.sale_type = "copy";
|
||||
break;
|
||||
case 3:
|
||||
llsdItem.sale_info.sale_type = "contents";
|
||||
break;
|
||||
}
|
||||
|
||||
return llsdItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using Nini.Config;
|
||||
using OpenSim.Server.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Server.Handlers.Base;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Capabilities.Handlers
|
||||
{
|
||||
public class FetchInventory2ServerConnector : ServiceConnector
|
||||
{
|
||||
private IInventoryService m_InventoryService;
|
||||
private string m_ConfigName = "CapsService";
|
||||
|
||||
public FetchInventory2ServerConnector(IConfigSource config, IHttpServer server, string configName)
|
||||
: base(config, server, configName)
|
||||
{
|
||||
if (configName != String.Empty)
|
||||
m_ConfigName = configName;
|
||||
|
||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||
if (serverConfig == null)
|
||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
||||
|
||||
string invService = serverConfig.GetString("InventoryService", String.Empty);
|
||||
|
||||
if (invService == String.Empty)
|
||||
throw new Exception("No InventoryService in config file");
|
||||
|
||||
Object[] args = new Object[] { config };
|
||||
m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args);
|
||||
|
||||
if (m_InventoryService == null)
|
||||
throw new Exception(String.Format("Failed to load InventoryService from {0}; config is {1}", invService, m_ConfigName));
|
||||
|
||||
FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService);
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler("POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest);
|
||||
server.AddStreamHandler(reqHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
m_assetService = assService;
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// Try to parse the texture ID from the request URL
|
||||
NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
|
||||
@@ -111,6 +111,10 @@ namespace OpenSim.Capabilities.Handlers
|
||||
m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url);
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}",
|
||||
// textureID, httpResponse.StatusCode, httpResponse.ContentLength);
|
||||
|
||||
httpResponse.Send();
|
||||
return null;
|
||||
}
|
||||
@@ -123,7 +127,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
/// <param name="textureID"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns>False for "caller try another codec"; true otherwise</returns>
|
||||
private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format)
|
||||
private bool FetchTexture(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID textureID, string format)
|
||||
{
|
||||
// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
|
||||
AssetBase texture;
|
||||
@@ -207,38 +211,43 @@ namespace OpenSim.Capabilities.Handlers
|
||||
return true;
|
||||
}
|
||||
|
||||
private void WriteTextureData(OSHttpRequest request, OSHttpResponse response, AssetBase texture, string format)
|
||||
private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format)
|
||||
{
|
||||
string range = request.Headers.GetOne("Range");
|
||||
//m_log.DebugFormat("[GETTEXTURE]: Range {0}", range);
|
||||
|
||||
if (!String.IsNullOrEmpty(range)) // JP2's only
|
||||
{
|
||||
// Range request
|
||||
int start, end;
|
||||
if (TryParseRange(range, out start, out end))
|
||||
{
|
||||
|
||||
// Before clamping start make sure we can satisfy it in order to avoid
|
||||
// sending back the last byte instead of an error status
|
||||
if (start >= texture.Data.Length)
|
||||
{
|
||||
response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = Utils.Clamp(end, 0, texture.Data.Length - 1);
|
||||
start = Utils.Clamp(start, 0, end);
|
||||
int len = end - start + 1;
|
||||
|
||||
end = Utils.Clamp(end, 0, texture.Data.Length - 1);
|
||||
start = Utils.Clamp(start, 0, end);
|
||||
int len = end - start + 1;
|
||||
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
||||
|
||||
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
|
||||
|
||||
if (len < texture.Data.Length)
|
||||
// Always return PartialContent, even if the range covered the entire data length
|
||||
// We were accidentally sending back 404 before in this situation
|
||||
// https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the
|
||||
// entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this.
|
||||
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
|
||||
|
||||
response.ContentLength = len;
|
||||
response.ContentType = texture.Metadata.ContentType;
|
||||
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
|
||||
|
||||
response.Body.Write(texture.Data, start, len);
|
||||
response.ContentLength = len;
|
||||
response.ContentType = texture.Metadata.ContentType;
|
||||
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
|
||||
|
||||
response.Body.Write(texture.Data, start, len);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -257,6 +266,15 @@ namespace OpenSim.Capabilities.Handlers
|
||||
response.ContentType = "image/" + format;
|
||||
response.Body.Write(texture.Data, 0, texture.Data.Length);
|
||||
}
|
||||
|
||||
// if (response.StatusCode < 200 || response.StatusCode > 299)
|
||||
// m_log.WarnFormat(
|
||||
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
|
||||
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
|
||||
// else
|
||||
// m_log.DebugFormat(
|
||||
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
|
||||
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
|
||||
}
|
||||
|
||||
private bool TryParseRange(string header, out int start, out int end)
|
||||
@@ -275,7 +293,6 @@ namespace OpenSim.Capabilities.Handlers
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private byte[] ConvertTextureData(AssetBase texture, string format)
|
||||
{
|
||||
m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format);
|
||||
@@ -350,7 +367,5 @@ namespace OpenSim.Capabilities.Handlers
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using log4net;
|
||||
using log4net.Config;
|
||||
using NUnit.Framework;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Tests.Common;
|
||||
using OpenSim.Tests.Common.Mock;
|
||||
|
||||
namespace OpenSim.Capabilities.Handlers.GetTexture.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class GetTextureHandlerTests
|
||||
{
|
||||
[Test]
|
||||
public void TestTextureNotFound()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
// Overkill - we only really need the asset service, not a whole scene.
|
||||
Scene scene = SceneHelpers.SetupScene();
|
||||
|
||||
GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService);
|
||||
TestOSHttpRequest req = new TestOSHttpRequest();
|
||||
TestOSHttpResponse resp = new TestOSHttpResponse();
|
||||
req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012");
|
||||
handler.Handle(null, null, req, resp);
|
||||
Assert.That(resp.StatusCode, Is.EqualTo((int)System.Net.HttpStatusCode.NotFound));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
|
||||
namespace OpenSim.Capabilities.Handlers
|
||||
{
|
||||
public class UploadBakedTextureHandler
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Caps m_HostCapsObj;
|
||||
private IAssetService m_assetService;
|
||||
private bool m_persistBakedTextures;
|
||||
|
||||
public UploadBakedTextureHandler(Caps caps, IAssetService assetService, bool persistBakedTextures)
|
||||
{
|
||||
m_HostCapsObj = caps;
|
||||
m_assetService = assetService;
|
||||
m_persistBakedTextures = persistBakedTextures;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle a request from the client for a Uri to upload a baked texture.
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="httpRequest"></param>
|
||||
/// <param name="httpResponse"></param>
|
||||
/// <returns>The upload response if the request is successful, null otherwise.</returns>
|
||||
public string UploadBakedTexture(
|
||||
string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
try
|
||||
{
|
||||
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
|
||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||
|
||||
BakedTextureUploader uploader =
|
||||
new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
|
||||
uploader.OnUpLoad += BakedTextureUploaded;
|
||||
|
||||
m_HostCapsObj.HttpListener.AddStreamHandler(
|
||||
new BinaryStreamHandler("POST", capsBase + uploaderPath,
|
||||
uploader.uploaderCaps));
|
||||
|
||||
string protocol = "http://";
|
||||
|
||||
if (m_HostCapsObj.SSLCaps)
|
||||
protocol = "https://";
|
||||
|
||||
string uploaderURL = protocol + m_HostCapsObj.HostName + ":" +
|
||||
m_HostCapsObj.Port.ToString() + capsBase + uploaderPath;
|
||||
|
||||
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
|
||||
uploadResponse.uploader = uploaderURL;
|
||||
uploadResponse.state = "upload";
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[UPLOAD BAKED TEXTURE HANDLER]: {0}{1}", e.Message, e.StackTrace);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a baked texture has been successfully uploaded by a client.
|
||||
/// </summary>
|
||||
/// <param name="assetID"></param>
|
||||
/// <param name="data"></param>
|
||||
private void BakedTextureUploaded(UUID assetID, byte[] data)
|
||||
{
|
||||
// m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
|
||||
|
||||
AssetBase asset;
|
||||
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
|
||||
asset.Data = data;
|
||||
asset.Temporary = true;
|
||||
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
|
||||
m_assetService.Store(asset);
|
||||
}
|
||||
}
|
||||
|
||||
class BakedTextureUploader
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event Action<UUID, byte[]> OnUpLoad;
|
||||
|
||||
private string uploaderPath = String.Empty;
|
||||
private UUID newAssetID;
|
||||
private IHttpServer httpListener;
|
||||
|
||||
public BakedTextureUploader(string path, IHttpServer httpServer)
|
||||
{
|
||||
newAssetID = UUID.Random();
|
||||
uploaderPath = path;
|
||||
httpListener = httpServer;
|
||||
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle raw uploaded baked texture data.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public string uploaderCaps(byte[] data, string path, string param)
|
||||
{
|
||||
Action<UUID, byte[]> handlerUpLoad = OnUpLoad;
|
||||
|
||||
// Don't do this asynchronously, otherwise it's possible for the client to send set appearance information
|
||||
// on another thread which might send out avatar updates before the asset has been put into the asset
|
||||
// service.
|
||||
if (handlerUpLoad != null)
|
||||
handlerUpLoad(newAssetID, data);
|
||||
|
||||
string res = String.Empty;
|
||||
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
||||
uploadComplete.new_asset = newAssetID.ToString();
|
||||
uploadComplete.new_inventory_item = UUID.Zero;
|
||||
uploadComplete.state = "complete";
|
||||
|
||||
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
||||
|
||||
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
||||
|
||||
// m_log.DebugFormat("[BAKED TEXTURE UPLOADER]: baked texture upload completed for {0}", newAssetID);
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
|
||||
namespace OpenSim.Capabilities.Handlers
|
||||
{
|
||||
|
||||
public class WebFetchInvDescHandler
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
@@ -50,7 +49,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
|
||||
private IInventoryService m_InventoryService;
|
||||
private ILibraryService m_LibraryService;
|
||||
private object m_fetchLock = new Object();
|
||||
// private object m_fetchLock = new Object();
|
||||
|
||||
public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService)
|
||||
{
|
||||
@@ -58,39 +57,42 @@ namespace OpenSim.Capabilities.Handlers
|
||||
m_LibraryService = libService;
|
||||
}
|
||||
|
||||
public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// nasty temporary hack here, the linden client falsely
|
||||
// identifies the uuid 00000000-0000-0000-0000-000000000000
|
||||
// as a string which breaks us
|
||||
//
|
||||
// correctly mark it as a uuid
|
||||
//
|
||||
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
|
||||
// lock (m_fetchLock)
|
||||
// {
|
||||
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request {0}", request);
|
||||
|
||||
// nasty temporary hack here, the linden client falsely
|
||||
// identifies the uuid 00000000-0000-0000-0000-000000000000
|
||||
// as a string which breaks us
|
||||
//
|
||||
// correctly mark it as a uuid
|
||||
//
|
||||
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
|
||||
|
||||
// another hack <integer>1</integer> results in a
|
||||
// System.ArgumentException: Object type System.Int32 cannot
|
||||
// be converted to target type: System.Boolean
|
||||
//
|
||||
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
|
||||
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
try
|
||||
{
|
||||
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
||||
}
|
||||
catch (LLSD.LLSDParseException e)
|
||||
{
|
||||
m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace);
|
||||
m_log.Error("Request: " + request);
|
||||
}
|
||||
|
||||
ArrayList foldersrequested = (ArrayList)hash["folders"];
|
||||
|
||||
string response = "";
|
||||
|
||||
// another hack <integer>1</integer> results in a
|
||||
// System.ArgumentException: Object type System.Int32 cannot
|
||||
// be converted to target type: System.Boolean
|
||||
//
|
||||
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
|
||||
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
try
|
||||
{
|
||||
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
||||
}
|
||||
catch (LLSD.LLSDParseException pe)
|
||||
{
|
||||
m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
|
||||
m_log.Error("Request: " + request.ToString());
|
||||
}
|
||||
|
||||
ArrayList foldersrequested = (ArrayList)hash["folders"];
|
||||
|
||||
string response = "";
|
||||
lock (m_fetchLock)
|
||||
{
|
||||
for (int i = 0; i < foldersrequested.Count; i++)
|
||||
{
|
||||
string inventoryitemstr = "";
|
||||
@@ -104,7 +106,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Debug("[CAPS]: caught exception doing OSD deserialize" + e);
|
||||
m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e);
|
||||
}
|
||||
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
|
||||
|
||||
@@ -115,7 +117,6 @@ namespace OpenSim.Capabilities.Handlers
|
||||
response += inventoryitemstr;
|
||||
}
|
||||
|
||||
|
||||
if (response.Length == 0)
|
||||
{
|
||||
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
|
||||
@@ -129,11 +130,12 @@ namespace OpenSim.Capabilities.Handlers
|
||||
response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
|
||||
}
|
||||
|
||||
//m_log.DebugFormat("[CAPS]: Replying to CAPS fetch inventory request with following xml");
|
||||
//m_log.Debug("[CAPS] "+response);
|
||||
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request");
|
||||
//m_log.Debug("[WEB FETCH INV DESC HANDLER] "+response);
|
||||
|
||||
}
|
||||
return response;
|
||||
return response;
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -155,7 +157,10 @@ namespace OpenSim.Capabilities.Handlers
|
||||
inv.Items = new List<InventoryItemBase>();
|
||||
int version = 0;
|
||||
|
||||
inv = Fetch(invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version);
|
||||
inv
|
||||
= Fetch(
|
||||
invFetch.owner_id, invFetch.folder_id, invFetch.owner_id,
|
||||
invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version);
|
||||
|
||||
if (inv.Folders != null)
|
||||
{
|
||||
@@ -176,19 +181,43 @@ namespace OpenSim.Capabilities.Handlers
|
||||
contents.descendents = contents.items.Array.Count + contents.categories.Array.Count;
|
||||
contents.version = version;
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[WEB FETCH INV DESC HANDLER]: Replying to request for folder {0} (fetch items {1}, fetch folders {2}) with {3} items and {4} folders for agent {5}",
|
||||
// invFetch.folder_id,
|
||||
// invFetch.fetch_items,
|
||||
// invFetch.fetch_folders,
|
||||
// contents.items.Array.Count,
|
||||
// contents.categories.Array.Count,
|
||||
// invFetch.owner_id);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
public InventoryCollection Fetch(UUID agentID, UUID folderID, UUID ownerID,
|
||||
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
|
||||
/// <summary>
|
||||
/// Handle the caps inventory descendents fetch.
|
||||
/// </summary>
|
||||
/// <param name="agentID"></param>
|
||||
/// <param name="folderID"></param>
|
||||
/// <param name="ownerID"></param>
|
||||
/// <param name="fetchFolders"></param>
|
||||
/// <param name="fetchItems"></param>
|
||||
/// <param name="sortOrder"></param>
|
||||
/// <param name="version"></param>
|
||||
/// <returns>An empty InventoryCollection if the inventory look up failed</returns>
|
||||
private InventoryCollection Fetch(
|
||||
UUID agentID, UUID folderID, UUID ownerID,
|
||||
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[WEBFETCHINVENTORYDESCENDANTS]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
|
||||
fetchFolders, fetchItems, folderID, agentID);
|
||||
// m_log.DebugFormat(
|
||||
// "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
|
||||
// fetchFolders, fetchItems, folderID, agentID);
|
||||
|
||||
// FIXME MAYBE: We're not handling sortOrder!
|
||||
|
||||
version = 0;
|
||||
InventoryFolderImpl fold;
|
||||
if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner)
|
||||
{
|
||||
if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
|
||||
{
|
||||
InventoryCollection ret = new InventoryCollection();
|
||||
@@ -197,6 +226,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
InventoryCollection contents = new InventoryCollection();
|
||||
|
||||
@@ -207,12 +237,92 @@ namespace OpenSim.Capabilities.Handlers
|
||||
containingFolder.ID = folderID;
|
||||
containingFolder.Owner = agentID;
|
||||
containingFolder = m_InventoryService.GetFolder(containingFolder);
|
||||
|
||||
if (containingFolder != null)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[WEB FETCH INV DESC HANDLER]: Retrieved folder {0} {1} for agent id {2}",
|
||||
// containingFolder.Name, containingFolder.ID, agentID);
|
||||
|
||||
version = containingFolder.Version;
|
||||
|
||||
// if (fetchItems)
|
||||
// {
|
||||
// List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>();
|
||||
//
|
||||
// foreach (InventoryItemBase item in contents.Items)
|
||||
// {
|
||||
// if (item.AssetType == (int)AssetType.Link)
|
||||
// {
|
||||
// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
|
||||
//
|
||||
// // Take care of genuinely broken links where the target doesn't exist
|
||||
// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
|
||||
// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
|
||||
// // rather than having to keep track of every folder requested in the recursion.
|
||||
// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
|
||||
// linkedItemsToAdd.Insert(0, linkedItem);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// foreach (InventoryItemBase linkedItem in linkedItemsToAdd)
|
||||
// {
|
||||
// m_log.DebugFormat(
|
||||
// "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}",
|
||||
// linkedItem.Name, folderID, agentID);
|
||||
//
|
||||
// contents.Items.Add(linkedItem);
|
||||
// }
|
||||
//
|
||||
// // If the folder requested contains links, then we need to send those folders first, otherwise the links
|
||||
// // will be broken in the viewer.
|
||||
// HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
|
||||
// foreach (InventoryItemBase item in contents.Items)
|
||||
// {
|
||||
// if (item.AssetType == (int)AssetType.Link)
|
||||
// {
|
||||
// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
|
||||
//
|
||||
// // Take care of genuinely broken links where the target doesn't exist
|
||||
// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
|
||||
// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
|
||||
// // rather than having to keep track of every folder requested in the recursion.
|
||||
// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
|
||||
// {
|
||||
// // We don't need to send the folder if source and destination of the link are in the same
|
||||
// // folder.
|
||||
// if (linkedItem.Folder != containingFolder.ID)
|
||||
// linkedItemFolderIdsToSend.Add(linkedItem.Folder);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
|
||||
// {
|
||||
// m_log.DebugFormat(
|
||||
// "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}",
|
||||
// linkedItemFolderId, folderID, agentID);
|
||||
//
|
||||
// int dummyVersion;
|
||||
// InventoryCollection linkedCollection
|
||||
// = Fetch(
|
||||
// agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion);
|
||||
//
|
||||
// InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId);
|
||||
// linkedFolder.Owner = agentID;
|
||||
// linkedFolder = m_InventoryService.GetFolder(linkedFolder);
|
||||
//
|
||||
//// contents.Folders.AddRange(linkedCollection.Folders);
|
||||
//
|
||||
// contents.Folders.Add(linkedFolder);
|
||||
// contents.Items.AddRange(linkedCollection.Items);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Lost itemsm don't really need a version
|
||||
// Lost items don't really need a version
|
||||
version = 1;
|
||||
}
|
||||
|
||||
@@ -230,10 +340,11 @@ namespace OpenSim.Capabilities.Handlers
|
||||
llsdFolder.folder_id = invFolder.ID;
|
||||
llsdFolder.parent_id = invFolder.ParentID;
|
||||
llsdFolder.name = invFolder.Name;
|
||||
if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
|
||||
|
||||
if (invFolder.Type == (short)AssetType.Unknown || !Enum.IsDefined(typeof(AssetType), (sbyte)invFolder.Type))
|
||||
llsdFolder.type = "-1";
|
||||
else
|
||||
llsdFolder.type = TaskInventoryItem.Types[invFolder.Type];
|
||||
llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
|
||||
llsdFolder.preferred_type = "-1";
|
||||
|
||||
return llsdFolder;
|
||||
@@ -254,16 +365,19 @@ namespace OpenSim.Capabilities.Handlers
|
||||
llsdItem.item_id = invItem.ID;
|
||||
llsdItem.name = invItem.Name;
|
||||
llsdItem.parent_id = invItem.Folder;
|
||||
|
||||
try
|
||||
{
|
||||
// TODO reevaluate after upgrade to libomv >= r2566. Probably should use UtilsConversions.
|
||||
llsdItem.type = TaskInventoryItem.Types[invItem.AssetType];
|
||||
llsdItem.inv_type = TaskInventoryItem.InvTypes[invItem.InvType];
|
||||
llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType);
|
||||
llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[CAPS]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}", invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
|
||||
m_log.ErrorFormat(
|
||||
"[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}",
|
||||
invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
|
||||
}
|
||||
|
||||
llsdItem.permissions = new LLSDPermissions();
|
||||
llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
|
||||
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
|
||||
@@ -294,6 +408,5 @@ namespace OpenSim.Capabilities.Handlers
|
||||
|
||||
return llsdItem;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,4 +95,11 @@ namespace OpenSim.Framework.Capabilities
|
||||
public UUID owner_id;
|
||||
public int version;
|
||||
}
|
||||
}
|
||||
|
||||
[OSDMap]
|
||||
public class LLSDFetchInventory
|
||||
{
|
||||
public UUID agent_id;
|
||||
public OSDArray items = new OSDArray();
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Capabilities
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
//Encoding encoding = Util.UTF8;
|
||||
//StreamReader streamReader = new StreamReader(request, false);
|
||||
|
||||
@@ -33,6 +33,7 @@ using System.IO;
|
||||
using System.Xml;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Server.Base;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenMetaverse;
|
||||
|
||||
|
||||
@@ -37,10 +37,30 @@ namespace OpenSim.Data
|
||||
public UUID RegionID;
|
||||
public UUID ScopeID;
|
||||
public string RegionName;
|
||||
|
||||
/// <summary>
|
||||
/// The position in meters of this region.
|
||||
/// </summary>
|
||||
public int posX;
|
||||
|
||||
/// <summary>
|
||||
/// The position in meters of this region.
|
||||
/// </summary>
|
||||
public int posY;
|
||||
|
||||
public int sizeX;
|
||||
public int sizeY;
|
||||
|
||||
/// <summary>
|
||||
/// Return the x-coordinate of this region.
|
||||
/// </summary>
|
||||
public int coordX { get { return posX / (int)Constants.RegionSize; } }
|
||||
|
||||
/// <summary>
|
||||
/// Return the y-coordinate of this region.
|
||||
/// </summary>
|
||||
public int coordY { get { return posY / (int)Constants.RegionSize; } }
|
||||
|
||||
public Dictionary<string, object> Data;
|
||||
}
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ VALUES
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
conn.Open();
|
||||
foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
|
||||
foreach (LandAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
|
||||
{
|
||||
cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.RegionUUID));
|
||||
|
||||
@@ -1252,7 +1252,7 @@ VALUES
|
||||
,[elevation_1_ne] = @elevation_1_ne ,[elevation_2_ne] = @elevation_2_ne ,[elevation_1_se] = @elevation_1_se ,[elevation_2_se] = @elevation_2_se
|
||||
,[elevation_1_sw] = @elevation_1_sw ,[elevation_2_sw] = @elevation_2_sw ,[water_height] = @water_height ,[terrain_raise_limit] = @terrain_raise_limit
|
||||
,[terrain_lower_limit] = @terrain_lower_limit ,[use_estate_sun] = @use_estate_sun ,[fixed_sun] = @fixed_sun ,[sun_position] = @sun_position
|
||||
,[covenant] = @covenant , [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id
|
||||
,[covenant] = @covenant ,[covenant_datetime] = @covenant_datetime, [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id
|
||||
WHERE [regionUUID] = @regionUUID";
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
@@ -1307,14 +1307,14 @@ VALUES
|
||||
[block_show_in_search],[agent_limit],[object_bonus],[maturity],[disable_scripts],[disable_collisions],[disable_physics],
|
||||
[terrain_texture_1],[terrain_texture_2],[terrain_texture_3],[terrain_texture_4],[elevation_1_nw],[elevation_2_nw],[elevation_1_ne],
|
||||
[elevation_2_ne],[elevation_1_se],[elevation_2_se],[elevation_1_sw],[elevation_2_sw],[water_height],[terrain_raise_limit],
|
||||
[terrain_lower_limit],[use_estate_sun],[fixed_sun],[sun_position],[covenant],[sunvectorx], [sunvectory], [sunvectorz],[Sandbox], [loaded_creation_datetime], [loaded_creation_id]
|
||||
[terrain_lower_limit],[use_estate_sun],[fixed_sun],[sun_position],[covenant],[covenant_datetime],[sunvectorx], [sunvectory], [sunvectorz],[Sandbox], [loaded_creation_datetime], [loaded_creation_id]
|
||||
)
|
||||
VALUES
|
||||
(@regionUUID,@block_terraform,@block_fly,@allow_damage,@restrict_pushing,@allow_land_resell,@allow_land_join_divide,
|
||||
@block_show_in_search,@agent_limit,@object_bonus,@maturity,@disable_scripts,@disable_collisions,@disable_physics,
|
||||
@terrain_texture_1,@terrain_texture_2,@terrain_texture_3,@terrain_texture_4,@elevation_1_nw,@elevation_2_nw,@elevation_1_ne,
|
||||
@elevation_2_ne,@elevation_1_se,@elevation_2_se,@elevation_1_sw,@elevation_2_sw,@water_height,@terrain_raise_limit,
|
||||
@terrain_lower_limit,@use_estate_sun,@fixed_sun,@sun_position,@covenant,@sunvectorx,@sunvectory, @sunvectorz, @Sandbox, @loaded_creation_datetime, @loaded_creation_id)";
|
||||
@terrain_lower_limit,@use_estate_sun,@fixed_sun,@sun_position,@covenant, @covenant_datetime, @sunvectorx,@sunvectory, @sunvectorz, @Sandbox, @loaded_creation_datetime, @loaded_creation_id)";
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
@@ -1376,7 +1376,7 @@ VALUES
|
||||
Convert.ToSingle(row["sunvectorz"])
|
||||
);
|
||||
newSettings.Covenant = new UUID((Guid)row["covenant"]);
|
||||
|
||||
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
|
||||
newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]);
|
||||
|
||||
if (row["loaded_creation_id"] is DBNull)
|
||||
@@ -1453,7 +1453,7 @@ VALUES
|
||||
_Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
|
||||
}
|
||||
|
||||
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
newData.ParcelAccessList = new List<LandAccessEntry>();
|
||||
|
||||
return newData;
|
||||
}
|
||||
@@ -1463,12 +1463,12 @@ VALUES
|
||||
/// </summary>
|
||||
/// <param name="row">datarecord with landaccess data</param>
|
||||
/// <returns></returns>
|
||||
private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataRecord row)
|
||||
private static LandAccessEntry BuildLandAccessData(IDataRecord row)
|
||||
{
|
||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry entry = new LandAccessEntry();
|
||||
entry.AgentID = new UUID((Guid)row["AccessUUID"]);
|
||||
entry.Flags = (AccessList)Convert.ToInt32(row["Flags"]);
|
||||
entry.Time = new DateTime();
|
||||
entry.Expires = 0;
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -1789,6 +1789,7 @@ VALUES
|
||||
parameters.Add(_Database.CreateParameter("sunvectory", settings.SunVector.Y));
|
||||
parameters.Add(_Database.CreateParameter("sunvectorz", settings.SunVector.Z));
|
||||
parameters.Add(_Database.CreateParameter("covenant", settings.Covenant));
|
||||
parameters.Add(_Database.CreateParameter("covenant_datetime", settings.CovenantChangedDateTime));
|
||||
parameters.Add(_Database.CreateParameter("Loaded_Creation_DateTime", settings.LoadedCreationDateTime));
|
||||
parameters.Add(_Database.CreateParameter("Loaded_Creation_ID", settings.LoadedCreationID));
|
||||
|
||||
@@ -1851,7 +1852,7 @@ VALUES
|
||||
/// <param name="parcelAccessEntry">parcel access entry.</param>
|
||||
/// <param name="parcelID">parcel ID.</param>
|
||||
/// <returns></returns>
|
||||
private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, UUID parcelID)
|
||||
private SqlParameter[] CreateLandAccessParameters(LandAccessEntry parcelAccessEntry, UUID parcelID)
|
||||
{
|
||||
List<SqlParameter> parameters = new List<SqlParameter>();
|
||||
|
||||
|
||||
@@ -1043,3 +1043,11 @@ FOR CreatorID
|
||||
ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 29 #---------------------
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings ADD covenant_datetime int NOT NULL default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
@@ -210,7 +210,6 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
|
||||
LoadBanList(es);
|
||||
|
||||
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
|
||||
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
|
||||
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
|
||||
|
||||
@@ -173,6 +173,11 @@ namespace OpenSim.Data.MySQL
|
||||
int v = Convert.ToInt32(reader[name]);
|
||||
m_Fields[name].SetValue(row, v);
|
||||
}
|
||||
else if (m_Fields[name].FieldType == typeof(uint))
|
||||
{
|
||||
uint v = Convert.ToUInt32(reader[name]);
|
||||
m_Fields[name].SetValue(row, v);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Fields[name].SetValue(row, reader[name]);
|
||||
@@ -294,4 +299,4 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,7 +794,8 @@ namespace OpenSim.Data.MySQL
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", dbcon))
|
||||
// System folders can never be deleted. Period.
|
||||
using (MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid and type=-1", dbcon))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
|
||||
|
||||
|
||||
@@ -561,31 +561,46 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
public virtual void StoreTerrain(double[,] ter, UUID regionID)
|
||||
{
|
||||
m_log.Info("[REGION DB]: Storing terrain");
|
||||
|
||||
lock (m_dbLock)
|
||||
Util.FireAndForget(delegate(object x)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
double[,] oldTerrain = LoadTerrain(regionID);
|
||||
|
||||
m_log.Info("[REGION DB]: Storing terrain");
|
||||
|
||||
lock (m_dbLock)
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
cmd.CommandText = "delete from terrain where RegionUUID = ?RegionUUID";
|
||||
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
|
||||
dbcon.Open();
|
||||
|
||||
ExecuteNonQuery(cmd);
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "delete from terrain where RegionUUID = ?RegionUUID";
|
||||
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
|
||||
|
||||
cmd.CommandText = "insert into terrain (RegionUUID, " +
|
||||
"Revision, Heightfield) values (?RegionUUID, " +
|
||||
"1, ?Heightfield)";
|
||||
using (MySqlCommand cmd2 = dbcon.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cmd2.CommandText = "insert into terrain (RegionUUID, " +
|
||||
"Revision, Heightfield) values (?RegionUUID, " +
|
||||
"1, ?Heightfield)";
|
||||
|
||||
cmd.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter));
|
||||
cmd2.Parameters.AddWithValue("RegionUUID", regionID.ToString());
|
||||
cmd2.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter, oldTerrain));
|
||||
|
||||
ExecuteNonQuery(cmd);
|
||||
ExecuteNonQuery(cmd);
|
||||
ExecuteNonQuery(cmd2);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public virtual double[,] LoadTerrain(UUID regionID)
|
||||
@@ -700,10 +715,10 @@ namespace OpenSim.Data.MySQL
|
||||
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandText = "insert into landaccesslist (LandUUID, " +
|
||||
"AccessUUID, Flags) values (?LandUUID, ?AccessUUID, " +
|
||||
"?Flags)";
|
||||
"AccessUUID, Flags, Expires) values (?LandUUID, ?AccessUUID, " +
|
||||
"?Flags, ?Expires)";
|
||||
|
||||
foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
|
||||
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
|
||||
{
|
||||
FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID);
|
||||
ExecuteNonQuery(cmd);
|
||||
@@ -846,6 +861,8 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
}
|
||||
|
||||
LoadSpawnPoints(rs);
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
@@ -992,9 +1009,11 @@ namespace OpenSim.Data.MySQL
|
||||
"elevation_2_sw, water_height, " +
|
||||
"terrain_raise_limit, terrain_lower_limit, " +
|
||||
"use_estate_sun, fixed_sun, sun_position, " +
|
||||
"covenant, Sandbox, sunvectorx, sunvectory, " +
|
||||
"covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
|
||||
"sunvectorz, loaded_creation_datetime, " +
|
||||
"loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " +
|
||||
"loaded_creation_id, map_tile_ID, block_search, casino, " +
|
||||
"TelehubObject, parcel_tile_ID) " +
|
||||
"values (?RegionUUID, ?BlockTerraform, " +
|
||||
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
|
||||
"?AllowLandResell, ?AllowLandJoinDivide, " +
|
||||
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
|
||||
@@ -1006,10 +1025,11 @@ namespace OpenSim.Data.MySQL
|
||||
"?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " +
|
||||
"?WaterHeight, ?TerrainRaiseLimit, " +
|
||||
"?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
|
||||
"?SunPosition, ?Covenant, ?Sandbox, " +
|
||||
"?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " +
|
||||
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
|
||||
"?LoadedCreationDateTime, ?LoadedCreationID, " +
|
||||
"?TerrainImageID, ?block_search, ?casino)";
|
||||
"?TerrainImageID, ?block_search, ?casino, " +
|
||||
"?TelehubObject, ?ParcelImageID)";
|
||||
|
||||
FillRegionSettingsCommand(cmd, rs);
|
||||
|
||||
@@ -1017,6 +1037,7 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
}
|
||||
}
|
||||
SaveSpawnPoints(rs);
|
||||
}
|
||||
|
||||
public virtual List<LandData> LoadLandObjects(UUID regionUUID)
|
||||
@@ -1287,7 +1308,7 @@ namespace OpenSim.Data.MySQL
|
||||
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
|
||||
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
|
||||
newSettings.Covenant = DBGuid.FromDB(row["covenant"]);
|
||||
|
||||
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
|
||||
newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]);
|
||||
|
||||
if (row["loaded_creation_id"] is DBNull)
|
||||
@@ -1296,6 +1317,8 @@ namespace OpenSim.Data.MySQL
|
||||
newSettings.LoadedCreationID = (String) row["loaded_creation_id"];
|
||||
|
||||
newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
|
||||
newSettings.ParcelImageID = DBGuid.FromDB(row["parcel_tile_ID"]);
|
||||
newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]);
|
||||
|
||||
newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
|
||||
newSettings.Casino = Convert.ToBoolean(row["casino"]);
|
||||
@@ -1373,7 +1396,7 @@ namespace OpenSim.Data.MySQL
|
||||
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
|
||||
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
|
||||
|
||||
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
newData.ParcelAccessList = new List<LandAccessEntry>();
|
||||
|
||||
return newData;
|
||||
}
|
||||
@@ -1383,12 +1406,12 @@ namespace OpenSim.Data.MySQL
|
||||
/// </summary>
|
||||
/// <param name="row"></param>
|
||||
/// <returns></returns>
|
||||
private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataReader row)
|
||||
private static LandAccessEntry BuildLandAccessData(IDataReader row)
|
||||
{
|
||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry entry = new LandAccessEntry();
|
||||
entry.AgentID = DBGuid.FromDB(row["AccessUUID"]);
|
||||
entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]);
|
||||
entry.Time = new DateTime();
|
||||
entry.Expires = Convert.ToInt32(row["Expires"]);
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -1397,7 +1420,7 @@ namespace OpenSim.Data.MySQL
|
||||
/// </summary>
|
||||
/// <param name="val"></param>
|
||||
/// <returns></returns>
|
||||
private static Array SerializeTerrain(double[,] val)
|
||||
private static Array SerializeTerrain(double[,] val, double[,] oldTerrain)
|
||||
{
|
||||
MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
|
||||
BinaryWriter bw = new BinaryWriter(str);
|
||||
@@ -1406,7 +1429,11 @@ namespace OpenSim.Data.MySQL
|
||||
for (int x = 0; x < (int)Constants.RegionSize; x++)
|
||||
for (int y = 0; y < (int)Constants.RegionSize; y++)
|
||||
{
|
||||
double height = val[x, y];
|
||||
double height = 20.0;
|
||||
if (oldTerrain != null)
|
||||
height = oldTerrain[x, y];
|
||||
if (!double.IsNaN(val[x, y]))
|
||||
height = val[x, y];
|
||||
if (height == 0.0)
|
||||
height = double.Epsilon;
|
||||
|
||||
@@ -1626,12 +1653,15 @@ namespace OpenSim.Data.MySQL
|
||||
cmd.Parameters.AddWithValue("FixedSun", settings.FixedSun);
|
||||
cmd.Parameters.AddWithValue("SunPosition", settings.SunPosition);
|
||||
cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString());
|
||||
cmd.Parameters.AddWithValue("CovenantChangedDateTime", settings.CovenantChangedDateTime);
|
||||
cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
|
||||
cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
|
||||
cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
|
||||
cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch);
|
||||
cmd.Parameters.AddWithValue("casino", settings.Casino);
|
||||
|
||||
cmd.Parameters.AddWithValue("ParcelImageID", settings.ParcelImageID);
|
||||
cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1694,11 +1724,12 @@ namespace OpenSim.Data.MySQL
|
||||
/// <param name="row"></param>
|
||||
/// <param name="entry"></param>
|
||||
/// <param name="parcelID"></param>
|
||||
private static void FillLandAccessCommand(MySqlCommand cmd, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
|
||||
private static void FillLandAccessCommand(MySqlCommand cmd, LandAccessEntry entry, UUID parcelID)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("LandUUID", parcelID.ToString());
|
||||
cmd.Parameters.AddWithValue("AccessUUID", entry.AgentID.ToString());
|
||||
cmd.Parameters.AddWithValue("Flags", entry.Flags);
|
||||
cmd.Parameters.AddWithValue("Expires", entry.Expires.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1833,5 +1864,72 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadSpawnPoints(RegionSettings rs)
|
||||
{
|
||||
rs.ClearSpawnPoints();
|
||||
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select Yaw, Pitch, Distance from spawn_points where RegionID = ?RegionID";
|
||||
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
|
||||
|
||||
using (IDataReader r = cmd.ExecuteReader())
|
||||
{
|
||||
while (r.Read())
|
||||
{
|
||||
SpawnPoint sp = new SpawnPoint();
|
||||
|
||||
sp.Yaw = (float)r["Yaw"];
|
||||
sp.Pitch = (float)r["Pitch"];
|
||||
sp.Distance = (float)r["Distance"];
|
||||
|
||||
rs.AddSpawnPoint(sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSpawnPoints(RegionSettings rs)
|
||||
{
|
||||
lock (m_dbLock)
|
||||
{
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "delete from spawn_points where RegionID = ?RegionID";
|
||||
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
cmd.Parameters.Clear();
|
||||
|
||||
cmd.CommandText = "insert into spawn_points (RegionID, Yaw, Pitch, Distance) values ( ?RegionID, ?Yaw, ?Pitch, ?Distance)";
|
||||
|
||||
foreach (SpawnPoint p in rs.SpawnPoints())
|
||||
{
|
||||
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
|
||||
cmd.Parameters.AddWithValue("?Yaw", p.Yaw);
|
||||
cmd.Parameters.AddWithValue("?Pitch", p.Pitch);
|
||||
cmd.Parameters.AddWithValue("?Distance", p.Distance);
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
cmd.Parameters.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,3 +94,12 @@ BEGIN;
|
||||
alter table regions modify column regionName varchar(128) default NULL;
|
||||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 9 # ------------
|
||||
|
||||
BEGIN;
|
||||
|
||||
alter table regions add column `parcelMapTexture` varchar(36) default NULL;
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
||||
@@ -841,4 +841,45 @@ alter table regionban ENGINE = MyISAM;
|
||||
alter table regionsettings ENGINE = MyISAM;
|
||||
alter table terrain ENGINE = MyISAM;
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 39 #--------------- Telehub support
|
||||
|
||||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS `spawn_points` (
|
||||
`RegionID` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`Yaw` float NOT NULL,
|
||||
`Pitch` float NOT NULL,
|
||||
`Distance` float NOT NULL,
|
||||
KEY `RegionID` (`RegionID`)
|
||||
) ENGINE=Innodb;
|
||||
|
||||
ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 40 #---------------- Parcels for sale
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
COMMIT;
|
||||
|
||||
:VERSION 41 #---------------- Timed bans/access
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE `landaccesslist` ADD COLUMN `Expires` INTEGER NOT NULL DEFAULT 0;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 42 #--------------------- Region Covenant changed time
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE regionsettings ADD COLUMN covenant_datetime int unsigned NOT NULL DEFAULT '0';
|
||||
COMMIT;
|
||||
|
||||
:VERSION 43 #---------------------
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE `regionsettings` MODIFY COLUMN `TelehubObject` VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
||||
@@ -56,13 +56,21 @@ namespace OpenSim.Data.Null
|
||||
/// <returns></returns>
|
||||
public FriendsData[] GetFriends(string userID)
|
||||
{
|
||||
List<FriendsData> lst = m_Data.FindAll(delegate (FriendsData fdata)
|
||||
List<FriendsData> lst = m_Data.FindAll(fdata =>
|
||||
{
|
||||
return fdata.PrincipalID == userID.ToString();
|
||||
});
|
||||
|
||||
if (lst != null)
|
||||
{
|
||||
lst.ForEach(f =>
|
||||
{
|
||||
FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
|
||||
if (f2 != null) { f.Data["TheirFlags"] = f2.Data["Flags"]; }
|
||||
});
|
||||
|
||||
return lst.ToArray();
|
||||
}
|
||||
|
||||
return new FriendsData[0];
|
||||
}
|
||||
|
||||
@@ -40,24 +40,40 @@ namespace OpenSim.Data.Null
|
||||
{
|
||||
private static NullRegionData Instance = null;
|
||||
|
||||
/// <summary>
|
||||
/// Should we use the static instance for all invocations?
|
||||
/// </summary>
|
||||
private bool m_useStaticInstance = true;
|
||||
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>();
|
||||
|
||||
public NullRegionData(string connectionString, string realm)
|
||||
{
|
||||
if (Instance == null)
|
||||
// m_log.DebugFormat(
|
||||
// "[NULL REGION DATA]: Constructor got connectionString {0}, realm {1}", connectionString, realm);
|
||||
|
||||
// The !static connection string is a hack so that regression tests can use this module without a high degree of fragility
|
||||
// in having to deal with the static reference in the once-loaded NullRegionData class.
|
||||
//
|
||||
// In standalone operation, we have to use only one instance of this class since the login service and
|
||||
// simulator have no other way of using a common data store.
|
||||
if (connectionString == "!static")
|
||||
m_useStaticInstance = false;
|
||||
else if (Instance == null)
|
||||
Instance = this;
|
||||
//Console.WriteLine("[XXX] NullRegionData constructor");
|
||||
}
|
||||
|
||||
private delegate bool Matcher(string value);
|
||||
|
||||
public List<RegionData> Get(string regionName, UUID scopeID)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Get(regionName, scopeID);
|
||||
|
||||
// m_log.DebugFormat("[NULL REGION DATA]: Getting region {0}, scope {1}", regionName, scopeID);
|
||||
|
||||
string cleanName = regionName.ToLower();
|
||||
|
||||
// Handle SQL wildcards
|
||||
@@ -82,6 +98,7 @@ namespace OpenSim.Data.Null
|
||||
cleanName = cleanName.Remove(cleanName.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
Matcher queryMatch;
|
||||
if (wildcardPrefix && wildcardSuffix)
|
||||
queryMatch = delegate(string s) { return s.Contains(cleanName); };
|
||||
@@ -110,7 +127,7 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public RegionData Get(int posX, int posY, UUID scopeID)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Get(posX, posY, scopeID);
|
||||
|
||||
List<RegionData> ret = new List<RegionData>();
|
||||
@@ -129,7 +146,7 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public RegionData Get(UUID regionID, UUID scopeID)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Get(regionID, scopeID);
|
||||
|
||||
if (m_regionData.ContainsKey(regionID))
|
||||
@@ -140,7 +157,7 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Get(startX, startY, endX, endY, scopeID);
|
||||
|
||||
List<RegionData> ret = new List<RegionData>();
|
||||
@@ -156,9 +173,12 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public bool Store(RegionData data)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Store(data);
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[NULL REGION DATA]: Storing region {0} {1}, scope {2}", data.RegionName, data.RegionID, data.ScopeID);
|
||||
|
||||
m_regionData[data.RegionID] = data;
|
||||
|
||||
return true;
|
||||
@@ -166,7 +186,7 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public bool SetDataItem(UUID regionID, string item, string value)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.SetDataItem(regionID, item, value);
|
||||
|
||||
if (!m_regionData.ContainsKey(regionID))
|
||||
@@ -179,9 +199,11 @@ namespace OpenSim.Data.Null
|
||||
|
||||
public bool Delete(UUID regionID)
|
||||
{
|
||||
if (Instance != this)
|
||||
if (m_useStaticInstance && Instance != this)
|
||||
return Instance.Delete(regionID);
|
||||
|
||||
// m_log.DebugFormat("[NULL REGION DATA]: Deleting region {0}", regionID);
|
||||
|
||||
if (!m_regionData.ContainsKey(regionID))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -466,4 +466,9 @@ ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
|
||||
ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 22
|
||||
BEGIN;
|
||||
ALTER TABLE regionsettings ADD COLUMN covenant_datetime INTEGER NOT NULL default 0;
|
||||
COMMIT;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace OpenSim.Data.SQLite
|
||||
cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString());
|
||||
cmd.Parameters.AddWithValue(":Friend", friend);
|
||||
|
||||
ExecuteNonQuery(cmd, cmd.Connection);
|
||||
ExecuteNonQuery(cmd, m_Connection);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ namespace OpenSim.Data.SQLite
|
||||
landaccesslist.Rows.Remove(rowsToDelete[iter]);
|
||||
}
|
||||
rowsToDelete.Clear();
|
||||
foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
|
||||
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
|
||||
{
|
||||
DataRow newAccessRow = landaccesslist.NewRow();
|
||||
fillLandAccessRow(newAccessRow, entry, parcel.LandData.GlobalID);
|
||||
@@ -1185,6 +1185,7 @@ namespace OpenSim.Data.SQLite
|
||||
createCol(regionsettings, "fixed_sun", typeof (Int32));
|
||||
createCol(regionsettings, "sun_position", typeof (Double));
|
||||
createCol(regionsettings, "covenant", typeof(String));
|
||||
createCol(regionsettings, "covenant_datetime", typeof(Int32));
|
||||
createCol(regionsettings, "map_tile_ID", typeof(String));
|
||||
regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] };
|
||||
return regionsettings;
|
||||
@@ -1456,7 +1457,7 @@ namespace OpenSim.Data.SQLite
|
||||
newData.UserLocation = Vector3.Zero;
|
||||
newData.UserLookAt = Vector3.Zero;
|
||||
}
|
||||
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
newData.ParcelAccessList = new List<LandAccessEntry>();
|
||||
UUID authBuyerID = UUID.Zero;
|
||||
|
||||
UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
|
||||
@@ -1509,6 +1510,7 @@ namespace OpenSim.Data.SQLite
|
||||
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
|
||||
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
|
||||
newSettings.Covenant = new UUID((String) row["covenant"]);
|
||||
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
|
||||
newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]);
|
||||
|
||||
return newSettings;
|
||||
@@ -1519,12 +1521,12 @@ namespace OpenSim.Data.SQLite
|
||||
/// </summary>
|
||||
/// <param name="row"></param>
|
||||
/// <returns></returns>
|
||||
private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
|
||||
private static LandAccessEntry buildLandAccessData(DataRow row)
|
||||
{
|
||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry entry = new LandAccessEntry();
|
||||
entry.AgentID = new UUID((string) row["AccessUUID"]);
|
||||
entry.Flags = (AccessList) row["Flags"];
|
||||
entry.Time = new DateTime();
|
||||
entry.Expires = 0;
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -1787,7 +1789,7 @@ namespace OpenSim.Data.SQLite
|
||||
/// <param name="row"></param>
|
||||
/// <param name="entry"></param>
|
||||
/// <param name="parcelID"></param>
|
||||
private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
|
||||
private static void fillLandAccessRow(DataRow row, LandAccessEntry entry, UUID parcelID)
|
||||
{
|
||||
row["LandUUID"] = parcelID.ToString();
|
||||
row["AccessUUID"] = entry.AgentID.ToString();
|
||||
@@ -1833,6 +1835,7 @@ namespace OpenSim.Data.SQLite
|
||||
row["fixed_sun"] = settings.FixedSun;
|
||||
row["sun_position"] = settings.SunPosition;
|
||||
row["covenant"] = settings.Covenant.ToString();
|
||||
row["covenant_datetime"] = settings.CovenantChangedDateTime;
|
||||
row["map_tile_ID"] = settings.TerrainImageID.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,6 @@ namespace OpenSim.Data.Tests
|
||||
pbshap.ProfileEnd = ushort.MaxValue;
|
||||
pbshap.ProfileHollow = ushort.MaxValue;
|
||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
byte updatef = (byte) random.Next(127);
|
||||
|
||||
RegionInfo regionInfo = new RegionInfo();
|
||||
regionInfo.RegionID = region3;
|
||||
@@ -336,7 +335,6 @@ namespace OpenSim.Data.Tests
|
||||
sop.LinkNum = linknum;
|
||||
sop.ClickAction = clickaction;
|
||||
sop.Scale = scale;
|
||||
sop.UpdateFlag = updatef;
|
||||
|
||||
//Tests if local part accepted the parameters:
|
||||
Assert.That(regionh,Is.EqualTo(sop.RegionHandle), "Assert.That(regionh,Is.EqualTo(sop.RegionHandle))");
|
||||
@@ -369,7 +367,6 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))");
|
||||
Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))");
|
||||
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
|
||||
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
|
||||
|
||||
// This is necessary or object will not be inserted in DB
|
||||
sop.Flags = PrimFlags.None;
|
||||
@@ -469,7 +466,6 @@ namespace OpenSim.Data.Tests
|
||||
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
|
||||
pbshap = PrimitiveBaseShape.Default;
|
||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
byte updatef = (byte) random.Next(127);
|
||||
|
||||
// Updates the region with new values
|
||||
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
|
||||
@@ -499,7 +495,6 @@ namespace OpenSim.Data.Tests
|
||||
sog2.RootPart.LinkNum = linknum;
|
||||
sog2.RootPart.ClickAction = clickaction;
|
||||
sog2.RootPart.Scale = scale;
|
||||
sog2.RootPart.UpdateFlag = updatef;
|
||||
|
||||
db.StoreObject(sog2, region3);
|
||||
List<SceneObjectGroup> sogs = db.LoadObjects(region3);
|
||||
@@ -690,7 +685,7 @@ namespace OpenSim.Data.Tests
|
||||
SceneObjectGroup sog = GetMySOG("object1");
|
||||
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
|
||||
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
|
||||
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
|
||||
Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
|
||||
|
||||
@@ -767,7 +762,7 @@ namespace OpenSim.Data.Tests
|
||||
i.CreationDate = creationd;
|
||||
|
||||
SceneObjectGroup sog = GetMySOG("object1");
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
|
||||
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id);
|
||||
|
||||
Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))");
|
||||
@@ -812,10 +807,10 @@ namespace OpenSim.Data.Tests
|
||||
|
||||
SceneObjectGroup sog = FindSOG("object1", region1);
|
||||
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib1, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib2, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib3, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib4, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib1, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib2, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib3, zero), Is.True);
|
||||
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib4, zero), Is.True);
|
||||
|
||||
TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1);
|
||||
Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))");
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace OpenSim.Framework
|
||||
if (args["start_pos"] != null)
|
||||
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
|
||||
|
||||
m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
|
||||
//m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -311,7 +311,7 @@ namespace OpenSim.Framework
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
// m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,22 +35,36 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
public class AgentCircuitManager
|
||||
{
|
||||
public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
|
||||
public Dictionary<UUID, AgentCircuitData> AgentCircuitsByUUID = new Dictionary<UUID, AgentCircuitData>();
|
||||
/// <summary>
|
||||
/// Agent circuits indexed by circuit code.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// We lock this for operations both on this dictionary and on m_agentCircuitsByUUID
|
||||
/// </remarks>
|
||||
private Dictionary<uint, AgentCircuitData> m_agentCircuits = new Dictionary<uint, AgentCircuitData>();
|
||||
|
||||
/// <summary>
|
||||
/// Agent circuits indexed by agent UUID.
|
||||
/// </summary>
|
||||
private Dictionary<UUID, AgentCircuitData> m_agentCircuitsByUUID = new Dictionary<UUID, AgentCircuitData>();
|
||||
|
||||
public virtual AuthenticateResponse AuthenticateSession(UUID sessionID, UUID agentID, uint circuitcode)
|
||||
{
|
||||
AgentCircuitData validcircuit = null;
|
||||
if (AgentCircuits.ContainsKey(circuitcode))
|
||||
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
validcircuit = AgentCircuits[circuitcode];
|
||||
if (m_agentCircuits.ContainsKey(circuitcode))
|
||||
validcircuit = m_agentCircuits[circuitcode];
|
||||
}
|
||||
|
||||
AuthenticateResponse user = new AuthenticateResponse();
|
||||
|
||||
if (validcircuit == null)
|
||||
{
|
||||
//don't have this circuit code in our list
|
||||
user.Authorised = false;
|
||||
return (user);
|
||||
return user;
|
||||
}
|
||||
|
||||
if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
|
||||
@@ -72,7 +86,7 @@ namespace OpenSim.Framework
|
||||
user.Authorised = false;
|
||||
}
|
||||
|
||||
return (user);
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -82,73 +96,93 @@ namespace OpenSim.Framework
|
||||
/// <param name="agentData"></param>
|
||||
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
|
||||
{
|
||||
lock (AgentCircuits)
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey(circuitCode))
|
||||
if (m_agentCircuits.ContainsKey(circuitCode))
|
||||
{
|
||||
AgentCircuits[circuitCode] = agentData;
|
||||
AgentCircuitsByUUID[agentData.AgentID] = agentData;
|
||||
m_agentCircuits[circuitCode] = agentData;
|
||||
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
|
||||
}
|
||||
else
|
||||
{
|
||||
AgentCircuits.Add(circuitCode, agentData);
|
||||
AgentCircuitsByUUID[agentData.AgentID] = agentData;
|
||||
m_agentCircuits.Add(circuitCode, agentData);
|
||||
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void RemoveCircuit(uint circuitCode)
|
||||
{
|
||||
lock (AgentCircuits)
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey(circuitCode))
|
||||
if (m_agentCircuits.ContainsKey(circuitCode))
|
||||
{
|
||||
UUID agentID = AgentCircuits[circuitCode].AgentID;
|
||||
AgentCircuits.Remove(circuitCode);
|
||||
AgentCircuitsByUUID.Remove(agentID);
|
||||
UUID agentID = m_agentCircuits[circuitCode].AgentID;
|
||||
m_agentCircuits.Remove(circuitCode);
|
||||
m_agentCircuitsByUUID.Remove(agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void RemoveCircuit(UUID agentID)
|
||||
{
|
||||
lock (AgentCircuits)
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
if (AgentCircuitsByUUID.ContainsKey(agentID))
|
||||
if (m_agentCircuitsByUUID.ContainsKey(agentID))
|
||||
{
|
||||
uint circuitCode = AgentCircuitsByUUID[agentID].circuitcode;
|
||||
AgentCircuits.Remove(circuitCode);
|
||||
AgentCircuitsByUUID.Remove(agentID);
|
||||
uint circuitCode = m_agentCircuitsByUUID[agentID].circuitcode;
|
||||
m_agentCircuits.Remove(circuitCode);
|
||||
m_agentCircuitsByUUID.Remove(agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AgentCircuitData GetAgentCircuitData(uint circuitCode)
|
||||
{
|
||||
AgentCircuitData agentCircuit = null;
|
||||
AgentCircuits.TryGetValue(circuitCode, out agentCircuit);
|
||||
|
||||
lock (m_agentCircuits)
|
||||
m_agentCircuits.TryGetValue(circuitCode, out agentCircuit);
|
||||
|
||||
return agentCircuit;
|
||||
}
|
||||
|
||||
public AgentCircuitData GetAgentCircuitData(UUID agentID)
|
||||
{
|
||||
AgentCircuitData agentCircuit = null;
|
||||
AgentCircuitsByUUID.TryGetValue(agentID, out agentCircuit);
|
||||
|
||||
lock (m_agentCircuits)
|
||||
m_agentCircuitsByUUID.TryGetValue(agentID, out agentCircuit);
|
||||
|
||||
return agentCircuit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all current agent circuits indexed by agent UUID.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Dictionary<UUID, AgentCircuitData> GetAgentCircuits()
|
||||
{
|
||||
lock (m_agentCircuits)
|
||||
return new Dictionary<UUID, AgentCircuitData>(m_agentCircuitsByUUID);
|
||||
}
|
||||
|
||||
public void UpdateAgentData(AgentCircuitData agentData)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey((uint) agentData.circuitcode))
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
AgentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname;
|
||||
AgentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname;
|
||||
AgentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos;
|
||||
if (m_agentCircuits.ContainsKey((uint) agentData.circuitcode))
|
||||
{
|
||||
m_agentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname;
|
||||
m_agentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname;
|
||||
m_agentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos;
|
||||
|
||||
// Updated for when we don't know them before calling Scene.NewUserConnection
|
||||
AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
|
||||
AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID;
|
||||
// Updated for when we don't know them before calling Scene.NewUserConnection
|
||||
m_agentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
|
||||
m_agentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID;
|
||||
|
||||
// m_log.Debug("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
|
||||
// m_log.Debug("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,38 +193,37 @@ namespace OpenSim.Framework
|
||||
/// <param name="newcircuitcode"></param>
|
||||
public bool TryChangeCiruitCode(uint circuitcode, uint newcircuitcode)
|
||||
{
|
||||
lock (AgentCircuits)
|
||||
lock (m_agentCircuits)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey((uint)circuitcode) && !AgentCircuits.ContainsKey((uint)newcircuitcode))
|
||||
if (m_agentCircuits.ContainsKey((uint)circuitcode) && !m_agentCircuits.ContainsKey((uint)newcircuitcode))
|
||||
{
|
||||
AgentCircuitData agentData = AgentCircuits[(uint)circuitcode];
|
||||
AgentCircuitData agentData = m_agentCircuits[(uint)circuitcode];
|
||||
|
||||
agentData.circuitcode = newcircuitcode;
|
||||
|
||||
AgentCircuits.Remove((uint)circuitcode);
|
||||
AgentCircuits.Add(newcircuitcode, agentData);
|
||||
m_agentCircuits.Remove((uint)circuitcode);
|
||||
m_agentCircuits.Add(newcircuitcode, agentData);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey(circuitcode))
|
||||
{
|
||||
AgentCircuits[circuitcode].child = childstatus;
|
||||
}
|
||||
lock (m_agentCircuits)
|
||||
if (m_agentCircuits.ContainsKey(circuitcode))
|
||||
m_agentCircuits[circuitcode].child = childstatus;
|
||||
}
|
||||
|
||||
public bool GetAgentChildStatus(uint circuitcode)
|
||||
{
|
||||
if (AgentCircuits.ContainsKey(circuitcode))
|
||||
{
|
||||
return AgentCircuits[circuitcode].child;
|
||||
}
|
||||
lock (m_agentCircuits)
|
||||
if (m_agentCircuits.ContainsKey(circuitcode))
|
||||
return m_agentCircuits[circuitcode].child;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,6 @@ namespace OpenSim.Framework
|
||||
protected AvatarWearable[] m_wearables;
|
||||
protected Dictionary<int, List<AvatarAttachment>> m_attachments;
|
||||
protected float m_avatarHeight = 0;
|
||||
protected float m_hipOffset = 0;
|
||||
|
||||
public virtual int Serial
|
||||
{
|
||||
@@ -89,11 +88,6 @@ namespace OpenSim.Framework
|
||||
set { m_avatarHeight = value; }
|
||||
}
|
||||
|
||||
public virtual float HipOffset
|
||||
{
|
||||
get { return m_hipOffset; }
|
||||
}
|
||||
|
||||
public AvatarAppearance()
|
||||
{
|
||||
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance");
|
||||
@@ -184,7 +178,6 @@ namespace OpenSim.Framework
|
||||
m_visualparams = (byte[])appearance.VisualParams.Clone();
|
||||
|
||||
m_avatarHeight = appearance.m_avatarHeight;
|
||||
m_hipOffset = appearance.m_hipOffset;
|
||||
|
||||
// Copy the attachment, force append mode since that ensures consistency
|
||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||
@@ -271,10 +264,12 @@ namespace OpenSim.Framework
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up appearance textures.
|
||||
/// Returns boolean that indicates whether the new entries actually change the
|
||||
/// existing values.
|
||||
/// Set up appearance texture ids.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// True if any existing texture id was changed by the new data.
|
||||
/// False if there were no changes or no existing texture ids.
|
||||
/// </returns>
|
||||
public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
|
||||
{
|
||||
if (textureEntry == null)
|
||||
@@ -291,25 +286,30 @@ namespace OpenSim.Framework
|
||||
|
||||
if (newface == null)
|
||||
{
|
||||
if (oldface == null) continue;
|
||||
if (oldface == null)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (oldface != null && oldface.TextureID == newface.TextureID) continue;
|
||||
if (oldface != null && oldface.TextureID == newface.TextureID)
|
||||
continue;
|
||||
}
|
||||
|
||||
changed = true;
|
||||
}
|
||||
|
||||
m_texture = textureEntry;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up visual parameters for the avatar and refresh the avatar height
|
||||
/// Returns boolean that indicates whether the new entries actually change the
|
||||
/// existing values.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// True if any existing visual parameter was changed by the new data.
|
||||
/// False if there were no changes or no existing visual parameters.
|
||||
/// </returns>
|
||||
public virtual bool SetVisualParams(byte[] visualParams)
|
||||
{
|
||||
if (visualParams == null)
|
||||
@@ -347,20 +347,18 @@ namespace OpenSim.Framework
|
||||
|
||||
public virtual void SetHeight()
|
||||
{
|
||||
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
||||
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
|
||||
+ 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
|
||||
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
|
||||
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
|
||||
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
|
||||
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
|
||||
|
||||
m_hipOffset = (((1.23077f // Half of avatar
|
||||
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
|
||||
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
|
||||
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
|
||||
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
|
||||
) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
|
||||
// Start with shortest possible female avatar height
|
||||
m_avatarHeight = 1.14597f;
|
||||
// Add offset for male avatars
|
||||
if (m_visualparams[(int)VPElement.SHAPE_MALE] != 0)
|
||||
m_avatarHeight += 0.0848f;
|
||||
// Add offsets for visual params
|
||||
m_avatarHeight += 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f
|
||||
+ 0.08117f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f
|
||||
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f
|
||||
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f
|
||||
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f
|
||||
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f;
|
||||
}
|
||||
|
||||
public virtual void SetWearable(int wearableId, AvatarWearable wearable)
|
||||
@@ -591,7 +589,6 @@ namespace OpenSim.Framework
|
||||
|
||||
data["serial"] = OSD.FromInteger(m_serial);
|
||||
data["height"] = OSD.FromReal(m_avatarHeight);
|
||||
data["hipoffset"] = OSD.FromReal(m_hipOffset);
|
||||
|
||||
// Wearables
|
||||
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
|
||||
@@ -636,8 +633,6 @@ namespace OpenSim.Framework
|
||||
m_serial = data["serial"].AsInteger();
|
||||
if ((data != null) && (data["height"] != null))
|
||||
m_avatarHeight = (float)data["height"].AsReal();
|
||||
if ((data != null) && (data["hipoffset"] != null))
|
||||
m_hipOffset = (float)data["hipoffset"].AsReal();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public virtual OSDMap Pack()
|
||||
{
|
||||
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
|
||||
OSDMap args = new OSDMap();
|
||||
args["message_type"] = OSD.FromString("AgentData");
|
||||
@@ -478,7 +478,7 @@ namespace OpenSim.Framework
|
||||
/// <param name="hash"></param>
|
||||
public virtual void Unpack(OSDMap args, IScene scene)
|
||||
{
|
||||
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
||||
//m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
||||
|
||||
if (args.ContainsKey("region_id"))
|
||||
UUID.TryParse(args["region_id"].AsString(), out RegionID);
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.Reflection;
|
||||
using System.Xml;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Console;
|
||||
//using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
||||
@@ -31,14 +31,14 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
public delegate void CommandDelegate(string module, string[] cmd);
|
||||
|
||||
public class Commands
|
||||
public class Commands : ICommands
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates a command that can be invoked from the console
|
||||
@@ -532,6 +532,11 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
public class Parser
|
||||
{
|
||||
// If an unquoted portion ends with an element matching this regex
|
||||
// and the next element contains a space, then we have stripped
|
||||
// embedded quotes that should not have been stripped
|
||||
private static Regex optionRegex = new Regex("^--[a-zA-Z0-9-]+=$");
|
||||
|
||||
public static string[] Parse(string text)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
@@ -545,10 +550,38 @@ namespace OpenSim.Framework.Console
|
||||
if (index % 2 == 0)
|
||||
{
|
||||
string[] words = unquoted[index].Split(new char[] {' '});
|
||||
|
||||
bool option = false;
|
||||
foreach (string w in words)
|
||||
{
|
||||
if (w != String.Empty)
|
||||
{
|
||||
if (optionRegex.Match(w) == Match.Empty)
|
||||
option = false;
|
||||
else
|
||||
option = true;
|
||||
result.Add(w);
|
||||
}
|
||||
}
|
||||
// The last item matched the regex, put the quotes back
|
||||
if (option)
|
||||
{
|
||||
// If the line ended with it, don't do anything
|
||||
if (index < (unquoted.Length - 1))
|
||||
{
|
||||
// Get and remove the option name
|
||||
string optionText = result[result.Count - 1];
|
||||
result.RemoveAt(result.Count - 1);
|
||||
|
||||
// Add the quoted value back
|
||||
optionText += "\"" + unquoted[index + 1] + "\"";
|
||||
|
||||
// Push the result into our return array
|
||||
result.Add(optionText);
|
||||
|
||||
// Skip the already used value
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -564,14 +597,16 @@ namespace OpenSim.Framework.Console
|
||||
/// <summary>
|
||||
/// A console that processes commands internally
|
||||
/// </summary>
|
||||
public class CommandConsole : ConsoleBase
|
||||
public class CommandConsole : ConsoleBase, ICommandConsole
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Commands Commands = new Commands();
|
||||
public ICommands Commands { get; private set; }
|
||||
|
||||
public CommandConsole(string defaultPrompt) : base(defaultPrompt)
|
||||
{
|
||||
Commands = new Commands();
|
||||
|
||||
Commands.AddCommand("console", false, "help", "help [<command>]",
|
||||
"Get general command list or more detailed help on a specific command", Help);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
protected string prompt = "# ";
|
||||
|
||||
public object ConsoleScene = null;
|
||||
public object ConsoleScene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The default prompt text.
|
||||
|
||||
@@ -232,9 +232,8 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
string uri = "/ReadResponses/" + sessionID.ToString() + "/";
|
||||
|
||||
m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll,
|
||||
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents,
|
||||
sessionID));
|
||||
m_Server.AddPollServiceHTTPHandler(
|
||||
uri, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, sessionID));
|
||||
|
||||
XmlDocument xmldoc = new XmlDocument();
|
||||
XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
|
||||
@@ -266,11 +265,6 @@ namespace OpenSim.Framework.Console
|
||||
return reply;
|
||||
}
|
||||
|
||||
private Hashtable HandleHttpPoll(Hashtable request)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
private Hashtable HandleHttpCloseSession(Hashtable request)
|
||||
{
|
||||
DoExpire();
|
||||
|
||||
@@ -425,5 +425,11 @@ namespace OpenSim.Framework
|
||||
AllowParcelChanges = ((regionFlags & (ulong)RegionFlags.AllowParcelChanges) == (ulong)RegionFlags.AllowParcelChanges);
|
||||
AllowSetHome = ((regionFlags & (ulong)RegionFlags.AllowSetHome) == (ulong)RegionFlags.AllowSetHome);
|
||||
}
|
||||
|
||||
public bool GroupAccess(UUID groupID)
|
||||
{
|
||||
return l_EstateGroups.Contains(groupID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,8 @@ namespace OpenSim.Framework
|
||||
public delegate void TeleportLandmarkRequest(
|
||||
IClientAPI remoteClient, AssetLandmark lm);
|
||||
|
||||
public delegate void TeleportCancel(IClientAPI remoteClient);
|
||||
|
||||
public delegate void DisconnectUser();
|
||||
|
||||
public delegate void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID);
|
||||
@@ -175,7 +177,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags,
|
||||
int landLocalID, UUID transactionID, int sequenceID,
|
||||
int sections, List<ParcelManager.ParcelAccessEntry> entries,
|
||||
int sections, List<LandAccessEntry> entries,
|
||||
IClientAPI remote_client);
|
||||
|
||||
public delegate void ParcelPropertiesRequest(
|
||||
@@ -359,6 +361,8 @@ namespace OpenSim.Framework
|
||||
|
||||
public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
|
||||
|
||||
public delegate void EstateManageTelehub(IClientAPI client, UUID invoice, UUID senderID, string cmd, UInt32 param1);
|
||||
|
||||
public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName);
|
||||
|
||||
public delegate void BakeTerrain(IClientAPI remoteClient);
|
||||
@@ -503,6 +507,7 @@ namespace OpenSim.Framework
|
||||
public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
|
||||
|
||||
public delegate void SendPostcard(IClientAPI client);
|
||||
public delegate void ChangeInventoryItemFlags(IClientAPI client, UUID itemID, uint flags);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -706,6 +711,12 @@ namespace OpenSim.Framework
|
||||
|
||||
UUID AgentId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
|
||||
/// is connected).
|
||||
/// </summary>
|
||||
ISceneAgent SceneAgent { get; }
|
||||
|
||||
UUID SessionId { get; }
|
||||
|
||||
UUID SecureSessionId { get; }
|
||||
@@ -765,6 +776,7 @@ namespace OpenSim.Framework
|
||||
event ModifyTerrain OnModifyTerrain;
|
||||
event BakeTerrain OnBakeTerrain;
|
||||
event EstateChangeInfo OnEstateChangeInfo;
|
||||
event EstateManageTelehub OnEstateManageTelehub;
|
||||
// [Obsolete("LLClientView Specific.")]
|
||||
event SetAppearance OnSetAppearance;
|
||||
// [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
|
||||
@@ -786,6 +798,7 @@ namespace OpenSim.Framework
|
||||
event RequestAvatarProperties OnRequestAvatarProperties;
|
||||
event SetAlwaysRun OnSetAlwaysRun;
|
||||
event TeleportLandmarkRequest OnTeleportLandmarkRequest;
|
||||
event TeleportCancel OnTeleportCancel;
|
||||
event DeRezObject OnDeRezObject;
|
||||
event Action<IClientAPI> OnRegionHandShakeReply;
|
||||
event GenericCall1 OnRequestWearables;
|
||||
@@ -1007,6 +1020,7 @@ namespace OpenSim.Framework
|
||||
event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
|
||||
event SimWideDeletesDelegate OnSimWideDeletes;
|
||||
event SendPostcard OnSendPostcard;
|
||||
event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
|
||||
event MuteListEntryUpdate OnUpdateMuteListEntry;
|
||||
event MuteListEntryRemove OnRemoveMuteListEntry;
|
||||
event GodlikeMessage onGodlikeMessage;
|
||||
@@ -1071,7 +1085,15 @@ namespace OpenSim.Framework
|
||||
void SendWindData(Vector2[] windSpeeds);
|
||||
void SendCloudData(float[] cloudCover);
|
||||
|
||||
/// <summary>
|
||||
/// Sent when an agent completes its movement into a region.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This packet marks completion of the arrival of a root avatar in a region, whether through login, region
|
||||
/// crossing or direct teleport.
|
||||
/// </remarks>
|
||||
void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
|
||||
|
||||
void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
|
||||
|
||||
/// <summary>
|
||||
@@ -1130,6 +1152,8 @@ namespace OpenSim.Framework
|
||||
|
||||
void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
|
||||
|
||||
void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint);
|
||||
|
||||
/// <summary>
|
||||
/// Used by the server to inform the client of new inventory items and folders.
|
||||
/// </summary>
|
||||
@@ -1219,7 +1243,7 @@ namespace OpenSim.Framework
|
||||
void SendEstateCovenantInformation(UUID covenant);
|
||||
|
||||
void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags,
|
||||
uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner);
|
||||
uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner);
|
||||
|
||||
/// <summary>
|
||||
/// Send land properties to the client.
|
||||
@@ -1235,7 +1259,7 @@ namespace OpenSim.Framework
|
||||
float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity,
|
||||
uint regionFlags);
|
||||
|
||||
void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID);
|
||||
void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID);
|
||||
void SendForceClientSelectObjects(List<uint> objectIDs);
|
||||
void SendCameraConstraint(Vector4 ConstraintPlane);
|
||||
void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount);
|
||||
|
||||
90
OpenSim/Framework/ICommandConsole.cs
Normal file
90
OpenSim/Framework/ICommandConsole.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public delegate void CommandDelegate(string module, string[] cmd);
|
||||
|
||||
public interface ICommands
|
||||
{
|
||||
void FromXml(XmlElement root, CommandDelegate fn);
|
||||
|
||||
/// <summary>
|
||||
/// Get help for the given help string
|
||||
/// </summary>
|
||||
/// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param>
|
||||
/// <returns></returns>
|
||||
List<string> GetHelp(string[] cmd);
|
||||
|
||||
/// <summary>
|
||||
/// Add a command to those which can be invoked from the console.
|
||||
/// </summary>
|
||||
/// <param name="module"></param>
|
||||
/// <param name="command"></param>
|
||||
/// <param name="help"></param>
|
||||
/// <param name="longhelp"></param>
|
||||
/// <param name="fn"></param>
|
||||
void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn);
|
||||
|
||||
/// <summary>
|
||||
/// Add a command to those which can be invoked from the console.
|
||||
/// </summary>
|
||||
/// <param name="module"></param>
|
||||
/// <param name="command"></param>
|
||||
/// <param name="help"></param>
|
||||
/// <param name="longhelp"></param>
|
||||
/// <param name="descriptivehelp"></param>
|
||||
/// <param name="fn"></param>
|
||||
void AddCommand(string module, bool shared, string command,
|
||||
string help, string longhelp, string descriptivehelp,
|
||||
CommandDelegate fn);
|
||||
|
||||
string[] FindNextOption(string[] cmd, bool term);
|
||||
|
||||
string[] Resolve(string[] cmd);
|
||||
|
||||
XmlElement GetXml(XmlDocument doc);
|
||||
}
|
||||
|
||||
public interface ICommandConsole : IConsole
|
||||
{
|
||||
ICommands Commands { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Display a command prompt on the console and wait for user input
|
||||
/// </summary>
|
||||
void Prompt();
|
||||
|
||||
void RunCommand(string cmd);
|
||||
|
||||
string ReadLine(string p, bool isCommand, bool e);
|
||||
}
|
||||
}
|
||||
@@ -25,44 +25,29 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public delegate void ExpectUserDelegate(AgentCircuitData agent);
|
||||
|
||||
|
||||
public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
|
||||
|
||||
public delegate void AgentCrossing(UUID agentID, Vector3 position, bool isFlying);
|
||||
|
||||
public delegate void PrimCrossing(UUID primID, Vector3 position, bool isPhysical);
|
||||
|
||||
public delegate void AcknowledgeAgentCross(UUID agentID);
|
||||
|
||||
public delegate void AcknowledgePrimCross(UUID PrimID);
|
||||
|
||||
public delegate bool CloseAgentConnection(UUID agentID);
|
||||
|
||||
public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData);
|
||||
|
||||
public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message);
|
||||
|
||||
public delegate LandData GetLandData(uint x, uint y);
|
||||
|
||||
public interface IRegionCommsListener
|
||||
public interface IConsole
|
||||
{
|
||||
event ExpectUserDelegate OnExpectUser;
|
||||
event GenericCall2 OnExpectChildAgent;
|
||||
event AgentCrossing OnAvatarCrossingIntoRegion;
|
||||
event PrimCrossing OnPrimCrossingIntoRegion;
|
||||
event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
|
||||
event AcknowledgePrimCross OnAcknowledgePrimCrossed;
|
||||
event UpdateNeighbours OnNeighboursUpdate;
|
||||
event CloseAgentConnection OnCloseAgentConnection;
|
||||
event ChildAgentUpdate OnChildAgentUpdate;
|
||||
event LogOffUser OnLogOffUser;
|
||||
event GetLandData OnGetLandData;
|
||||
object ConsoleScene { get; }
|
||||
|
||||
void Output(string text, string level);
|
||||
void Output(string text);
|
||||
void OutputFormat(string format, params object[] components);
|
||||
|
||||
string CmdPrompt(string p);
|
||||
string CmdPrompt(string p, string def);
|
||||
string CmdPrompt(string p, List<char> excludedCharacters);
|
||||
string CmdPrompt(string p, string def, List<char> excludedCharacters);
|
||||
|
||||
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
|
||||
string CmdPrompt(string prompt, string defaultresponse, List<string> options);
|
||||
|
||||
// Displays a prompt and waits for the user to enter a string, then returns that string
|
||||
// (Done with no echo and suitable for passwords)
|
||||
string PasswdPrompt(string p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,9 +73,9 @@ namespace OpenSim.Framework
|
||||
bool IsRestrictedFromLand(UUID avatar);
|
||||
void SendLandUpdateToClient(IClientAPI remote_client);
|
||||
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
|
||||
List<UUID> CreateAccessListArrayByFlag(AccessList flag);
|
||||
List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
|
||||
void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
|
||||
void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
|
||||
void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<LandAccessEntry> entries, IClientAPI remote_client);
|
||||
void UpdateLandBitmapByteArray();
|
||||
void SetLandBitmapFromByteArray();
|
||||
bool[,] GetLandBitmap();
|
||||
@@ -130,5 +130,11 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
void SetMusicUrl(string url);
|
||||
|
||||
/// <summary>
|
||||
/// Get the music url for this land parcel
|
||||
/// </summary>
|
||||
/// <returns>The music url.</returns>
|
||||
string GetMusicUrl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace OpenSim.Framework
|
||||
int amount);
|
||||
|
||||
int GetBalance(UUID agentID);
|
||||
bool UploadCovered(IClientAPI client, int amount);
|
||||
bool AmountCovered(IClientAPI client, int amount);
|
||||
bool UploadCovered(UUID agentID, int amount);
|
||||
bool AmountCovered(UUID agentID, int amount);
|
||||
void ApplyCharge(UUID agentID, int amount, string text);
|
||||
void ApplyUploadCharge(UUID agentID, int amount, string text);
|
||||
void MoveMoney(UUID fromUser, UUID toUser, int amount, string text);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Console;
|
||||
//using OpenSim.Framework.Console;
|
||||
using Nini.Config;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
@@ -68,12 +68,14 @@ namespace OpenSim.Framework
|
||||
event restart OnRestart;
|
||||
|
||||
/// <summary>
|
||||
/// Register the new client with the scene. The client starts off as a child agent - the later agent crossing
|
||||
/// will promote it to a root agent.
|
||||
/// Add a new client and create a presence for it. All clients except initial login clients will starts off as a child agent
|
||||
/// - the later agent crossing will promote it to a root agent.
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="type">The type of agent to add.</param>
|
||||
void AddNewClient(IClientAPI client, PresenceType type);
|
||||
/// <returns>
|
||||
/// The scene agent if the new client was added or if an agent that already existed.</returns>
|
||||
ISceneAgent AddNewClient(IClientAPI client, PresenceType type);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the given client from the scene.
|
||||
@@ -87,28 +89,31 @@ namespace OpenSim.Framework
|
||||
|
||||
string GetSimulatorVersion();
|
||||
|
||||
/// <summary>
|
||||
/// Is the agent denoted by the given agentID a child presence in this scene?
|
||||
/// </summary>
|
||||
///
|
||||
/// Used by ClientView when a 'kick everyone' or 'estate message' occurs
|
||||
///
|
||||
/// <param name="avatarID">AvatarID to lookup</param>
|
||||
/// <returns>true if the presence is a child agent, false if the presence is a root exception</returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// Thrown if the agent does not exist.
|
||||
/// </exception>
|
||||
bool PresenceChildStatus(UUID agentId);
|
||||
|
||||
bool TryGetScenePresence(UUID agentID, out object scenePresence);
|
||||
|
||||
T RequestModuleInterface<T>();
|
||||
T[] RequestModuleInterfaces<T>();
|
||||
|
||||
/// <summary>
|
||||
/// Register an interface to a region module. This allows module methods to be called directly as
|
||||
/// well as via events. If there is already a module registered for this interface, it is not replaced
|
||||
/// (is this the best behaviour?)
|
||||
/// </summary>
|
||||
/// <param name="mod"></param>
|
||||
void RegisterModuleInterface<M>(M mod);
|
||||
|
||||
void StackModuleInterface<M>(M mod);
|
||||
|
||||
void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
|
||||
/// <summary>
|
||||
/// For the given interface, retrieve the region module which implements it.
|
||||
/// </summary>
|
||||
/// <returns>null if there is no registered module implementing that interface</returns>
|
||||
T RequestModuleInterface<T>();
|
||||
|
||||
/// <summary>
|
||||
/// For the given interface, retrieve an array of region modules that implement it.
|
||||
/// </summary>
|
||||
/// <returns>an empty array if there are no registered modules implementing that interface</returns>
|
||||
T[] RequestModuleInterfaces<T>();
|
||||
|
||||
// void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
|
||||
|
||||
ISceneObject DeserializeObject(string representation);
|
||||
|
||||
|
||||
75
OpenSim/Framework/ISceneAgent.cs
Normal file
75
OpenSim/Framework/ISceneAgent.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// An agent in the scene.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Interface is a work in progress. Please feel free to add other required properties and methods.
|
||||
/// </remarks>
|
||||
public interface ISceneAgent : ISceneEntity
|
||||
{
|
||||
/// <value>
|
||||
/// The client controlling this presence
|
||||
/// </value>
|
||||
IClientAPI ControllingClient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// What type of presence is this? User, NPC, etc.
|
||||
/// </summary>
|
||||
PresenceType PresenceType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, then the agent has no avatar in the scene.
|
||||
/// The agent exists to relay data from a region that neighbours the current position of the user's avatar.
|
||||
/// Occasionally data is relayed, such as which a user clicks an item in a neighbouring region.
|
||||
/// </summary>
|
||||
bool IsChildAgent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Avatar appearance data.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
// Because appearance setting is in a module, we actually need
|
||||
// to give it access to our appearance directly, otherwise we
|
||||
// get a synchronization issue.
|
||||
/// </remarks>
|
||||
AvatarAppearance Appearance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Send initial scene data to the client controlling this agent
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This includes scene object data and the appearance data of other avatars.
|
||||
/// </remarks>
|
||||
void SendInitialDataToMe();
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ namespace OpenSim.Framework
|
||||
string Name { get; set; }
|
||||
UUID UUID { get; }
|
||||
uint LocalId { get; }
|
||||
|
||||
Vector3 AbsolutePosition { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,12 @@ namespace OpenSim.Framework
|
||||
public interface ISceneObject
|
||||
{
|
||||
UUID UUID { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The owner of this object.
|
||||
/// </summary>
|
||||
UUID OwnerID { get; set; }
|
||||
|
||||
ISceneObject CloneForNewScene();
|
||||
string ToXml2();
|
||||
string ExtraToXmlString();
|
||||
|
||||
@@ -34,6 +34,13 @@ using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class LandAccessEntry
|
||||
{
|
||||
public UUID AgentID;
|
||||
public int Expires;
|
||||
public AccessList Flags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Details of a Parcel of land
|
||||
/// </summary>
|
||||
@@ -73,7 +80,7 @@ namespace OpenSim.Framework
|
||||
private string _mediaURL = String.Empty;
|
||||
private string _musicURL = String.Empty;
|
||||
private UUID _ownerID = UUID.Zero;
|
||||
private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
private List<LandAccessEntry> _parcelAccessList = new List<LandAccessEntry>();
|
||||
private float _passHours = 0;
|
||||
private int _passPrice = 0;
|
||||
private int _salePrice = 0; //Unemeplemented. Parcels price.
|
||||
@@ -450,7 +457,7 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// List of access data for the parcel. User data, some bitflags, and a time
|
||||
/// </summary>
|
||||
public List<ParcelManager.ParcelAccessEntry> ParcelAccessList {
|
||||
public List<LandAccessEntry> ParcelAccessList {
|
||||
get {
|
||||
return _parcelAccessList;
|
||||
}
|
||||
@@ -638,12 +645,12 @@ namespace OpenSim.Framework
|
||||
landData._simwidePrims = _simwidePrims;
|
||||
|
||||
landData._parcelAccessList.Clear();
|
||||
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
|
||||
foreach (LandAccessEntry entry in _parcelAccessList)
|
||||
{
|
||||
ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry newEntry = new LandAccessEntry();
|
||||
newEntry.AgentID = entry.AgentID;
|
||||
newEntry.Flags = entry.Flags;
|
||||
newEntry.Time = entry.Time;
|
||||
newEntry.Expires = entry.Expires;
|
||||
|
||||
landData._parcelAccessList.Add(newEntry);
|
||||
}
|
||||
@@ -668,4 +675,4 @@ namespace OpenSim.Framework
|
||||
return land;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class MainConsole
|
||||
{
|
||||
private static CommandConsole instance;
|
||||
private static ICommandConsole instance;
|
||||
|
||||
public static CommandConsole Instance
|
||||
public static ICommandConsole Instance
|
||||
{
|
||||
get { return instance; }
|
||||
set { instance = value; }
|
||||
@@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Sandbox mode region comms listener. There is one of these per region
|
||||
/// </summary>
|
||||
public class RegionCommsListener : IRegionCommsListener
|
||||
{
|
||||
public string debugRegionName = String.Empty;
|
||||
private AcknowledgeAgentCross handlerAcknowledgeAgentCrossed = null; // OnAcknowledgeAgentCrossed;
|
||||
private AcknowledgePrimCross handlerAcknowledgePrimCrossed = null; // OnAcknowledgePrimCrossed;
|
||||
private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion;
|
||||
private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate;
|
||||
private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection;
|
||||
private GenericCall2 handlerExpectChildAgent = null; // OnExpectChildAgent;
|
||||
private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser
|
||||
private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate;
|
||||
// private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
|
||||
private LogOffUser handlerLogOffUser = null;
|
||||
private GetLandData handlerGetLandData = null;
|
||||
|
||||
#region IRegionCommsListener Members
|
||||
|
||||
public event ExpectUserDelegate OnExpectUser;
|
||||
public event GenericCall2 OnExpectChildAgent;
|
||||
public event AgentCrossing OnAvatarCrossingIntoRegion;
|
||||
public event PrimCrossing OnPrimCrossingIntoRegion;
|
||||
public event UpdateNeighbours OnNeighboursUpdate;
|
||||
public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
|
||||
public event AcknowledgePrimCross OnAcknowledgePrimCrossed;
|
||||
public event CloseAgentConnection OnCloseAgentConnection;
|
||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||
public event LogOffUser OnLogOffUser;
|
||||
public event GetLandData OnGetLandData;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="agent"></param>
|
||||
/// <returns></returns>
|
||||
public virtual bool TriggerExpectUser(AgentCircuitData agent)
|
||||
{
|
||||
handlerExpectUser = OnExpectUser;
|
||||
if (handlerExpectUser != null)
|
||||
{
|
||||
handlerExpectUser(agent);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// From User Server
|
||||
public virtual void TriggerLogOffUser(UUID agentID, UUID RegionSecret, string message)
|
||||
{
|
||||
handlerLogOffUser = OnLogOffUser;
|
||||
if (handlerLogOffUser != null)
|
||||
{
|
||||
handlerLogOffUser(agentID, RegionSecret, message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData)
|
||||
{
|
||||
handlerChildAgentUpdate = OnChildAgentUpdate;
|
||||
if (handlerChildAgentUpdate != null)
|
||||
{
|
||||
handlerChildAgentUpdate(cAgentData);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool TriggerExpectAvatarCrossing(UUID agentID, Vector3 position, bool isFlying)
|
||||
{
|
||||
handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
|
||||
if (handlerAvatarCrossingIntoRegion != null)
|
||||
{
|
||||
handlerAvatarCrossingIntoRegion(agentID, position, isFlying);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool TriggerAcknowledgeAgentCrossed(UUID agentID)
|
||||
{
|
||||
handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed;
|
||||
if (handlerAcknowledgeAgentCrossed != null)
|
||||
{
|
||||
handlerAcknowledgeAgentCrossed(agentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool TriggerAcknowledgePrimCrossed(UUID primID)
|
||||
{
|
||||
handlerAcknowledgePrimCrossed = OnAcknowledgePrimCrossed;
|
||||
if (handlerAcknowledgePrimCrossed != null)
|
||||
{
|
||||
handlerAcknowledgePrimCrossed(primID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool TriggerCloseAgentConnection(UUID agentID)
|
||||
{
|
||||
handlerCloseAgentConnection = OnCloseAgentConnection;
|
||||
if (handlerCloseAgentConnection != null)
|
||||
{
|
||||
handlerCloseAgentConnection(agentID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>TODO: Doesnt take any args??</remarks>
|
||||
/// <returns></returns>
|
||||
public virtual bool TriggerExpectChildAgent()
|
||||
{
|
||||
handlerExpectChildAgent = OnExpectChildAgent;
|
||||
if (handlerExpectChildAgent != null)
|
||||
{
|
||||
handlerExpectChildAgent();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks>
|
||||
/// <param name="neighbours"></param>
|
||||
/// <returns></returns>
|
||||
public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours)
|
||||
{
|
||||
handlerNeighboursUpdate = OnNeighboursUpdate;
|
||||
if (handlerNeighboursUpdate != null)
|
||||
{
|
||||
handlerNeighboursUpdate(neighbours);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TriggerTellRegionToCloseChildConnection(UUID agentID)
|
||||
{
|
||||
handlerCloseAgentConnection = OnCloseAgentConnection;
|
||||
if (handlerCloseAgentConnection != null)
|
||||
return handlerCloseAgentConnection(agentID);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public LandData TriggerGetLandData(uint x, uint y)
|
||||
{
|
||||
handlerGetLandData = OnGetLandData;
|
||||
if (handlerGetLandData != null)
|
||||
return handlerGetLandData(x, y);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenSim.Framework.Console;
|
||||
//using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
@@ -143,6 +143,8 @@ namespace OpenSim.Framework
|
||||
public string RemotingAddress;
|
||||
public UUID ScopeID = UUID.Zero;
|
||||
|
||||
private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>();
|
||||
|
||||
|
||||
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
||||
|
||||
@@ -445,6 +447,22 @@ namespace OpenSim.Framework
|
||||
m_internalEndPoint = tmpEPE;
|
||||
}
|
||||
|
||||
public string GetOtherSetting(string key)
|
||||
{
|
||||
string val;
|
||||
string keylower = key.ToLower();
|
||||
if (m_otherSettings.TryGetValue(keylower, out val))
|
||||
return val;
|
||||
m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void SetOtherSetting(string key, string value)
|
||||
{
|
||||
string keylower = key.ToLower();
|
||||
m_otherSettings[keylower] = value;
|
||||
}
|
||||
|
||||
private void ReadNiniConfig(IConfigSource source, string name)
|
||||
{
|
||||
// bool creatingNew = false;
|
||||
@@ -473,30 +491,39 @@ namespace OpenSim.Framework
|
||||
if (source.Configs[name] == null)
|
||||
{
|
||||
source.AddConfig(name);
|
||||
|
||||
// creatingNew = true;
|
||||
}
|
||||
|
||||
RegionName = name;
|
||||
IConfig config = source.Configs[name];
|
||||
|
||||
// UUID
|
||||
//
|
||||
string regionUUID = config.GetString("RegionUUID", string.Empty);
|
||||
// Track all of the keys in this config and remove as they are processed
|
||||
// The remaining keys will be added to generic key-value storage for
|
||||
// whoever might need it
|
||||
HashSet<String> allKeys = new HashSet<String>();
|
||||
foreach (string s in config.GetKeys())
|
||||
{
|
||||
allKeys.Add(s);
|
||||
}
|
||||
|
||||
// RegionUUID
|
||||
//
|
||||
allKeys.Remove("RegionUUID");
|
||||
string regionUUID = config.GetString("RegionUUID", string.Empty);
|
||||
if (regionUUID == String.Empty)
|
||||
{
|
||||
UUID newID = UUID.Random();
|
||||
|
||||
regionUUID = MainConsole.Instance.CmdPrompt("Region UUID", newID.ToString());
|
||||
regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString());
|
||||
config.Set("RegionUUID", regionUUID);
|
||||
}
|
||||
|
||||
RegionID = new UUID(regionUUID);
|
||||
originRegionID = RegionID; // What IS this?!
|
||||
originRegionID = RegionID; // What IS this?! (Needed for RegionCombinerModule?)
|
||||
|
||||
RegionName = name;
|
||||
// Location
|
||||
//
|
||||
allKeys.Remove("Location");
|
||||
string location = config.GetString("Location", String.Empty);
|
||||
|
||||
if (location == String.Empty)
|
||||
{
|
||||
location = MainConsole.Instance.CmdPrompt("Region Location", "1000,1000");
|
||||
@@ -508,13 +535,10 @@ namespace OpenSim.Framework
|
||||
m_regionLocX = Convert.ToUInt32(locationElements[0]);
|
||||
m_regionLocY = Convert.ToUInt32(locationElements[1]);
|
||||
|
||||
|
||||
// Datastore (is this implemented? Omitted from example!)
|
||||
DataStore = config.GetString("Datastore", String.Empty);
|
||||
|
||||
// Internal IP
|
||||
// InternalAddress
|
||||
//
|
||||
IPAddress address;
|
||||
|
||||
allKeys.Remove("InternalAddress");
|
||||
if (config.Contains("InternalAddress"))
|
||||
{
|
||||
address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
|
||||
@@ -525,8 +549,10 @@ namespace OpenSim.Framework
|
||||
config.Set("InternalAddress", address.ToString());
|
||||
}
|
||||
|
||||
// InternalPort
|
||||
//
|
||||
int port;
|
||||
|
||||
allKeys.Remove("InternalPort");
|
||||
if (config.Contains("InternalPort"))
|
||||
{
|
||||
port = config.GetInt("InternalPort", 9000);
|
||||
@@ -536,9 +562,11 @@ namespace OpenSim.Framework
|
||||
port = Convert.ToInt32(MainConsole.Instance.CmdPrompt("Internal port", "9000"));
|
||||
config.Set("InternalPort", port);
|
||||
}
|
||||
|
||||
m_internalEndPoint = new IPEndPoint(address, port);
|
||||
|
||||
// AllowAlternatePorts
|
||||
//
|
||||
allKeys.Remove("AllowAlternatePorts");
|
||||
if (config.Contains("AllowAlternatePorts"))
|
||||
{
|
||||
m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
|
||||
@@ -550,10 +578,10 @@ namespace OpenSim.Framework
|
||||
config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
|
||||
}
|
||||
|
||||
// External IP
|
||||
// ExternalHostName
|
||||
//
|
||||
allKeys.Remove("ExternalHostName");
|
||||
string externalName;
|
||||
|
||||
if (config.Contains("ExternalHostName"))
|
||||
{
|
||||
externalName = config.GetString("ExternalHostName", "SYSTEMIP");
|
||||
@@ -563,7 +591,6 @@ namespace OpenSim.Framework
|
||||
externalName = MainConsole.Instance.CmdPrompt("External host name", "SYSTEMIP");
|
||||
config.Set("ExternalHostName", externalName);
|
||||
}
|
||||
|
||||
if (externalName == "SYSTEMIP")
|
||||
{
|
||||
m_externalHostName = Util.GetLocalHost().ToString();
|
||||
@@ -576,24 +603,32 @@ namespace OpenSim.Framework
|
||||
m_externalHostName = externalName;
|
||||
}
|
||||
|
||||
// RegionType
|
||||
m_regionType = config.GetString("RegionType", String.Empty);
|
||||
allKeys.Remove("RegionType");
|
||||
|
||||
// Prim stuff
|
||||
//
|
||||
m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256);
|
||||
|
||||
m_physPrimMax = config.GetInt("PhysicalPrimMax", 10);
|
||||
|
||||
m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0);
|
||||
allKeys.Remove("NonphysicalPrimMax");
|
||||
m_physPrimMax = config.GetInt("PhysicalPrimMax", 0);
|
||||
allKeys.Remove("PhysicalPrimMax");
|
||||
m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
|
||||
|
||||
allKeys.Remove("ClampPrimSize");
|
||||
m_objectCapacity = config.GetInt("MaxPrims", 15000);
|
||||
|
||||
allKeys.Remove("MaxPrims");
|
||||
m_agentCapacity = config.GetInt("MaxAgents", 100);
|
||||
|
||||
allKeys.Remove("MaxAgents");
|
||||
|
||||
// Multi-tenancy
|
||||
//
|
||||
ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
|
||||
allKeys.Remove("ScopeID");
|
||||
|
||||
foreach (String s in allKeys)
|
||||
{
|
||||
SetOtherSetting(s, config.GetString(s));
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteNiniConfig(IConfigSource source)
|
||||
|
||||
@@ -26,11 +26,53 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public struct SpawnPoint
|
||||
{
|
||||
public float Yaw;
|
||||
public float Pitch;
|
||||
public float Distance;
|
||||
|
||||
public void SetLocation(Vector3 pos, Quaternion rot, Vector3 point)
|
||||
{
|
||||
// The point is an absolute position, so we need the relative
|
||||
// location to the spawn point
|
||||
Vector3 offset = point - pos;
|
||||
Distance = Vector3.Mag(offset);
|
||||
|
||||
// Next we need to rotate this vector into the spawn point's
|
||||
// coordinate system
|
||||
rot.W = -rot.W;
|
||||
offset = offset * rot;
|
||||
|
||||
Vector3 dir = Vector3.Normalize(offset);
|
||||
|
||||
// Get the bearing (yaw)
|
||||
Yaw = (float)Math.Atan2(dir.Y, dir.X);
|
||||
|
||||
// Get the elevation (pitch)
|
||||
Pitch = (float)-Math.Atan2(dir.Z, Math.Sqrt(dir.X * dir.X + dir.Y * dir.Y));
|
||||
}
|
||||
|
||||
public Vector3 GetLocation(Vector3 pos, Quaternion rot)
|
||||
{
|
||||
Quaternion y = Quaternion.CreateFromEulers(0, 0, Yaw);
|
||||
Quaternion p = Quaternion.CreateFromEulers(0, Pitch, 0);
|
||||
|
||||
Vector3 dir = new Vector3(1, 0, 0) * p * y;
|
||||
Vector3 offset = dir * (float)Distance;
|
||||
|
||||
offset *= rot;
|
||||
|
||||
return pos + offset;
|
||||
}
|
||||
}
|
||||
|
||||
public class RegionSettings
|
||||
{
|
||||
public delegate void SaveDelegate(RegionSettings rs);
|
||||
@@ -331,6 +373,14 @@ namespace OpenSim.Framework
|
||||
set { m_SunVector = value; }
|
||||
}
|
||||
|
||||
private UUID m_ParcelImageID;
|
||||
|
||||
public UUID ParcelImageID
|
||||
{
|
||||
get { return m_ParcelImageID; }
|
||||
set { m_ParcelImageID = value; }
|
||||
}
|
||||
|
||||
private UUID m_TerrainImageID;
|
||||
|
||||
public UUID TerrainImageID
|
||||
@@ -363,6 +413,14 @@ namespace OpenSim.Framework
|
||||
set { m_Covenant = value; }
|
||||
}
|
||||
|
||||
private int m_CovenantChanged = 0;
|
||||
|
||||
public int CovenantChangedDateTime
|
||||
{
|
||||
get { return m_CovenantChanged; }
|
||||
set { m_CovenantChanged = value; }
|
||||
}
|
||||
|
||||
private int m_LoadedCreationDateTime;
|
||||
public int LoadedCreationDateTime
|
||||
{
|
||||
@@ -410,5 +468,58 @@ namespace OpenSim.Framework
|
||||
get { return m_Casino; }
|
||||
set { m_Casino = value; }
|
||||
}
|
||||
|
||||
// Telehub support
|
||||
private bool m_TelehubEnabled = false;
|
||||
public bool HasTelehub
|
||||
{
|
||||
get { return m_TelehubEnabled; }
|
||||
set { m_TelehubEnabled = value; }
|
||||
}
|
||||
|
||||
// Connected Telehub object
|
||||
private UUID m_TelehubObject;
|
||||
public UUID TelehubObject
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TelehubObject;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_TelehubObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Our Connected Telehub's SpawnPoints
|
||||
public List<SpawnPoint> l_SpawnPoints = new List<SpawnPoint>();
|
||||
|
||||
// Add a SpawnPoint
|
||||
// ** These are not region coordinates **
|
||||
// They are relative to the Telehub coordinates
|
||||
//
|
||||
public void AddSpawnPoint(SpawnPoint point)
|
||||
{
|
||||
l_SpawnPoints.Add(point);
|
||||
}
|
||||
|
||||
// Remove a SpawnPoint
|
||||
public void RemoveSpawnPoint(int point_index)
|
||||
{
|
||||
l_SpawnPoints.RemoveAt(point_index);
|
||||
}
|
||||
|
||||
// Return the List of SpawnPoints
|
||||
public List<SpawnPoint> SpawnPoints()
|
||||
{
|
||||
return l_SpawnPoints;
|
||||
|
||||
}
|
||||
|
||||
// Clear the SpawnPoints List of all entries
|
||||
public void ClearSpawnPoints()
|
||||
{
|
||||
l_SpawnPoints.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,13 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
@@ -39,18 +41,86 @@ namespace OpenSim.Framework.Serialization.External
|
||||
/// </summary>
|
||||
public class ExternalRepresentationUtils
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Populate a node with data read from xml using a dictinoary of processors
|
||||
/// </summary>
|
||||
/// <param name="nodeToFill"></param>
|
||||
/// <param name="processors">/param>
|
||||
/// <param name="xtr"></param>
|
||||
public static void ExecuteReadProcessors<NodeType>(
|
||||
NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlTextReader>> processors, XmlTextReader xtr)
|
||||
{
|
||||
ExecuteReadProcessors(
|
||||
nodeToFill,
|
||||
processors,
|
||||
xtr,
|
||||
(o, name, e)
|
||||
=> m_log.ErrorFormat(
|
||||
"[ExternalRepresentationUtils]: Exception while parsing element {0}, continuing. Exception {1}{2}",
|
||||
name, e.Message, e.StackTrace));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Populate a node with data read from xml using a dictinoary of processors
|
||||
/// </summary>
|
||||
/// <param name="nodeToFill"></param>
|
||||
/// <param name="processors"></param>
|
||||
/// <param name="xtr"></param>
|
||||
/// <param name="parseExceptionAction">
|
||||
/// Action to take if there is a parsing problem. This will usually just be to log the exception
|
||||
/// </param>
|
||||
public static void ExecuteReadProcessors<NodeType>(
|
||||
NodeType nodeToFill,
|
||||
Dictionary<string, Action<NodeType, XmlTextReader>> processors,
|
||||
XmlTextReader xtr,
|
||||
Action<NodeType, string, Exception> parseExceptionAction)
|
||||
{
|
||||
string nodeName = string.Empty;
|
||||
while (xtr.NodeType != XmlNodeType.EndElement)
|
||||
{
|
||||
nodeName = xtr.Name;
|
||||
|
||||
// m_log.DebugFormat("[ExternalRepresentationUtils]: Processing: {0}", nodeName);
|
||||
|
||||
Action<NodeType, XmlTextReader> p = null;
|
||||
if (processors.TryGetValue(xtr.Name, out p))
|
||||
{
|
||||
// m_log.DebugFormat("[ExternalRepresentationUtils]: Found {0} processor, nodeName);
|
||||
|
||||
try
|
||||
{
|
||||
p(nodeToFill, xtr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
parseExceptionAction(nodeToFill, nodeName, e);
|
||||
|
||||
if (xtr.NodeType == XmlNodeType.EndElement)
|
||||
xtr.Read();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// m_log.DebugFormat("[LandDataSerializer]: caught unknown element {0}", nodeName);
|
||||
xtr.ReadOuterXml(); // ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes a XML representation of a SceneObjectPart and returns another XML representation
|
||||
/// with creator data added to it.
|
||||
/// </summary>
|
||||
/// <param name="xml">The SceneObjectPart represented in XML2</param>
|
||||
/// <param name="profileURL">The URL of the profile service for the creator</param>
|
||||
/// <param name="homeURL">The URL of the user agents service (home) for the creator</param>
|
||||
/// <param name="userService">The service for retrieving user account information</param>
|
||||
/// <param name="scopeID">The scope of the user account information (Grid ID)</param>
|
||||
/// <returns>The SceneObjectPart represented in XML2</returns>
|
||||
public static string RewriteSOP(string xml, string profileURL, IUserAccountService userService, UUID scopeID)
|
||||
public static string RewriteSOP(string xml, string homeURL, IUserAccountService userService, UUID scopeID)
|
||||
{
|
||||
if (xml == string.Empty || profileURL == string.Empty || userService == null)
|
||||
if (xml == string.Empty || homeURL == string.Empty || userService == null)
|
||||
return xml;
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
@@ -83,7 +153,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||
if (!hasCreatorData && creator != null)
|
||||
{
|
||||
XmlElement creatorData = doc.CreateElement("CreatorData");
|
||||
creatorData.InnerText = profileURL + "/" + creator.PrincipalID + ";" + creator.FirstName + " " + creator.LastName;
|
||||
creatorData.InnerText = homeURL + ";" + creator.FirstName + " " + creator.LastName;
|
||||
sop.AppendChild(creatorData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
||||
@@ -40,8 +42,119 @@ namespace OpenSim.Framework.Serialization.External
|
||||
/// </summary>
|
||||
public class LandDataSerializer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
|
||||
|
||||
private static Dictionary<string, Action<LandData, XmlTextReader>> m_ldProcessors
|
||||
= new Dictionary<string, Action<LandData, XmlTextReader>>();
|
||||
|
||||
private static Dictionary<string, Action<LandAccessEntry, XmlTextReader>> m_laeProcessors
|
||||
= new Dictionary<string, Action<LandAccessEntry, XmlTextReader>>();
|
||||
|
||||
static LandDataSerializer()
|
||||
{
|
||||
// LandData processors
|
||||
m_ldProcessors.Add(
|
||||
"Area", (ld, xtr) => ld.Area = Convert.ToInt32(xtr.ReadElementString("Area")));
|
||||
m_ldProcessors.Add(
|
||||
"AuctionID", (ld, xtr) => ld.AuctionID = Convert.ToUInt32(xtr.ReadElementString("AuctionID")));
|
||||
m_ldProcessors.Add(
|
||||
"AuthBuyerID", (ld, xtr) => ld.AuthBuyerID = UUID.Parse(xtr.ReadElementString("AuthBuyerID")));
|
||||
m_ldProcessors.Add(
|
||||
"Category", (ld, xtr) => ld.Category = (ParcelCategory)Convert.ToSByte(xtr.ReadElementString("Category")));
|
||||
m_ldProcessors.Add(
|
||||
"ClaimDate", (ld, xtr) => ld.ClaimDate = Convert.ToInt32(xtr.ReadElementString("ClaimDate")));
|
||||
m_ldProcessors.Add(
|
||||
"ClaimPrice", (ld, xtr) => ld.ClaimPrice = Convert.ToInt32(xtr.ReadElementString("ClaimPrice")));
|
||||
m_ldProcessors.Add(
|
||||
"GlobalID", (ld, xtr) => ld.GlobalID = UUID.Parse(xtr.ReadElementString("GlobalID")));
|
||||
m_ldProcessors.Add(
|
||||
"GroupID", (ld, xtr) => ld.GroupID = UUID.Parse(xtr.ReadElementString("GroupID")));
|
||||
m_ldProcessors.Add(
|
||||
"IsGroupOwned", (ld, xtr) => ld.IsGroupOwned = Convert.ToBoolean(xtr.ReadElementString("IsGroupOwned")));
|
||||
m_ldProcessors.Add(
|
||||
"Bitmap", (ld, xtr) => ld.Bitmap = Convert.FromBase64String(xtr.ReadElementString("Bitmap")));
|
||||
m_ldProcessors.Add(
|
||||
"Description", (ld, xtr) => ld.Description = xtr.ReadElementString("Description"));
|
||||
m_ldProcessors.Add(
|
||||
"Flags", (ld, xtr) => ld.Flags = Convert.ToUInt32(xtr.ReadElementString("Flags")));
|
||||
m_ldProcessors.Add(
|
||||
"LandingType", (ld, xtr) => ld.LandingType = Convert.ToByte(xtr.ReadElementString("LandingType")));
|
||||
m_ldProcessors.Add(
|
||||
"Name", (ld, xtr) => ld.Name = xtr.ReadElementString("Name"));
|
||||
m_ldProcessors.Add(
|
||||
"Status", (ld, xtr) => ld.Status = (ParcelStatus)Convert.ToSByte(xtr.ReadElementString("Status")));
|
||||
m_ldProcessors.Add(
|
||||
"LocalID", (ld, xtr) => ld.LocalID = Convert.ToInt32(xtr.ReadElementString("LocalID")));
|
||||
m_ldProcessors.Add(
|
||||
"MediaAutoScale", (ld, xtr) => ld.MediaAutoScale = Convert.ToByte(xtr.ReadElementString("MediaAutoScale")));
|
||||
m_ldProcessors.Add(
|
||||
"MediaID", (ld, xtr) => ld.MediaID = UUID.Parse(xtr.ReadElementString("MediaID")));
|
||||
m_ldProcessors.Add(
|
||||
"MediaURL", (ld, xtr) => ld.MediaURL = xtr.ReadElementString("MediaURL"));
|
||||
m_ldProcessors.Add(
|
||||
"MusicURL", (ld, xtr) => ld.MusicURL = xtr.ReadElementString("MusicURL"));
|
||||
|
||||
m_ldProcessors.Add(
|
||||
"ParcelAccessList", ProcessParcelAccessList);
|
||||
|
||||
m_ldProcessors.Add(
|
||||
"PassHours", (ld, xtr) => ld.PassHours = Convert.ToSingle(xtr.ReadElementString("PassHours")));
|
||||
m_ldProcessors.Add(
|
||||
"PassPrice", (ld, xtr) => ld.PassPrice = Convert.ToInt32(xtr.ReadElementString("PassPrice")));
|
||||
m_ldProcessors.Add(
|
||||
"SalePrice", (ld, xtr) => ld.SalePrice = Convert.ToInt32(xtr.ReadElementString("SalePrice")));
|
||||
m_ldProcessors.Add(
|
||||
"SnapshotID", (ld, xtr) => ld.SnapshotID = UUID.Parse(xtr.ReadElementString("SnapshotID")));
|
||||
m_ldProcessors.Add(
|
||||
"UserLocation", (ld, xtr) => ld.UserLocation = Vector3.Parse(xtr.ReadElementString("UserLocation")));
|
||||
m_ldProcessors.Add(
|
||||
"UserLookAt", (ld, xtr) => ld.UserLookAt = Vector3.Parse(xtr.ReadElementString("UserLookAt")));
|
||||
|
||||
// No longer used here //
|
||||
// m_ldProcessors.Add("Dwell", (landData, xtr) => return);
|
||||
|
||||
m_ldProcessors.Add(
|
||||
"OtherCleanTime", (ld, xtr) => ld.OtherCleanTime = Convert.ToInt32(xtr.ReadElementString("OtherCleanTime")));
|
||||
|
||||
// LandAccessEntryProcessors
|
||||
m_laeProcessors.Add(
|
||||
"AgentID", (lae, xtr) => lae.AgentID = UUID.Parse(xtr.ReadElementString("AgentID")));
|
||||
m_laeProcessors.Add(
|
||||
"Time", (lae, xtr) =>
|
||||
{
|
||||
// We really don't care about temp vs perm here and this
|
||||
// would break on old oars. Assume all bans are perm
|
||||
xtr.ReadElementString("Time");
|
||||
lae.Expires = 0; // Convert.ToUint( xtr.ReadElementString("Time"));
|
||||
}
|
||||
);
|
||||
m_laeProcessors.Add(
|
||||
"AccessList", (lae, xtr) => lae.Flags = (AccessList)Convert.ToUInt32(xtr.ReadElementString("AccessList")));
|
||||
}
|
||||
|
||||
public static void ProcessParcelAccessList(LandData ld, XmlTextReader xtr)
|
||||
{
|
||||
if (!xtr.IsEmptyElement)
|
||||
{
|
||||
while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
|
||||
{
|
||||
LandAccessEntry lae = new LandAccessEntry();
|
||||
|
||||
xtr.ReadStartElement("ParcelAccessEntry");
|
||||
|
||||
ExternalRepresentationUtils.ExecuteReadProcessors<LandAccessEntry>(lae, m_laeProcessors, xtr);
|
||||
|
||||
xtr.ReadEndElement();
|
||||
|
||||
ld.ParcelAccessList.Add(lae);
|
||||
}
|
||||
}
|
||||
|
||||
xtr.Read();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reify/deserialize landData
|
||||
/// </summary>
|
||||
@@ -63,69 +176,14 @@ namespace OpenSim.Framework.Serialization.External
|
||||
{
|
||||
LandData landData = new LandData();
|
||||
|
||||
StringReader sr = new StringReader(serializedLandData);
|
||||
XmlTextReader xtr = new XmlTextReader(sr);
|
||||
|
||||
xtr.ReadStartElement("LandData");
|
||||
|
||||
landData.Area = Convert.ToInt32( xtr.ReadElementString("Area"));
|
||||
landData.AuctionID = Convert.ToUInt32( xtr.ReadElementString("AuctionID"));
|
||||
landData.AuthBuyerID = UUID.Parse( xtr.ReadElementString("AuthBuyerID"));
|
||||
landData.Category = (ParcelCategory)Convert.ToSByte( xtr.ReadElementString("Category"));
|
||||
landData.ClaimDate = Convert.ToInt32( xtr.ReadElementString("ClaimDate"));
|
||||
landData.ClaimPrice = Convert.ToInt32( xtr.ReadElementString("ClaimPrice"));
|
||||
landData.GlobalID = UUID.Parse( xtr.ReadElementString("GlobalID"));
|
||||
landData.GroupID = UUID.Parse( xtr.ReadElementString("GroupID"));
|
||||
landData.IsGroupOwned = Convert.ToBoolean( xtr.ReadElementString("IsGroupOwned"));
|
||||
landData.Bitmap = Convert.FromBase64String( xtr.ReadElementString("Bitmap"));
|
||||
landData.Description = xtr.ReadElementString("Description");
|
||||
landData.Flags = Convert.ToUInt32( xtr.ReadElementString("Flags"));
|
||||
landData.LandingType = Convert.ToByte( xtr.ReadElementString("LandingType"));
|
||||
landData.Name = xtr.ReadElementString("Name");
|
||||
landData.Status = (ParcelStatus)Convert.ToSByte( xtr.ReadElementString("Status"));
|
||||
landData.LocalID = Convert.ToInt32( xtr.ReadElementString("LocalID"));
|
||||
landData.MediaAutoScale = Convert.ToByte( xtr.ReadElementString("MediaAutoScale"));
|
||||
landData.MediaID = UUID.Parse( xtr.ReadElementString("MediaID"));
|
||||
landData.MediaURL = xtr.ReadElementString("MediaURL");
|
||||
landData.MusicURL = xtr.ReadElementString("MusicURL");
|
||||
landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID"));
|
||||
|
||||
landData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||
xtr.Read();
|
||||
if (xtr.Name != "ParcelAccessList")
|
||||
throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name));
|
||||
|
||||
if (!xtr.IsEmptyElement)
|
||||
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
|
||||
{
|
||||
while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
|
||||
{
|
||||
ParcelManager.ParcelAccessEntry pae = new ParcelManager.ParcelAccessEntry();
|
||||
reader.ReadStartElement("LandData");
|
||||
|
||||
xtr.ReadStartElement("ParcelAccessEntry");
|
||||
pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID"));
|
||||
pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time"));
|
||||
pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
|
||||
xtr.ReadEndElement();
|
||||
ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader);
|
||||
|
||||
landData.ParcelAccessList.Add(pae);
|
||||
}
|
||||
reader.ReadEndElement();
|
||||
}
|
||||
xtr.Read();
|
||||
|
||||
landData.PassHours = Convert.ToSingle( xtr.ReadElementString("PassHours"));
|
||||
landData.PassPrice = Convert.ToInt32( xtr.ReadElementString("PassPrice"));
|
||||
landData.SalePrice = Convert.ToInt32( xtr.ReadElementString("SalePrice"));
|
||||
landData.SnapshotID = UUID.Parse( xtr.ReadElementString("SnapshotID"));
|
||||
landData.UserLocation = Vector3.Parse( xtr.ReadElementString("UserLocation"));
|
||||
landData.UserLookAt = Vector3.Parse( xtr.ReadElementString("UserLookAt"));
|
||||
// No longer used here
|
||||
xtr.ReadElementString("Dwell");
|
||||
landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime"));
|
||||
|
||||
xtr.ReadEndElement();
|
||||
|
||||
xtr.Close();
|
||||
sr.Close();
|
||||
|
||||
return landData;
|
||||
}
|
||||
@@ -162,11 +220,11 @@ namespace OpenSim.Framework.Serialization.External
|
||||
xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
|
||||
|
||||
xtw.WriteStartElement("ParcelAccessList");
|
||||
foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList)
|
||||
foreach (LandAccessEntry pal in landData.ParcelAccessList)
|
||||
{
|
||||
xtw.WriteStartElement("ParcelAccessEntry");
|
||||
xtw.WriteElementString("AgentID", pal.AgentID.ToString());
|
||||
xtw.WriteElementString("Time", pal.Time.ToString("s"));
|
||||
xtw.WriteElementString("Time", pal.Expires.ToString());
|
||||
xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags));
|
||||
xtw.WriteEndElement();
|
||||
}
|
||||
|
||||
@@ -41,14 +41,13 @@ namespace OpenSim.Framework.Serialization.External
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize and deserialize user inventory items as an external format.
|
||||
/// </summary>
|
||||
/// XXX: Please do not use yet.
|
||||
/// </summary>
|
||||
public class UserInventoryItemSerializer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private delegate void InventoryItemXmlProcessor(InventoryItemBase item, XmlTextReader reader);
|
||||
private static Dictionary<string, InventoryItemXmlProcessor> m_InventoryItemXmlProcessors = new Dictionary<string, InventoryItemXmlProcessor>();
|
||||
private static Dictionary<string, Action<InventoryItemBase, XmlTextReader>> m_InventoryItemXmlProcessors
|
||||
= new Dictionary<string, Action<InventoryItemBase, XmlTextReader>>();
|
||||
|
||||
#region InventoryItemBase Processor initialization
|
||||
static UserInventoryItemSerializer()
|
||||
@@ -205,39 +204,14 @@ namespace OpenSim.Framework.Serialization.External
|
||||
{
|
||||
reader.ReadStartElement("InventoryItem");
|
||||
|
||||
string nodeName = string.Empty;
|
||||
while (reader.NodeType != XmlNodeType.EndElement)
|
||||
{
|
||||
nodeName = reader.Name;
|
||||
InventoryItemXmlProcessor p = null;
|
||||
if (m_InventoryItemXmlProcessors.TryGetValue(reader.Name, out p))
|
||||
{
|
||||
//m_log.DebugFormat("[XXX] Processing: {0}", reader.Name);
|
||||
try
|
||||
{
|
||||
p(item, reader);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[InventoryItemSerializer]: exception while parsing {0}: {1}", nodeName, e);
|
||||
if (reader.NodeType == XmlNodeType.EndElement)
|
||||
reader.Read();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// m_log.DebugFormat("[InventoryItemSerializer]: caught unknown element {0}", nodeName);
|
||||
reader.ReadOuterXml(); // ignore
|
||||
}
|
||||
|
||||
}
|
||||
ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>(
|
||||
item, m_InventoryItemXmlProcessors, reader);
|
||||
|
||||
reader.ReadEndElement(); // InventoryItem
|
||||
}
|
||||
|
||||
//m_log.DebugFormat("[XXX]: parsed InventoryItemBase {0} - {1}", obj.Name, obj.UUID);
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
public static string Serialize(InventoryItemBase inventoryItem, Dictionary<string, object> options, IUserAccountService userAccountService)
|
||||
@@ -305,14 +279,14 @@ namespace OpenSim.Framework.Serialization.External
|
||||
writer.WriteEndElement();
|
||||
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
|
||||
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
|
||||
else if (options.ContainsKey("profile"))
|
||||
else if (options.ContainsKey("home"))
|
||||
{
|
||||
if (userAccountService != null)
|
||||
{
|
||||
UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
|
||||
if (account != null)
|
||||
{
|
||||
writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName);
|
||||
writer.WriteElementString("CreatorData", (string)options["home"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName);
|
||||
}
|
||||
writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
|
||||
}
|
||||
|
||||
@@ -33,8 +33,11 @@ using OpenSim.Framework;
|
||||
namespace OpenSim.Framework.Serialization.External
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize and deserialize region settings as an external format.
|
||||
/// Serialize and deserialize user profiles as an external format.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Currently UNUSED.
|
||||
/// </remarks>
|
||||
public class UserProfileSerializer
|
||||
{
|
||||
public const int MAJOR_VERSION = 0;
|
||||
|
||||
@@ -27,11 +27,12 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Serialization.External;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using NUnit.Framework;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Serialization.External;
|
||||
using OpenSim.Tests.Common;
|
||||
|
||||
namespace OpenSim.Framework.Serialization.Tests
|
||||
{
|
||||
@@ -42,7 +43,7 @@ namespace OpenSim.Framework.Serialization.Tests
|
||||
private LandData landWithParcelAccessList;
|
||||
|
||||
private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
|
||||
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
|
||||
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>0</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>0</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
|
||||
|
||||
[SetUp]
|
||||
public void setup()
|
||||
@@ -73,16 +74,16 @@ namespace OpenSim.Framework.Serialization.Tests
|
||||
this.landWithParcelAccessList = this.land.Copy();
|
||||
this.landWithParcelAccessList.ParcelAccessList.Clear();
|
||||
|
||||
ParcelManager.ParcelAccessEntry pae0 = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry pae0 = new LandAccessEntry();
|
||||
pae0.AgentID = new UUID("62d65d45-c91a-4f77-862c-46557d978b6c");
|
||||
pae0.Flags = AccessList.Ban;
|
||||
pae0.Time = new DateTime(2009, 10, 01);
|
||||
pae0.Expires = 0;
|
||||
this.landWithParcelAccessList.ParcelAccessList.Add(pae0);
|
||||
|
||||
ParcelManager.ParcelAccessEntry pae1 = new ParcelManager.ParcelAccessEntry();
|
||||
LandAccessEntry pae1 = new LandAccessEntry();
|
||||
pae1.AgentID = new UUID("ec2a8d18-2378-4fe0-8b68-2a31b57c481e");
|
||||
pae1.Flags = AccessList.Access;
|
||||
pae1.Time = new DateTime(2010, 10, 20);
|
||||
pae1.Expires = 0;
|
||||
this.landWithParcelAccessList.ParcelAccessList.Add(pae1);
|
||||
}
|
||||
|
||||
@@ -92,6 +93,8 @@ namespace OpenSim.Framework.Serialization.Tests
|
||||
[Test]
|
||||
public void LandDataSerializerSerializeTest()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
string serialized = LandDataSerializer.Serialize(this.land).Replace("\r\n", "\n");
|
||||
Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string");
|
||||
|
||||
@@ -112,20 +115,32 @@ namespace OpenSim.Framework.Serialization.Tests
|
||||
/// Test the LandDataSerializer.Deserialize() method
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLandDataSerializerDeserializeFromStringTest()
|
||||
public void TestLandDataDeserializeNoAccessLists()
|
||||
{
|
||||
LandData reifiedLandData = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerialized);
|
||||
Assert.That(reifiedLandData != null, "Deserialize(string) returned null");
|
||||
Assert.That(reifiedLandData.GlobalID == this.land.GlobalID, "Reified LandData.GlobalID != original LandData.GlobalID");
|
||||
Assert.That(reifiedLandData.Name == this.land.Name, "Reified LandData.Name != original LandData.Name");
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
LandData reifiedLandDataWithParcelAccessList = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerializedWithParcelAccessList);
|
||||
Assert.That(reifiedLandDataWithParcelAccessList != null,
|
||||
LandData ld = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerialized);
|
||||
Assert.That(ld != null, "Deserialize(string) returned null");
|
||||
Assert.That(ld.GlobalID == this.land.GlobalID, "Reified LandData.GlobalID != original LandData.GlobalID");
|
||||
Assert.That(ld.Name == this.land.Name, "Reified LandData.Name != original LandData.Name");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLandDataDeserializeWithAccessLists()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
LandData ld = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerializedWithParcelAccessList);
|
||||
Assert.That(ld != null,
|
||||
"Deserialize(string) returned null (pre-serialized with parcel access list)");
|
||||
Assert.That(reifiedLandDataWithParcelAccessList.GlobalID == this.landWithParcelAccessList.GlobalID,
|
||||
Assert.That(ld.GlobalID == this.landWithParcelAccessList.GlobalID,
|
||||
"Reified LandData.GlobalID != original LandData.GlobalID (pre-serialized with parcel access list)");
|
||||
Assert.That(reifiedLandDataWithParcelAccessList.Name == this.landWithParcelAccessList.Name,
|
||||
Assert.That(ld.Name == this.landWithParcelAccessList.Name,
|
||||
"Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)");
|
||||
Assert.That(ld.ParcelAccessList.Count, Is.EqualTo(2));
|
||||
Assert.That(ld.ParcelAccessList[0].AgentID, Is.EqualTo(UUID.Parse("62d65d45-c91a-4f77-862c-46557d978b6c")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using NUnit.Framework;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Serialization.External;
|
||||
using OpenSim.Tests.Common;
|
||||
|
||||
namespace OpenSim.Framework.Serialization.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class RegionSettingsSerializerTests
|
||||
{
|
||||
private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?>
|
||||
<RegionSettings>
|
||||
<General>
|
||||
<AllowDamage>True</AllowDamage>
|
||||
<AllowLandResell>True</AllowLandResell>
|
||||
<AllowLandJoinDivide>True</AllowLandJoinDivide>
|
||||
<BlockFly>True</BlockFly>
|
||||
<BlockLandShowInSearch>True</BlockLandShowInSearch>
|
||||
<BlockTerraform>True</BlockTerraform>
|
||||
<DisableCollisions>True</DisableCollisions>
|
||||
<DisablePhysics>True</DisablePhysics>
|
||||
<DisableScripts>True</DisableScripts>
|
||||
<MaturityRating>1</MaturityRating>
|
||||
<RestrictPushing>True</RestrictPushing>
|
||||
<AgentLimit>40</AgentLimit>
|
||||
<ObjectBonus>1.4</ObjectBonus>
|
||||
</General>
|
||||
<GroundTextures>
|
||||
<Texture1>00000000-0000-0000-0000-000000000020</Texture1>
|
||||
<Texture2>00000000-0000-0000-0000-000000000040</Texture2>
|
||||
<Texture3>00000000-0000-0000-0000-000000000060</Texture3>
|
||||
<Texture4>00000000-0000-0000-0000-000000000080</Texture4>
|
||||
<ElevationLowSW>1.9</ElevationLowSW>
|
||||
<ElevationLowNW>15.9</ElevationLowNW>
|
||||
<ElevationLowSE>49</ElevationLowSE>
|
||||
<ElevationLowNE>45.3</ElevationLowNE>
|
||||
<ElevationHighSW>2.1</ElevationHighSW>
|
||||
<ElevationHighNW>4.5</ElevationHighNW>
|
||||
<ElevationHighSE>9.2</ElevationHighSE>
|
||||
<ElevationHighNE>19.2</ElevationHighNE>
|
||||
</GroundTextures>
|
||||
<Terrain>
|
||||
<WaterHeight>23</WaterHeight>
|
||||
<TerrainRaiseLimit>17.9</TerrainRaiseLimit>
|
||||
<TerrainLowerLimit>0.4</TerrainLowerLimit>
|
||||
<UseEstateSun>True</UseEstateSun>
|
||||
<FixedSun>true</FixedSun>
|
||||
<SunPosition>12</SunPosition>
|
||||
</Terrain>
|
||||
</RegionSettings>";
|
||||
|
||||
private RegionSettings m_rs;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
m_rs = new RegionSettings();
|
||||
m_rs.AgentLimit = 17;
|
||||
m_rs.AllowDamage = true;
|
||||
m_rs.AllowLandJoinDivide = true;
|
||||
m_rs.AllowLandResell = true;
|
||||
m_rs.BlockFly = true;
|
||||
m_rs.BlockShowInSearch = true;
|
||||
m_rs.BlockTerraform = true;
|
||||
m_rs.DisableCollisions = true;
|
||||
m_rs.DisablePhysics = true;
|
||||
m_rs.DisableScripts = true;
|
||||
m_rs.Elevation1NW = 15.9;
|
||||
m_rs.Elevation1NE = 45.3;
|
||||
m_rs.Elevation1SE = 49;
|
||||
m_rs.Elevation1SW = 1.9;
|
||||
m_rs.Elevation2NW = 4.5;
|
||||
m_rs.Elevation2NE = 19.2;
|
||||
m_rs.Elevation2SE = 9.2;
|
||||
m_rs.Elevation2SW = 2.1;
|
||||
m_rs.FixedSun = true;
|
||||
m_rs.SunPosition = 12.0;
|
||||
m_rs.ObjectBonus = 1.4;
|
||||
m_rs.RestrictPushing = true;
|
||||
m_rs.TerrainLowerLimit = 0.4;
|
||||
m_rs.TerrainRaiseLimit = 17.9;
|
||||
m_rs.TerrainTexture1 = UUID.Parse("00000000-0000-0000-0000-000000000020");
|
||||
m_rs.TerrainTexture2 = UUID.Parse("00000000-0000-0000-0000-000000000040");
|
||||
m_rs.TerrainTexture3 = UUID.Parse("00000000-0000-0000-0000-000000000060");
|
||||
m_rs.TerrainTexture4 = UUID.Parse("00000000-0000-0000-0000-000000000080");
|
||||
m_rs.UseEstateSun = true;
|
||||
m_rs.WaterHeight = 23;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRegionSettingsDeserialize()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
RegionSettings deserRs = RegionSettingsSerializer.Deserialize(m_serializedRs);
|
||||
Assert.That(deserRs, Is.Not.Null);
|
||||
Assert.That(deserRs.TerrainTexture2, Is.EqualTo(m_rs.TerrainTexture2));
|
||||
Assert.That(deserRs.DisablePhysics, Is.EqualTo(m_rs.DisablePhysics));
|
||||
Assert.That(deserRs.TerrainLowerLimit, Is.EqualTo(m_rs.TerrainLowerLimit));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,6 +192,15 @@ namespace OpenSim.Framework.Servers
|
||||
m_console.Commands.AddCommand("base", false, "show version",
|
||||
"show version",
|
||||
"Show server version", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("base", false, "threads abort",
|
||||
"threads abort <thread-id>",
|
||||
"Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort);
|
||||
|
||||
m_console.Commands.AddCommand("base", false, "threads show",
|
||||
"threads show",
|
||||
"Show thread status. Synonym for \"show threads\"",
|
||||
(string module, string[] args) => Notice(GetThreadsReport()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,17 +243,32 @@ namespace OpenSim.Framework.Servers
|
||||
/// </summary>
|
||||
protected string GetThreadsReport()
|
||||
{
|
||||
// This should be a constant field.
|
||||
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
|
||||
|
||||
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
|
||||
|
||||
int timeNow = Environment.TickCount & Int32.MaxValue;
|
||||
|
||||
sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
|
||||
sb.Append(Environment.NewLine);
|
||||
|
||||
foreach (Watchdog.ThreadWatchdogInfo twi in threads)
|
||||
{
|
||||
Thread t = twi.Thread;
|
||||
|
||||
sb.Append(
|
||||
"ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: "
|
||||
+ "Pri: " + t.Priority + ", State: " + t.ThreadState);
|
||||
sb.AppendFormat(
|
||||
reportFormat,
|
||||
t.ManagedThreadId,
|
||||
t.Name,
|
||||
timeNow - twi.LastTick,
|
||||
timeNow - twi.FirstTick,
|
||||
t.Priority,
|
||||
t.ThreadState);
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
}
|
||||
|
||||
@@ -395,6 +419,27 @@ namespace OpenSim.Framework.Servers
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void HandleThreadsAbort(string module, string[] cmd)
|
||||
{
|
||||
if (cmd.Length != 3)
|
||||
{
|
||||
MainConsole.Instance.Output("Usage: threads abort <thread-id>");
|
||||
return;
|
||||
}
|
||||
|
||||
int threadId;
|
||||
if (!int.TryParse(cmd[2], out threadId))
|
||||
{
|
||||
MainConsole.Instance.Output("ERROR: Thread id must be an integer");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Watchdog.AbortThread(threadId))
|
||||
MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
|
||||
else
|
||||
MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
|
||||
}
|
||||
|
||||
protected void ShowInfo()
|
||||
{
|
||||
@@ -555,7 +600,7 @@ namespace OpenSim.Framework.Servers
|
||||
|
||||
}
|
||||
|
||||
public string StatReport(OSHttpRequest httpRequest)
|
||||
public string StatReport(IOSHttpRequest httpRequest)
|
||||
{
|
||||
// If we catch a request for "callback", wrap the response in the value for jsonp
|
||||
if (httpRequest.Query.ContainsKey("callback"))
|
||||
|
||||
@@ -79,6 +79,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
private PollServiceRequestManager m_PollServiceManager;
|
||||
|
||||
/// <summary>
|
||||
/// Control the printing of certain debug messages.
|
||||
/// </summary>
|
||||
public int DebugLevel { get; set; }
|
||||
|
||||
public uint SSLPort
|
||||
{
|
||||
get { return m_sslport; }
|
||||
@@ -222,21 +227,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
return new List<string>(m_HTTPHandlers.Keys);
|
||||
}
|
||||
|
||||
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
|
||||
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args)
|
||||
{
|
||||
bool pollHandlerResult = false;
|
||||
lock (m_pollHandlers)
|
||||
{
|
||||
if (!m_pollHandlers.ContainsKey(methodName))
|
||||
{
|
||||
m_pollHandlers.Add(methodName,args);
|
||||
pollHandlerResult = true;
|
||||
m_pollHandlers.Add(methodName, args);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (pollHandlerResult)
|
||||
return AddHTTPHandler(methodName, handler);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -442,17 +443,18 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
string path = request.RawUrl;
|
||||
string handlerKey = GetHandlerKey(request.HttpMethod, path);
|
||||
|
||||
// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
|
||||
|
||||
if (TryGetStreamHandler(handlerKey, out requestHandler))
|
||||
{
|
||||
//m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler");
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found stream handler for {0} {1}",
|
||||
request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
|
||||
byte[] buffer = null;
|
||||
|
||||
response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
|
||||
|
||||
|
||||
if (requestHandler is IStreamedRequestHandler)
|
||||
{
|
||||
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
|
||||
@@ -480,7 +482,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
string[] querystringkeys = request.QueryString.AllKeys;
|
||||
string[] rHeaders = request.Headers.AllKeys;
|
||||
|
||||
|
||||
foreach (string queryname in querystringkeys)
|
||||
{
|
||||
keysvals.Add(queryname, request.QueryString[queryname]);
|
||||
@@ -556,6 +557,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -566,7 +568,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
if (strAccept.Contains("application/llsd+xml") ||
|
||||
strAccept.Contains("application/llsd+json"))
|
||||
{
|
||||
//m_log.Info("[Debug BASE HTTP SERVER]: Found an application/llsd+xml accept header");
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found application/llsd+xml accept header handler for {0} {1}",
|
||||
request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
HandleLLSDRequests(request, response);
|
||||
return;
|
||||
}
|
||||
@@ -577,15 +583,24 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
case null:
|
||||
case "text/html":
|
||||
// m_log.DebugFormat(
|
||||
// "[BASE HTTP SERVER]: Found a text/html content type for request {0}", request.RawUrl);
|
||||
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
|
||||
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
HandleHTTPRequest(request, response);
|
||||
return;
|
||||
|
||||
case "application/llsd+xml":
|
||||
case "application/xml+llsd":
|
||||
case "application/llsd+json":
|
||||
//m_log.Info("[Debug BASE HTTP SERVER]: found a application/llsd+xml content type");
|
||||
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
|
||||
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
HandleLLSDRequests(request, response);
|
||||
return;
|
||||
|
||||
@@ -602,7 +617,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
//m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler");
|
||||
if (DoWeHaveALLSDHandler(request.RawUrl))
|
||||
{
|
||||
//m_log.Info("[Debug BASE HTTP SERVER]: Found LLSD Handler");
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
|
||||
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
HandleLLSDRequests(request, response);
|
||||
return;
|
||||
}
|
||||
@@ -610,12 +629,20 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
// m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
|
||||
if (DoWeHaveAHTTPHandler(request.RawUrl))
|
||||
{
|
||||
// m_log.DebugFormat("[BASE HTTP SERVER]: Found HTTP Handler for request {0}", request.RawUrl);
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
|
||||
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
HandleHTTPRequest(request, response);
|
||||
return;
|
||||
}
|
||||
|
||||
//m_log.Info("[Debug BASE HTTP SERVER]: Generic XMLRPC");
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}",
|
||||
request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
// generic login request.
|
||||
HandleXmlRpcRequests(request, response);
|
||||
|
||||
@@ -872,7 +899,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
byte[] buf = Encoding.UTF8.GetBytes("Not found");
|
||||
response.KeepAlive = false;
|
||||
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
|
||||
m_log.ErrorFormat(
|
||||
"[BASE HTTP SERVER]: Handler not found for http request {0} {1}",
|
||||
request.HttpMethod, request.Url.PathAndQuery);
|
||||
|
||||
response.SendChunked = false;
|
||||
response.ContentLength64 = buf.Length;
|
||||
@@ -978,7 +1007,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
if (llsdRequest != null)// && m_defaultLlsdHandler != null)
|
||||
{
|
||||
|
||||
LLSDMethod llsdhandler = null;
|
||||
|
||||
if (TryGetLLSDHandler(request.RawUrl, out llsdhandler) && !LegacyLLSDLoginLibOMV)
|
||||
@@ -1002,13 +1030,14 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
llsdResponse = GenerateNoLLSDHandlerResponse();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
llsdResponse = GenerateNoLLSDHandlerResponse();
|
||||
}
|
||||
|
||||
byte[] buffer = new byte[0];
|
||||
|
||||
if (llsdResponse.ToString() == "shutdown404!")
|
||||
{
|
||||
response.ContentType = "text/plain";
|
||||
@@ -1837,14 +1866,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
public void RemovePollServiceHTTPHandler(string httpMethod, string path)
|
||||
{
|
||||
lock (m_pollHandlers)
|
||||
{
|
||||
if (m_pollHandlers.ContainsKey(httpMethod))
|
||||
{
|
||||
m_pollHandlers.Remove(httpMethod);
|
||||
}
|
||||
}
|
||||
|
||||
RemoveHTTPHandler(httpMethod, path);
|
||||
m_pollHandlers.Remove(path);
|
||||
}
|
||||
|
||||
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
|
||||
@@ -1866,12 +1888,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
public void RemoveXmlRPCHandler(string method)
|
||||
{
|
||||
lock (m_rpcHandlers)
|
||||
{
|
||||
if (m_rpcHandlers.ContainsKey(method))
|
||||
{
|
||||
m_rpcHandlers.Remove(method);
|
||||
}
|
||||
}
|
||||
m_rpcHandlers.Remove(method);
|
||||
}
|
||||
|
||||
public bool RemoveLLSDHandler(string path, LLSDMethod handler)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
|
||||
{
|
||||
public abstract byte[] Handle(string path, Stream request,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
|
||||
|
||||
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
private BinaryMethod m_method;
|
||||
|
||||
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
byte[] data = ReadFully(request);
|
||||
string param = GetParam(path);
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
/// <summary>
|
||||
/// Add a handler for an HTTP request.
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// This handler can actually be invoked either as
|
||||
///
|
||||
/// http://<hostname>:<port>/?method=<methodName>
|
||||
@@ -70,15 +70,15 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
/// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request
|
||||
/// URI. So if a handler for "/myapp/" is registered and a request for "/myapp/page" is received, then
|
||||
/// the "/myapp/" handler is invoked if no "/myapp/page" handler exists.
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="methodName"></param>
|
||||
/// <param name="handler"></param>
|
||||
/// <returns>
|
||||
/// true if the handler was successfully registered, false if a handler with the same name already existed.
|
||||
/// </returns>
|
||||
bool AddHTTPHandler(string methodName, GenericHTTPMethod handler);
|
||||
|
||||
bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args);
|
||||
|
||||
bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a LLSD handler, yay.
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public interface IOSHttpRequest
|
||||
{
|
||||
string[] AcceptTypes { get; }
|
||||
Encoding ContentEncoding { get; }
|
||||
long ContentLength { get; }
|
||||
long ContentLength64 { get; }
|
||||
string ContentType { get; }
|
||||
HttpCookieCollection Cookies { get; }
|
||||
bool HasEntityBody { get; }
|
||||
NameValueCollection Headers { get; }
|
||||
string HttpMethod { get; }
|
||||
Stream InputStream { get; }
|
||||
bool IsSecured { get; }
|
||||
bool KeepAlive { get; }
|
||||
NameValueCollection QueryString { get; }
|
||||
Hashtable Query { get; }
|
||||
string RawUrl { get; }
|
||||
IPEndPoint RemoteIPEndPoint { get; }
|
||||
Uri Url { get; }
|
||||
string UserAgent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public interface IOSHttpResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Content type property.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Setting this property will also set IsContentTypeSet to
|
||||
/// true.
|
||||
/// </remarks>
|
||||
string ContentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean property indicating whether the content type
|
||||
/// property actively has been set.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// IsContentTypeSet will go away together with .NET base.
|
||||
/// </remarks>
|
||||
// public bool IsContentTypeSet
|
||||
// {
|
||||
// get { return _contentTypeSet; }
|
||||
// }
|
||||
// private bool _contentTypeSet;
|
||||
|
||||
/// <summary>
|
||||
/// Length of the body content; 0 if there is no body.
|
||||
/// </summary>
|
||||
long ContentLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alias for ContentLength.
|
||||
/// </summary>
|
||||
long ContentLength64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Encoding of the body content.
|
||||
/// </summary>
|
||||
Encoding ContentEncoding { get; set; }
|
||||
|
||||
bool KeepAlive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the keep alive timeout property (default is
|
||||
/// 20). Setting this to 0 also disables KeepAlive. Setting
|
||||
/// this to something else but 0 also enable KeepAlive.
|
||||
/// </summary>
|
||||
int KeepAliveTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the output stream feeding the body.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// On its way out...
|
||||
/// </remarks>
|
||||
Stream OutputStream { get; }
|
||||
|
||||
string ProtocolVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the output stream feeding the body.
|
||||
/// </summary>
|
||||
Stream Body { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set a redirct location.
|
||||
/// </summary>
|
||||
string RedirectLocation { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Chunk transfers.
|
||||
/// </summary>
|
||||
bool SendChunked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// HTTP status code.
|
||||
/// </summary>
|
||||
int StatusCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// HTTP status description.
|
||||
/// </summary>
|
||||
string StatusDescription { get; set; }
|
||||
|
||||
bool ReuseContext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Add a header field and content to the response.
|
||||
/// </summary>
|
||||
/// <param name="key">string containing the header field
|
||||
/// name</param>
|
||||
/// <param name="value">string containing the header field
|
||||
/// value</param>
|
||||
void AddHeader(string key, string value);
|
||||
|
||||
/// <summary>
|
||||
/// Send the response back to the remote client
|
||||
/// </summary>
|
||||
void Send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
public interface IStreamedRequestHandler : IRequestHandler
|
||||
{
|
||||
// Handle request stream, return byte array
|
||||
byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
||||
byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
|
||||
}
|
||||
|
||||
public interface IStreamHandler : IRequestHandler
|
||||
{
|
||||
// Handle request stream, return byte array
|
||||
void Handle(string path, Stream request, Stream response, OSHttpRequest httpReqbuest, OSHttpResponse httpResponse);
|
||||
void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse);
|
||||
}
|
||||
|
||||
public interface IGenericHTTPHandler : IRequestHandler
|
||||
|
||||
@@ -39,7 +39,7 @@ using log4net;
|
||||
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public class OSHttpRequest
|
||||
public class OSHttpRequest : IOSHttpRequest
|
||||
{
|
||||
private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -174,7 +174,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
private Dictionary<string, object> _whiteboard = new Dictionary<string, object>();
|
||||
|
||||
|
||||
public OSHttpRequest() {}
|
||||
|
||||
public OSHttpRequest(IHttpClientContext context, IHttpRequest req)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
/// OSHttpResponse is the OpenSim representation of an HTTP
|
||||
/// response.
|
||||
/// </summary>
|
||||
public class OSHttpResponse
|
||||
public class OSHttpResponse : IOSHttpResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Content type property.
|
||||
@@ -275,7 +275,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected IHttpResponse _httpResponse;
|
||||
private IHttpClientContext _httpClientContext;
|
||||
|
||||
@@ -331,4 +330,4 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,22 +28,24 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using HttpServer;
|
||||
using OpenSim.Framework;
|
||||
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public class PollServiceRequestManager
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private readonly BaseHttpServer m_server;
|
||||
private static Queue m_requests = Queue.Synchronized(new Queue());
|
||||
private uint m_WorkerThreadCount = 0;
|
||||
private Thread[] m_workerThreads;
|
||||
private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
|
||||
private Thread m_watcherThread;
|
||||
private bool m_running = true;
|
||||
|
||||
|
||||
|
||||
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
|
||||
{
|
||||
m_server = pSrv;
|
||||
@@ -52,22 +54,26 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
|
||||
|
||||
//startup worker threads
|
||||
for (uint i=0;i<m_WorkerThreadCount;i++)
|
||||
for (uint i = 0; i < m_WorkerThreadCount; i++)
|
||||
{
|
||||
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, pTimeout);
|
||||
m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
|
||||
|
||||
m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart);
|
||||
m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i);
|
||||
//Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference
|
||||
m_workerThreads[i].Start();
|
||||
|
||||
|
||||
m_workerThreads[i]
|
||||
= Watchdog.StartThread(
|
||||
m_PollServiceWorkerThreads[i].ThreadStart,
|
||||
String.Format("PollServiceWorkerThread{0}", i),
|
||||
ThreadPriority.Normal,
|
||||
false,
|
||||
int.MaxValue);
|
||||
}
|
||||
|
||||
//start watcher threads
|
||||
m_watcherThread = new Thread(ThreadStart);
|
||||
m_watcherThread.Name = "PollServiceWatcherThread";
|
||||
m_watcherThread.Start();
|
||||
Watchdog.StartThread(
|
||||
this.ThreadStart,
|
||||
"PollServiceWatcherThread",
|
||||
ThreadPriority.Normal,
|
||||
false,
|
||||
1000 * 60 * 10);
|
||||
}
|
||||
|
||||
internal void ReQueueEvent(PollServiceHttpRequest req)
|
||||
@@ -82,10 +88,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_requests.Enqueue(req);
|
||||
}
|
||||
|
||||
public void ThreadStart(object o)
|
||||
public void ThreadStart()
|
||||
{
|
||||
while (m_running)
|
||||
{
|
||||
Watchdog.UpdateThread();
|
||||
ProcessQueuedRequests();
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
@@ -98,12 +105,15 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
if (m_requests.Count == 0)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat("[POLL SERVICE REQUEST MANAGER]: Processing {0} requests", m_requests.Count);
|
||||
|
||||
int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1;
|
||||
|
||||
// For Each WorkerThread
|
||||
for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++)
|
||||
{
|
||||
//Loop over number of requests each thread handles.
|
||||
for (int i=0;i<reqperthread && m_requests.Count > 0;i++)
|
||||
for (int i = 0; i < reqperthread && m_requests.Count > 0; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -121,14 +131,14 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
~PollServiceRequestManager()
|
||||
{
|
||||
foreach (object o in m_requests)
|
||||
{
|
||||
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
|
||||
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
|
||||
m_server.DoHTTPGruntWork(
|
||||
req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id),
|
||||
new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
|
||||
}
|
||||
|
||||
m_requests.Clear();
|
||||
@@ -140,4 +150,4 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_running = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_timeout = pTimeout;
|
||||
}
|
||||
|
||||
public void ThreadStart(object o)
|
||||
public void ThreadStart()
|
||||
{
|
||||
Run();
|
||||
}
|
||||
@@ -69,6 +69,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
while (m_running)
|
||||
{
|
||||
PollServiceHttpRequest req = m_request.Dequeue();
|
||||
|
||||
Watchdog.UpdateThread();
|
||||
|
||||
try
|
||||
{
|
||||
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
|
||||
public void Handle(string path, Stream request, Stream responseStream,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
TRequest deserial;
|
||||
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
||||
|
||||
@@ -28,5 +28,5 @@
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public delegate string RestMethod(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
|
||||
public void Handle(string path, Stream request, Stream responseStream,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
RestSessionObject<TRequest> deserial = default(RestSessionObject<TRequest>);
|
||||
bool fail = false;
|
||||
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
|
||||
public void Handle(string path, Stream request, Stream responseStream,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
TRequest deserial = default(TRequest);
|
||||
bool fail = false;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
get { return m_restMethod; }
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
Encoding encoding = Encoding.UTF8;
|
||||
StreamReader streamReader = new StreamReader(request, encoding);
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Net;
|
||||
using log4net;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
public class MainServer
|
||||
{
|
||||
@@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics
|
||||
{
|
||||
private long abnormalClientThreadTerminations;
|
||||
|
||||
private long assetsInCache;
|
||||
private long texturesInCache;
|
||||
private long assetCacheMemoryUsage;
|
||||
private long textureCacheMemoryUsage;
|
||||
private TimeSpan assetRequestTimeAfterCacheMiss;
|
||||
private long blockedMissingTextureRequests;
|
||||
// private long assetsInCache;
|
||||
// private long texturesInCache;
|
||||
// private long assetCacheMemoryUsage;
|
||||
// private long textureCacheMemoryUsage;
|
||||
// private TimeSpan assetRequestTimeAfterCacheMiss;
|
||||
// private long blockedMissingTextureRequests;
|
||||
|
||||
private long assetServiceRequestFailures;
|
||||
private long inventoryServiceRetrievalFailures;
|
||||
// private long assetServiceRequestFailures;
|
||||
// private long inventoryServiceRetrievalFailures;
|
||||
|
||||
private volatile float timeDilation;
|
||||
private volatile float simFps;
|
||||
@@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics
|
||||
/// </summary>
|
||||
public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
|
||||
|
||||
/// <summary>
|
||||
/// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
|
||||
/// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
|
||||
/// haven't yet been implemented...
|
||||
/// </summary>
|
||||
public long AssetsInCache { get { return assetsInCache; } }
|
||||
|
||||
/// <value>
|
||||
/// Currently unused
|
||||
/// </value>
|
||||
public long TexturesInCache { get { return texturesInCache; } }
|
||||
|
||||
/// <value>
|
||||
/// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
|
||||
/// </value>
|
||||
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
|
||||
|
||||
/// <value>
|
||||
/// Currently unused
|
||||
/// </value>
|
||||
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
|
||||
// /// <summary>
|
||||
// /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
|
||||
// /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
|
||||
// /// haven't yet been implemented...
|
||||
// /// </summary>
|
||||
// public long AssetsInCache { get { return assetsInCache; } }
|
||||
//
|
||||
// /// <value>
|
||||
// /// Currently unused
|
||||
// /// </value>
|
||||
// public long TexturesInCache { get { return texturesInCache; } }
|
||||
//
|
||||
// /// <value>
|
||||
// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
|
||||
// /// </value>
|
||||
// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
|
||||
//
|
||||
// /// <value>
|
||||
// /// Currently unused
|
||||
// /// </value>
|
||||
// public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
|
||||
|
||||
public float TimeDilation { get { return timeDilation; } }
|
||||
public float SimFps { get { return simFps; } }
|
||||
@@ -123,32 +123,33 @@ namespace OpenSim.Framework.Statistics
|
||||
public float ActiveScripts { get { return activeScripts; } }
|
||||
public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
|
||||
|
||||
/// <summary>
|
||||
/// This is the time it took for the last asset request made in response to a cache miss.
|
||||
/// </summary>
|
||||
public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
|
||||
|
||||
/// <summary>
|
||||
/// Number of persistent requests for missing textures we have started blocking from clients. To some extent
|
||||
/// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
|
||||
/// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
|
||||
/// driver bugs on clients (though this seems less likely).
|
||||
/// </summary>
|
||||
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
|
||||
|
||||
/// <summary>
|
||||
/// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
|
||||
/// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
|
||||
/// as a failure
|
||||
/// </summary>
|
||||
public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
|
||||
// /// <summary>
|
||||
// /// This is the time it took for the last asset request made in response to a cache miss.
|
||||
// /// </summary>
|
||||
// public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
|
||||
// /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
|
||||
// /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
|
||||
// /// driver bugs on clients (though this seems less likely).
|
||||
// /// </summary>
|
||||
// public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
|
||||
// /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
|
||||
// /// as a failure
|
||||
// /// </summary>
|
||||
// public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
|
||||
|
||||
/// <summary>
|
||||
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not
|
||||
/// cover situations where the inventory service accepts the request but never returns any data, since
|
||||
/// we do not yet timeout this situation.
|
||||
/// </summary>
|
||||
public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
|
||||
/// <remarks>Commented out because we do not cache inventory at this point</remarks>
|
||||
// public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the total frame time (in ms) of the last frame
|
||||
@@ -171,58 +172,58 @@ namespace OpenSim.Framework.Statistics
|
||||
abnormalClientThreadTerminations++;
|
||||
}
|
||||
|
||||
public void AddAsset(AssetBase asset)
|
||||
{
|
||||
assetsInCache++;
|
||||
//assetCacheMemoryUsage += asset.Data.Length;
|
||||
}
|
||||
|
||||
public void RemoveAsset(UUID uuid)
|
||||
{
|
||||
assetsInCache--;
|
||||
}
|
||||
// public void AddAsset(AssetBase asset)
|
||||
// {
|
||||
// assetsInCache++;
|
||||
// //assetCacheMemoryUsage += asset.Data.Length;
|
||||
// }
|
||||
//
|
||||
// public void RemoveAsset(UUID uuid)
|
||||
// {
|
||||
// assetsInCache--;
|
||||
// }
|
||||
//
|
||||
// public void AddTexture(AssetBase image)
|
||||
// {
|
||||
// if (image.Data != null)
|
||||
// {
|
||||
// texturesInCache++;
|
||||
//
|
||||
// // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
|
||||
// textureCacheMemoryUsage += image.Data.Length;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Signal that the asset cache has been cleared.
|
||||
// /// </summary>
|
||||
// public void ClearAssetCacheStatistics()
|
||||
// {
|
||||
// assetsInCache = 0;
|
||||
// assetCacheMemoryUsage = 0;
|
||||
// texturesInCache = 0;
|
||||
// textureCacheMemoryUsage = 0;
|
||||
// }
|
||||
//
|
||||
// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
|
||||
// {
|
||||
// assetRequestTimeAfterCacheMiss = ts;
|
||||
// }
|
||||
//
|
||||
// public void AddBlockedMissingTextureRequest()
|
||||
// {
|
||||
// blockedMissingTextureRequests++;
|
||||
// }
|
||||
//
|
||||
// public void AddAssetServiceRequestFailure()
|
||||
// {
|
||||
// assetServiceRequestFailures++;
|
||||
// }
|
||||
|
||||
public void AddTexture(AssetBase image)
|
||||
{
|
||||
if (image.Data != null)
|
||||
{
|
||||
texturesInCache++;
|
||||
|
||||
// This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
|
||||
textureCacheMemoryUsage += image.Data.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Signal that the asset cache has been cleared.
|
||||
/// </summary>
|
||||
public void ClearAssetCacheStatistics()
|
||||
{
|
||||
assetsInCache = 0;
|
||||
assetCacheMemoryUsage = 0;
|
||||
texturesInCache = 0;
|
||||
textureCacheMemoryUsage = 0;
|
||||
}
|
||||
|
||||
public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
|
||||
{
|
||||
assetRequestTimeAfterCacheMiss = ts;
|
||||
}
|
||||
|
||||
public void AddBlockedMissingTextureRequest()
|
||||
{
|
||||
blockedMissingTextureRequests++;
|
||||
}
|
||||
|
||||
public void AddAssetServiceRequestFailure()
|
||||
{
|
||||
assetServiceRequestFailures++;
|
||||
}
|
||||
|
||||
public void AddInventoryServiceRetrievalFailure()
|
||||
{
|
||||
inventoryServiceRetrievalFailures++;
|
||||
}
|
||||
// public void AddInventoryServiceRetrievalFailure()
|
||||
// {
|
||||
// inventoryServiceRetrievalFailures++;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Register as a packet queue stats provider
|
||||
@@ -290,8 +291,8 @@ namespace OpenSim.Framework.Statistics
|
||||
public override string Report()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(Environment.NewLine);
|
||||
sb.Append("ASSET STATISTICS");
|
||||
sb.Append(Environment.NewLine);
|
||||
// sb.Append("ASSET STATISTICS");
|
||||
// sb.Append(Environment.NewLine);
|
||||
|
||||
/*
|
||||
sb.Append(
|
||||
@@ -307,7 +308,8 @@ Asset service request failures: {6}"+ Environment.NewLine,
|
||||
BlockedMissingTextureRequests,
|
||||
AssetServiceRequestFailures));
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
sb.Append(
|
||||
string.Format(
|
||||
@"Asset cache contains {0,6} assets
|
||||
@@ -318,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine,
|
||||
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
|
||||
BlockedMissingTextureRequests,
|
||||
AssetServiceRequestFailures));
|
||||
|
||||
*/
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("CONNECTION STATISTICS");
|
||||
@@ -328,13 +330,13 @@ Asset service request failures: {3}" + Environment.NewLine,
|
||||
"Abnormal client thread terminations: {0}" + Environment.NewLine,
|
||||
abnormalClientThreadTerminations));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("INVENTORY STATISTICS");
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(
|
||||
string.Format(
|
||||
"Initial inventory caching failures: {0}" + Environment.NewLine,
|
||||
InventoryServiceRetrievalFailures));
|
||||
// sb.Append(Environment.NewLine);
|
||||
// sb.Append("INVENTORY STATISTICS");
|
||||
// sb.Append(Environment.NewLine);
|
||||
// sb.Append(
|
||||
// string.Format(
|
||||
// "Initial inventory caching failures: {0}" + Environment.NewLine,
|
||||
// InventoryServiceRetrievalFailures));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("FRAME STATISTICS");
|
||||
@@ -390,17 +392,17 @@ Asset service request failures: {3}" + Environment.NewLine,
|
||||
public override string XReport(string uptime, string version)
|
||||
{
|
||||
OSDMap args = new OSDMap(30);
|
||||
args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
|
||||
args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
|
||||
args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
BlockedMissingTextureRequests));
|
||||
args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
AssetServiceRequestFailures));
|
||||
args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
abnormalClientThreadTerminations));
|
||||
args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
InventoryServiceRetrievalFailures));
|
||||
// args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
|
||||
// args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
// assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
|
||||
// args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
// BlockedMissingTextureRequests));
|
||||
// args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
// AssetServiceRequestFailures));
|
||||
// args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
// abnormalClientThreadTerminations));
|
||||
// args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
|
||||
// InventoryServiceRetrievalFailures));
|
||||
args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
|
||||
args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps));
|
||||
args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps));
|
||||
|
||||
@@ -40,63 +40,6 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
|
||||
|
||||
/// <summary>
|
||||
/// Inventory types
|
||||
/// </summary>
|
||||
public static string[] InvTypes = new string[]
|
||||
{
|
||||
"texture",
|
||||
"sound",
|
||||
"calling_card",
|
||||
"landmark",
|
||||
String.Empty,
|
||||
String.Empty,
|
||||
"object",
|
||||
"notecard",
|
||||
String.Empty,
|
||||
String.Empty,
|
||||
"lsl_text",
|
||||
String.Empty,
|
||||
String.Empty,
|
||||
"bodypart",
|
||||
String.Empty,
|
||||
"snapshot",
|
||||
String.Empty,
|
||||
String.Empty,
|
||||
"wearable",
|
||||
"animation",
|
||||
"gesture"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Asset types
|
||||
/// </summary>
|
||||
public static string[] Types = new string[]
|
||||
{
|
||||
"texture",
|
||||
"sound",
|
||||
"callcard",
|
||||
"landmark",
|
||||
"clothing", // Deprecated
|
||||
"clothing",
|
||||
"object",
|
||||
"notecard",
|
||||
"category",
|
||||
"root",
|
||||
"lsltext",
|
||||
"lslbyte",
|
||||
"txtr_tga",
|
||||
"bodypart",
|
||||
"trash",
|
||||
"snapshot",
|
||||
"lstndfnd",
|
||||
"snd_wav",
|
||||
"img_tga",
|
||||
"jpeg",
|
||||
"animatn",
|
||||
"gesture"
|
||||
};
|
||||
|
||||
private UUID _assetID = UUID.Zero;
|
||||
|
||||
private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
|
||||
@@ -121,7 +64,8 @@ namespace OpenSim.Framework
|
||||
private UUID _permsGranter;
|
||||
private int _permsMask;
|
||||
private int _type = 0;
|
||||
private UUID _oldID = UUID.Zero;
|
||||
private UUID _oldID;
|
||||
private UUID _loadedID = UUID.Zero;
|
||||
|
||||
private bool _ownerChanged = false;
|
||||
|
||||
@@ -291,6 +235,15 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
|
||||
public UUID LoadedItemID {
|
||||
get {
|
||||
return _loadedID;
|
||||
}
|
||||
set {
|
||||
_loadedID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public UUID LastOwnerID {
|
||||
get {
|
||||
return _lastOwnerID;
|
||||
@@ -416,8 +369,8 @@ namespace OpenSim.Framework
|
||||
/// <param name="partID">The new part ID to which this item belongs</param>
|
||||
public void ResetIDs(UUID partID)
|
||||
{
|
||||
if (_oldID == UUID.Zero)
|
||||
_oldID = ItemID;
|
||||
LoadedItemID = OldItemID;
|
||||
OldItemID = ItemID;
|
||||
ItemID = UUID.Random();
|
||||
ParentPartID = partID;
|
||||
ParentID = partID;
|
||||
|
||||
@@ -194,8 +194,6 @@ namespace OpenSim.Framework.Tests
|
||||
|
||||
resp = agentCircuitManager.AuthenticateSession(SessionId2, AgentId2, circuitcode2);
|
||||
Assert.That(!resp.Authorised);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,8 +87,6 @@ namespace OpenSim.Framework.Tests
|
||||
anim4.SequenceNum = anim2.SequenceNum;
|
||||
|
||||
Assert.That(anim4.ObjectID == objUUID2 && anim4.AnimID == animUUID2 && anim4.SequenceNum == 1, "void constructor and manual field population failed to set the properties correctly.");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,9 +146,9 @@ namespace OpenSim.Framework.Tests
|
||||
Assert.IsFalse(Util.isUUID("FOOBAR67-89ab-Cdef-0123-456789AbCdEf"),
|
||||
"UUIDs with non-hex characters are recognized as correct UUIDs.");
|
||||
Assert.IsFalse(Util.isUUID("01234567"),
|
||||
"Too short UUIDs are regognized as correct UUIDs.");
|
||||
"Too short UUIDs are recognized as correct UUIDs.");
|
||||
Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf0"),
|
||||
"Too long UUIDs are regognized as correct UUIDs.");
|
||||
"Too long UUIDs are recognized as correct UUIDs.");
|
||||
Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123+456789AbCdEf"),
|
||||
"UUIDs with wrong format are recognized as correct UUIDs.");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ using System.Threading;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
// using BclExtras;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using Amib.Threading;
|
||||
@@ -59,10 +58,12 @@ namespace OpenSim.Framework
|
||||
/// <remarks>
|
||||
/// None is used to execute the method in the same thread that made the call. It should only be used by regression
|
||||
/// test code that relies on predictable event ordering.
|
||||
/// RegressionTest is used by regression tests. It fires the call synchronously and does not catch any exceptions.
|
||||
/// </remarks>
|
||||
public enum FireAndForgetMethod
|
||||
{
|
||||
None,
|
||||
RegressionTest,
|
||||
UnsafeQueueUserWorkItem,
|
||||
QueueUserWorkItem,
|
||||
BeginInvoke,
|
||||
@@ -91,8 +92,10 @@ namespace OpenSim.Framework
|
||||
private static readonly DateTime unixEpoch =
|
||||
DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime();
|
||||
|
||||
public static readonly Regex UUIDPattern
|
||||
= new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
|
||||
private static readonly string rawUUIDPattern
|
||||
= "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
||||
public static readonly Regex PermissiveUUIDPattern = new Regex(rawUUIDPattern);
|
||||
public static readonly Regex UUIDPattern = new Regex(string.Format("^{0}$", rawUUIDPattern));
|
||||
|
||||
public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
|
||||
public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod;
|
||||
@@ -1555,27 +1558,38 @@ namespace OpenSim.Framework
|
||||
|
||||
public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
|
||||
{
|
||||
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
|
||||
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
|
||||
// for decimals places but is read by a culture that treats commas as number seperators.
|
||||
WaitCallback realCallback = delegate(object o)
|
||||
{
|
||||
Culture.SetCurrentCulture();
|
||||
WaitCallback realCallback;
|
||||
|
||||
try
|
||||
if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
|
||||
{
|
||||
// If we're running regression tests, then we want any exceptions to rise up to the test code.
|
||||
realCallback = o => { Culture.SetCurrentCulture(); callback(o); };
|
||||
}
|
||||
else
|
||||
{
|
||||
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
|
||||
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
|
||||
// for decimals places but is read by a culture that treats commas as number seperators.
|
||||
realCallback = o =>
|
||||
{
|
||||
callback(o);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
};
|
||||
Culture.SetCurrentCulture();
|
||||
|
||||
try
|
||||
{
|
||||
callback(o);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
switch (FireAndForgetMethod)
|
||||
{
|
||||
case FireAndForgetMethod.RegressionTest:
|
||||
case FireAndForgetMethod.None:
|
||||
realCallback.Invoke(obj);
|
||||
break;
|
||||
@@ -1662,13 +1676,14 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
public static void PrintCallStack()
|
||||
{
|
||||
StackTrace stackTrace = new StackTrace(); // get call stack
|
||||
StackTrace stackTrace = new StackTrace(true); // get call stack
|
||||
StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
|
||||
|
||||
// write call stack method names
|
||||
foreach (StackFrame stackFrame in stackFrames)
|
||||
{
|
||||
m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name
|
||||
MethodBase mb = stackFrame.GetMethod();
|
||||
m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,19 +40,44 @@ namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>Timer interval in milliseconds for the watchdog timer</summary>
|
||||
const double WATCHDOG_INTERVAL_MS = 2500.0d;
|
||||
|
||||
/// <summary>Maximum timeout in milliseconds before a thread is considered dead</summary>
|
||||
const int WATCHDOG_TIMEOUT_MS = 5000;
|
||||
|
||||
[System.Diagnostics.DebuggerDisplay("{Thread.Name}")]
|
||||
public class ThreadWatchdogInfo
|
||||
{
|
||||
public Thread Thread;
|
||||
public int LastTick;
|
||||
public Thread Thread { get; private set; }
|
||||
|
||||
public ThreadWatchdogInfo(Thread thread)
|
||||
/// <summary>
|
||||
/// Approximate tick when this thread was started.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Not terribly good since this quickly wraps around.
|
||||
/// </remarks>
|
||||
public int FirstTick { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// First time this heartbeat update was invoked
|
||||
/// </summary>
|
||||
public int LastTick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of milliseconds before we notify that the thread is having a problem.
|
||||
/// </summary>
|
||||
public int Timeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Is this thread considered timed out?
|
||||
/// </summary>
|
||||
public bool IsTimedOut { get; set; }
|
||||
|
||||
public ThreadWatchdogInfo(Thread thread, int timeout)
|
||||
{
|
||||
Thread = thread;
|
||||
LastTick = Environment.TickCount;
|
||||
Timeout = timeout;
|
||||
FirstTick = Environment.TickCount & Int32.MaxValue;
|
||||
LastTick = FirstTick;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +107,7 @@ namespace OpenSim.Framework
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a new thread that is tracked by the watchdog timer
|
||||
/// Start a new thread that is tracked by the watchdog timer.
|
||||
/// </summary>
|
||||
/// <param name="start">The method that will be executed in a new thread</param>
|
||||
/// <param name="name">A name to give to the new thread</param>
|
||||
@@ -91,11 +116,37 @@ namespace OpenSim.Framework
|
||||
/// thread, otherwise false</param>
|
||||
/// <returns>The newly created Thread object</returns>
|
||||
public static Thread StartThread(ThreadStart start, string name, ThreadPriority priority, bool isBackground)
|
||||
{
|
||||
return StartThread(start, name, priority, isBackground, WATCHDOG_TIMEOUT_MS);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a new thread that is tracked by the watchdog timer
|
||||
/// </summary>
|
||||
/// <param name="start">The method that will be executed in a new thread</param>
|
||||
/// <param name="name">A name to give to the new thread</param>
|
||||
/// <param name="priority">Priority to run the thread at</param>
|
||||
/// <param name="isBackground">True to run this thread as a background
|
||||
/// thread, otherwise false</param>
|
||||
/// <param name="timeout">
|
||||
/// Number of milliseconds to wait until we issue a warning about timeout.
|
||||
/// </para>
|
||||
/// <returns>The newly created Thread object</returns>
|
||||
public static Thread StartThread(
|
||||
ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
|
||||
{
|
||||
Thread thread = new Thread(start);
|
||||
thread.Name = name;
|
||||
thread.Priority = priority;
|
||||
thread.IsBackground = isBackground;
|
||||
|
||||
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
|
||||
|
||||
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
|
||||
|
||||
lock (m_threads)
|
||||
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
||||
|
||||
thread.Start();
|
||||
|
||||
return thread;
|
||||
@@ -112,27 +163,40 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Stops watchdog tracking on the current thread
|
||||
/// </summary>
|
||||
/// <returns>True if the thread was removed from the list of tracked
|
||||
/// threads, otherwise false</returns>
|
||||
/// <returns>
|
||||
/// True if the thread was removed from the list of tracked
|
||||
/// threads, otherwise false
|
||||
/// </returns>
|
||||
public static bool RemoveThread()
|
||||
{
|
||||
return RemoveThread(Thread.CurrentThread.ManagedThreadId);
|
||||
}
|
||||
|
||||
private static void AddThread(ThreadWatchdogInfo threadInfo)
|
||||
{
|
||||
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + threadInfo.Thread.Name + "\" (ID " + threadInfo.Thread.ManagedThreadId + ")");
|
||||
|
||||
lock (m_threads)
|
||||
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
|
||||
}
|
||||
|
||||
public static bool RemoveThread(int threadID)
|
||||
private static bool RemoveThread(int threadID)
|
||||
{
|
||||
lock (m_threads)
|
||||
return m_threads.Remove(threadID);
|
||||
}
|
||||
|
||||
public static bool AbortThread(int threadID)
|
||||
{
|
||||
lock (m_threads)
|
||||
{
|
||||
if (m_threads.ContainsKey(threadID))
|
||||
{
|
||||
ThreadWatchdogInfo twi = m_threads[threadID];
|
||||
twi.Thread.Abort();
|
||||
RemoveThread(threadID);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdateThread(int threadID)
|
||||
{
|
||||
ThreadWatchdogInfo threadInfo;
|
||||
@@ -144,9 +208,14 @@ namespace OpenSim.Framework
|
||||
try
|
||||
{
|
||||
if (m_threads.TryGetValue(threadID, out threadInfo))
|
||||
threadInfo.LastTick = Environment.TickCount;
|
||||
{
|
||||
threadInfo.LastTick = Environment.TickCount & Int32.MaxValue;
|
||||
threadInfo.IsTimedOut = false;
|
||||
}
|
||||
else
|
||||
AddThread(new ThreadWatchdogInfo(Thread.CurrentThread));
|
||||
{
|
||||
m_log.WarnFormat("[WATCHDOG]: Asked to update thread {0} which is not being monitored", threadID);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@@ -157,7 +226,8 @@ namespace OpenSim.Framework
|
||||
/// <returns></returns>
|
||||
public static ThreadWatchdogInfo[] GetThreads()
|
||||
{
|
||||
return m_threads.Values.ToArray();
|
||||
lock (m_threads)
|
||||
return m_threads.Values.ToArray();
|
||||
}
|
||||
|
||||
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
@@ -174,10 +244,16 @@ namespace OpenSim.Framework
|
||||
|
||||
foreach (ThreadWatchdogInfo threadInfo in m_threads.Values)
|
||||
{
|
||||
if (threadInfo.Thread.ThreadState == ThreadState.Stopped || now - threadInfo.LastTick >= WATCHDOG_TIMEOUT_MS)
|
||||
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
|
||||
{
|
||||
timedOut = threadInfo;
|
||||
m_threads.Remove(threadInfo.Thread.ManagedThreadId);
|
||||
RemoveThread(threadInfo.Thread.ManagedThreadId);
|
||||
break;
|
||||
}
|
||||
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
|
||||
{
|
||||
threadInfo.IsTimedOut = true;
|
||||
timedOut = threadInfo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,9 +39,7 @@ using System.Text;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using log4net;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
@@ -65,35 +63,35 @@ namespace OpenSim.Framework
|
||||
// a "long" call for warning & debugging purposes
|
||||
public const int LongCallTime = 500;
|
||||
|
||||
/// <summary>
|
||||
/// Send LLSD to an HTTP client in application/llsd+json form
|
||||
/// </summary>
|
||||
/// <param name="response">HTTP response to send the data in</param>
|
||||
/// <param name="body">LLSD to send to the client</param>
|
||||
public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
|
||||
{
|
||||
byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
|
||||
|
||||
response.ContentEncoding = Encoding.UTF8;
|
||||
response.ContentLength = responseData.Length;
|
||||
response.ContentType = "application/llsd+json";
|
||||
response.Body.Write(responseData, 0, responseData.Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send LLSD to an HTTP client in application/llsd+xml form
|
||||
/// </summary>
|
||||
/// <param name="response">HTTP response to send the data in</param>
|
||||
/// <param name="body">LLSD to send to the client</param>
|
||||
public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
|
||||
{
|
||||
byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
|
||||
|
||||
response.ContentEncoding = Encoding.UTF8;
|
||||
response.ContentLength = responseData.Length;
|
||||
response.ContentType = "application/llsd+xml";
|
||||
response.Body.Write(responseData, 0, responseData.Length);
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Send LLSD to an HTTP client in application/llsd+json form
|
||||
// /// </summary>
|
||||
// /// <param name="response">HTTP response to send the data in</param>
|
||||
// /// <param name="body">LLSD to send to the client</param>
|
||||
// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
|
||||
// {
|
||||
// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
|
||||
//
|
||||
// response.ContentEncoding = Encoding.UTF8;
|
||||
// response.ContentLength = responseData.Length;
|
||||
// response.ContentType = "application/llsd+json";
|
||||
// response.Body.Write(responseData, 0, responseData.Length);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// Send LLSD to an HTTP client in application/llsd+xml form
|
||||
// /// </summary>
|
||||
// /// <param name="response">HTTP response to send the data in</param>
|
||||
// /// <param name="body">LLSD to send to the client</param>
|
||||
// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
|
||||
// {
|
||||
// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
|
||||
//
|
||||
// response.ContentEncoding = Encoding.UTF8;
|
||||
// response.ContentLength = responseData.Length;
|
||||
// response.ContentType = "application/llsd+xml";
|
||||
// response.Body.Write(responseData, 0, responseData.Length);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Make a GET or GET-like request to a web service that returns LLSD
|
||||
@@ -297,10 +295,10 @@ namespace OpenSim.Framework
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch
|
||||
{
|
||||
// don't need to treat this as an error... we're just guessing anyway
|
||||
m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
|
||||
// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenSim
|
||||
/// <param name="networkInfo"></param>
|
||||
/// <returns>A configuration that gets passed to modules</returns>
|
||||
public OpenSimConfigSource LoadConfigSettings(
|
||||
IConfigSource argvSource, out ConfigSettings configSettings,
|
||||
IConfigSource argvSource, EnvConfigSource envConfigSource, out ConfigSettings configSettings,
|
||||
out NetworkServersInfo networkInfo)
|
||||
{
|
||||
m_configSettings = configSettings = new ConfigSettings();
|
||||
@@ -107,15 +107,13 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("Master ini file {0} not found", masterFilePath);
|
||||
m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string iniFileName =
|
||||
startupConfig.GetString("inifile", "OpenSim.ini");
|
||||
string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
|
||||
|
||||
if (IsUri(iniFileName))
|
||||
{
|
||||
@@ -131,8 +129,7 @@ namespace OpenSim
|
||||
if (!File.Exists(Application.iniFilePath))
|
||||
{
|
||||
iniFileName = "OpenSim.xml";
|
||||
Application.iniFilePath = Path.GetFullPath(
|
||||
Path.Combine(Util.configDir(), iniFileName));
|
||||
Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
|
||||
}
|
||||
|
||||
if (File.Exists(Application.iniFilePath))
|
||||
@@ -142,15 +139,12 @@ namespace OpenSim
|
||||
}
|
||||
}
|
||||
|
||||
string iniDirName =
|
||||
startupConfig.GetString("inidirectory", "config");
|
||||
string iniDirPath =
|
||||
Path.Combine(Util.configDir(), iniDirName);
|
||||
string iniDirName = startupConfig.GetString("inidirectory", "config");
|
||||
string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
|
||||
|
||||
if (Directory.Exists(iniDirPath))
|
||||
{
|
||||
m_log.InfoFormat("Searching folder {0} for config ini files",
|
||||
iniDirPath);
|
||||
m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
|
||||
|
||||
string[] fileEntries = Directory.GetFiles(iniDirName);
|
||||
foreach (string filePath in fileEntries)
|
||||
@@ -172,7 +166,6 @@ namespace OpenSim
|
||||
if (sources.Count == 0)
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
|
||||
m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
@@ -195,6 +188,24 @@ namespace OpenSim
|
||||
// Make sure command line options take precedence
|
||||
m_config.Source.Merge(argvSource);
|
||||
|
||||
|
||||
IConfig enVars = m_config.Source.Configs["Environment"];
|
||||
|
||||
if( enVars != null )
|
||||
{
|
||||
string[] env_keys = enVars.GetKeys();
|
||||
|
||||
foreach ( string key in env_keys )
|
||||
{
|
||||
envConfigSource.AddEnv(key, string.Empty);
|
||||
}
|
||||
|
||||
envConfigSource.LoadEnv();
|
||||
m_config.Source.Merge(envConfigSource);
|
||||
m_config.Source.ExpandKeyValues();
|
||||
}
|
||||
|
||||
|
||||
ReadConfigSettings();
|
||||
|
||||
return m_config;
|
||||
|
||||
@@ -31,12 +31,14 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Timers;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
@@ -56,6 +58,16 @@ namespace OpenSim
|
||||
protected string m_consoleType = "local";
|
||||
protected uint m_consolePort = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Prompt to use for simulator command line.
|
||||
/// </summary>
|
||||
private string m_consolePrompt;
|
||||
|
||||
/// <summary>
|
||||
/// Regex for parsing out special characters in the prompt.
|
||||
/// </summary>
|
||||
private Regex m_consolePromptRegex = new Regex(@"([^\\])\\(\w)", RegexOptions.Compiled);
|
||||
|
||||
private string m_timedScript = "disabled";
|
||||
private Timer m_scriptTimer;
|
||||
|
||||
@@ -84,7 +96,9 @@ namespace OpenSim
|
||||
|
||||
if (networkConfig != null)
|
||||
m_consolePort = (uint)networkConfig.GetInt("console_port", 0);
|
||||
|
||||
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
|
||||
|
||||
if (m_logFileAppender != null)
|
||||
{
|
||||
if (m_logFileAppender is log4net.Appender.FileAppender)
|
||||
@@ -107,6 +121,7 @@ namespace OpenSim
|
||||
Util.FireAndForgetMethod = asyncCallMethod;
|
||||
|
||||
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
|
||||
m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) ");
|
||||
}
|
||||
|
||||
if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
|
||||
@@ -173,6 +188,18 @@ namespace OpenSim
|
||||
}
|
||||
}
|
||||
|
||||
// Hook up to the watchdog timer
|
||||
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
||||
|
||||
PrintFileToConsole("startuplogo.txt");
|
||||
|
||||
// For now, start at the 'root' level by default
|
||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||
ChangeSelectedRegion("region",
|
||||
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
||||
else
|
||||
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
||||
|
||||
//Run Startup Commands
|
||||
if (String.IsNullOrEmpty(m_startupCommandsFile))
|
||||
{
|
||||
@@ -191,18 +218,6 @@ namespace OpenSim
|
||||
m_scriptTimer.Interval = 1200*1000;
|
||||
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
||||
}
|
||||
|
||||
// Hook up to the watchdog timer
|
||||
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
||||
|
||||
PrintFileToConsole("startuplogo.txt");
|
||||
|
||||
// For now, start at the 'root' level by default
|
||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||
ChangeSelectedRegion("region",
|
||||
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
|
||||
else
|
||||
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -227,8 +242,18 @@ namespace OpenSim
|
||||
+ "If an avatar name is given then only packets from that avatar are logged",
|
||||
Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug http",
|
||||
"debug http <level>",
|
||||
"Turn on inbound http request debugging for everything except the event queue (see debug eq).",
|
||||
"If level >= 2 then the handler used to service the request is logged.\n"
|
||||
+ "If level >= 1 then incoming HTTP requests are logged.\n"
|
||||
+ "If level <= 0 then no extra http logging is done.\n",
|
||||
Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||
"debug scene <cripting> <collisions> <physics>",
|
||||
"debug scene <scripting> <collisions> <physics>",
|
||||
"Turn on scene debugging", Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "change region",
|
||||
@@ -266,12 +291,16 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "save oar",
|
||||
//"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
|
||||
"save oar [-p|--profile=<url>] [--noassets] [--perm=<permissions>] [<OAR path>]",
|
||||
"save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]",
|
||||
"Save a region's data to an OAR archive.",
|
||||
// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
|
||||
"-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
|
||||
"-h|--home=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
|
||||
+ "--noassets stops assets being saved to the OAR." + Environment.NewLine
|
||||
+ "--perm stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine
|
||||
+ "--publish saves an OAR stripped of owner and last owner information." + Environment.NewLine
|
||||
+ " on reload, the estate owner will be the owner of all objects" + Environment.NewLine
|
||||
+ " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published" + Environment.NewLine
|
||||
+ " this option is EXPERIMENTAL" + Environment.NewLine
|
||||
+ "--perm=<permissions> stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine
|
||||
+ " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine
|
||||
+ "The OAR path must be a filesystem path."
|
||||
+ " If this is not given then the oar is saved to region.oar in the current directory.",
|
||||
@@ -322,7 +351,7 @@ namespace OpenSim
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "backup",
|
||||
"backup",
|
||||
"Persist objects to the database now", RunCommand);
|
||||
"Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "create region",
|
||||
"create region [\"region name\"] <region_file.ini>",
|
||||
@@ -773,6 +802,7 @@ namespace OpenSim
|
||||
break;
|
||||
|
||||
case "backup":
|
||||
MainConsole.Instance.Output("Triggering save of pending object updates to persistent store");
|
||||
m_sceneManager.BackupCurrentScene();
|
||||
break;
|
||||
|
||||
@@ -783,7 +813,7 @@ namespace OpenSim
|
||||
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
||||
RemoveRegion(removeScene, false);
|
||||
else
|
||||
MainConsole.Instance.Output("no region with that name");
|
||||
MainConsole.Instance.Output("No region with that name");
|
||||
break;
|
||||
|
||||
case "delete-region":
|
||||
@@ -830,7 +860,22 @@ namespace OpenSim
|
||||
|
||||
string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
|
||||
MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
|
||||
m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName);
|
||||
|
||||
// m_log.DebugFormat("Original prompt is {0}", m_consolePrompt);
|
||||
string prompt = m_consolePrompt;
|
||||
|
||||
// Replace "\R" with the region name
|
||||
// Replace "\\" with "\"
|
||||
prompt = m_consolePromptRegex.Replace(prompt, m =>
|
||||
{
|
||||
// m_log.DebugFormat("Matched {0}", m.Groups[2].Value);
|
||||
if (m.Groups[2].Value == "R")
|
||||
return m.Groups[1].Value + regionName;
|
||||
else
|
||||
return m.Groups[0].Value;
|
||||
});
|
||||
|
||||
m_console.DefaultPrompt = prompt;
|
||||
m_console.ConsoleScene = m_sceneManager.CurrentScene;
|
||||
}
|
||||
|
||||
@@ -856,15 +901,32 @@ namespace OpenSim
|
||||
if (int.TryParse(args[2], out newDebug))
|
||||
{
|
||||
m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name);
|
||||
// We provide user information elsewhere if any clients had their debug level set.
|
||||
// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.Output("packet debug should be 0..255");
|
||||
MainConsole.Instance.Output("Usage: debug packet 0..255");
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "http":
|
||||
if (args.Length == 3)
|
||||
{
|
||||
int newDebug;
|
||||
if (int.TryParse(args[2], out newDebug))
|
||||
{
|
||||
MainServer.Instance.DebugLevel = newDebug;
|
||||
MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MainConsole.Instance.Output("Usage: debug http 0..2");
|
||||
break;
|
||||
|
||||
case "scene":
|
||||
if (args.Length == 5)
|
||||
{
|
||||
@@ -887,13 +949,28 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.Output("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
|
||||
MainConsole.Instance.Output("Usage: debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "teleport":
|
||||
foreach(Scene s in m_sceneManager.Scenes)
|
||||
{
|
||||
if (s.DEBUG)
|
||||
{
|
||||
s.DEBUG = false;
|
||||
MainConsole.Instance.Output("Teleport debugging is disabled!");
|
||||
}
|
||||
else{
|
||||
s.DEBUG = true;
|
||||
MainConsole.Instance.Output("Teleport debugging is enabled!");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
MainConsole.Instance.Output("Unknown debug");
|
||||
MainConsole.Instance.Output("Unknown debug command");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -984,7 +1061,7 @@ namespace OpenSim
|
||||
{
|
||||
//this.HttpServer.
|
||||
acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
|
||||
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
|
||||
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values)
|
||||
acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
|
||||
}
|
||||
);
|
||||
@@ -1019,24 +1096,6 @@ namespace OpenSim
|
||||
MainConsole.Instance.Output(handlers.ToString());
|
||||
break;
|
||||
|
||||
case "pending-objects":
|
||||
System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n");
|
||||
m_sceneManager.ForEachScene(
|
||||
delegate(Scene scene)
|
||||
{
|
||||
scene.ForEachScenePresence(
|
||||
delegate(ScenePresence sp)
|
||||
{
|
||||
pending.AppendFormat("{0}: {1} {2} pending\n",
|
||||
scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount());
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
MainConsole.Instance.Output(pending.ToString());
|
||||
break;
|
||||
|
||||
case "modules":
|
||||
MainConsole.Instance.Output("The currently loaded shared modules are:");
|
||||
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
|
||||
@@ -1044,6 +1103,19 @@ namespace OpenSim
|
||||
MainConsole.Instance.Output("Shared Module: " + module.Name);
|
||||
}
|
||||
|
||||
m_sceneManager.ForEachScene(
|
||||
delegate(Scene scene)
|
||||
{
|
||||
m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:");
|
||||
foreach (IRegionModule module in scene.Modules.Values)
|
||||
{
|
||||
if (!module.IsSharedModule)
|
||||
{
|
||||
m_log.Error("Region Module: " + module.Name);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
MainConsole.Instance.Output("");
|
||||
break;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
using OpenSim.Server.Base;
|
||||
using OpenSim.Server.Base;
|
||||
using OpenSim.Services.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserAccountService;
|
||||
@@ -62,6 +62,7 @@ namespace OpenSim
|
||||
|
||||
// These are the names of the plugin-points extended by this
|
||||
// class during system startup.
|
||||
//
|
||||
|
||||
private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
|
||||
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
|
||||
@@ -112,6 +113,13 @@ namespace OpenSim
|
||||
get { return m_clientServers; }
|
||||
}
|
||||
|
||||
protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource();
|
||||
|
||||
public EnvConfigSource envConfigSource
|
||||
{
|
||||
get { return m_EnvConfigSource; }
|
||||
}
|
||||
|
||||
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
|
||||
|
||||
public uint HttpServerPort
|
||||
@@ -146,7 +154,7 @@ namespace OpenSim
|
||||
protected virtual void LoadConfigSettings(IConfigSource configSource)
|
||||
{
|
||||
m_configLoader = new ConfigurationLoader();
|
||||
m_config = m_configLoader.LoadConfigSettings(configSource, out m_configSettings, out m_networkServersInfo);
|
||||
m_config = m_configLoader.LoadConfigSettings(configSource, envConfigSource, out m_configSettings, out m_networkServersInfo);
|
||||
ReadExtraConfigSettings();
|
||||
}
|
||||
|
||||
@@ -203,16 +211,16 @@ namespace OpenSim
|
||||
// Load the simulation data service
|
||||
IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
|
||||
if (simDataConfig == null)
|
||||
throw new Exception("Configuration file is missing the [SimulationDataStore] section");
|
||||
throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
|
||||
string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
|
||||
if (String.IsNullOrEmpty(module))
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section");
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
|
||||
m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
|
||||
|
||||
// Load the estate data service
|
||||
IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
|
||||
if (estateDataConfig == null)
|
||||
throw new Exception("Configuration file is missing the [EstateDataStore] section");
|
||||
throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
|
||||
module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
|
||||
if (String.IsNullOrEmpty(module))
|
||||
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
|
||||
@@ -424,10 +432,14 @@ namespace OpenSim
|
||||
// TODO : Try setting resource for region xstats here on scene
|
||||
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
|
||||
|
||||
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
|
||||
scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
|
||||
if (scene.SnmpService != null)
|
||||
{
|
||||
scene.SnmpService.BootInfo("Grid Registration in progress", scene);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
scene.RegisterRegionWithGrid();
|
||||
@@ -452,9 +464,6 @@ namespace OpenSim
|
||||
scene.SnmpService.BootInfo("Grid Registration done", scene);
|
||||
}
|
||||
|
||||
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
|
||||
scene.EventManager.TriggerParcelPrimCountUpdate();
|
||||
|
||||
// We need to do this after we've initialized the
|
||||
// scripting engines.
|
||||
scene.CreateScriptInstances();
|
||||
@@ -794,7 +803,7 @@ namespace OpenSim
|
||||
public class SimStatusHandler : IStreamedRequestHandler
|
||||
{
|
||||
public byte[] Handle(string path, Stream request,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return Util.UTF8.GetBytes("OK");
|
||||
}
|
||||
@@ -831,7 +840,7 @@ namespace OpenSim
|
||||
}
|
||||
|
||||
public byte[] Handle(string path, Stream request,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
|
||||
}
|
||||
@@ -872,7 +881,7 @@ namespace OpenSim
|
||||
}
|
||||
|
||||
public byte[] Handle(string path, Stream request,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
|
||||
}
|
||||
|
||||
@@ -56,8 +56,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
|
||||
byte[] data, string inventoryType, string assetType);
|
||||
|
||||
public delegate void UploadedBakedTexture(UUID assetID, byte[] data);
|
||||
|
||||
public delegate UUID UpdateItem(UUID itemID, byte[] data);
|
||||
|
||||
public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors);
|
||||
@@ -96,8 +94,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private static readonly string m_notecardUpdatePath = "0004/";
|
||||
private static readonly string m_notecardTaskUpdatePath = "0005/";
|
||||
// private static readonly string m_fetchInventoryPath = "0006/";
|
||||
private static readonly string m_copyFromNotecardPath = "0007/";
|
||||
// private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
|
||||
private static readonly string m_uploadBakedTexturePath = "0010/";// This is in the LandManagementModule.
|
||||
|
||||
|
||||
// These are callbacks which will be setup by the scene so that we can update scene data when we
|
||||
@@ -134,8 +132,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
|
||||
ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
|
||||
TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
|
||||
CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
|
||||
GetClient = m_Scene.SceneContents.GetControllingClient;
|
||||
GetClient = m_Scene.SceneGraph.GetControllingClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -165,8 +162,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
|
||||
m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req);
|
||||
m_HostCapsObj.RegisterHandler("UpdateScriptTask", req);
|
||||
m_HostCapsObj.RegisterHandler("UploadBakedTexture", new RestStreamHandler("POST", capsBase + m_uploadBakedTexturePath, UploadBakedTexture));
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -186,6 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req);
|
||||
m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
|
||||
m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
|
||||
m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard));
|
||||
|
||||
// As of RC 1.22.9 of the Linden client this is
|
||||
// supported
|
||||
@@ -229,7 +225,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <param name="httpResponse">HTTP response header object</param>
|
||||
/// <returns></returns>
|
||||
public string SeedCapRequest(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
|
||||
|
||||
@@ -239,7 +235,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
Hashtable caps = m_HostCapsObj.CapsHandlers.CapsDetails;
|
||||
Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true);
|
||||
|
||||
// Add the external too
|
||||
foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers)
|
||||
caps[kvp.Key] = kvp.Value;
|
||||
@@ -261,7 +258,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <param name="httpResponse">HTTP response header object</param>
|
||||
/// <returns></returns>
|
||||
public string ScriptTaskInventory(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -330,74 +327,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle a request from the client for a Uri to upload a baked texture.
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="httpRequest"></param>
|
||||
/// <param name="httpResponse"></param>
|
||||
/// <returns>The upload response if the request is successful, null otherwise.</returns>
|
||||
public string UploadBakedTexture(string request, string path,
|
||||
string param, OSHttpRequest httpRequest,
|
||||
OSHttpResponse httpResponse)
|
||||
{
|
||||
try
|
||||
{
|
||||
// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName);
|
||||
|
||||
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
|
||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||
|
||||
BakedTextureUploader uploader =
|
||||
new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
|
||||
uploader.OnUpLoad += BakedTextureUploaded;
|
||||
|
||||
m_HostCapsObj.HttpListener.AddStreamHandler(
|
||||
new BinaryStreamHandler("POST", capsBase + uploaderPath,
|
||||
uploader.uploaderCaps));
|
||||
|
||||
string protocol = "http://";
|
||||
|
||||
if (m_HostCapsObj.SSLCaps)
|
||||
protocol = "https://";
|
||||
|
||||
string uploaderURL = protocol + m_HostCapsObj.HostName + ":" +
|
||||
m_HostCapsObj.Port.ToString() + capsBase + uploaderPath;
|
||||
|
||||
LLSDAssetUploadResponse uploadResponse =
|
||||
new LLSDAssetUploadResponse();
|
||||
uploadResponse.uploader = uploaderURL;
|
||||
uploadResponse.state = "upload";
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[CAPS]: " + e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a baked texture has been successfully uploaded by a client.
|
||||
/// </summary>
|
||||
/// <param name="assetID"></param>
|
||||
/// <param name="data"></param>
|
||||
public void BakedTextureUploaded(UUID assetID, byte[] data)
|
||||
{
|
||||
// m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
|
||||
|
||||
AssetBase asset;
|
||||
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
|
||||
asset.Data = data;
|
||||
asset.Temporary = true;
|
||||
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
|
||||
m_assetService.Store(asset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when new asset data for an agent inventory item update has been uploaded.
|
||||
/// </summary>
|
||||
@@ -439,7 +368,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
if (mm != null)
|
||||
{
|
||||
if (!mm.UploadCovered(client, mm.UploadCharge))
|
||||
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
|
||||
{
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||
@@ -493,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
string assetType)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
|
||||
"[BUNCH OF CAPS]: Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
|
||||
assetID, inventoryItem, inventoryType, assetType);
|
||||
|
||||
sbyte assType = 0;
|
||||
@@ -696,7 +625,12 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
item.AssetType = assType;
|
||||
item.InvType = inType;
|
||||
item.Folder = parentFolder;
|
||||
item.CurrentPermissions = (uint)PermissionMask.All;
|
||||
|
||||
// If we set PermissionMask.All then when we rez the item the next permissions will replace the current
|
||||
// (owner) permissions. This becomes a problem if next permissions are changed.
|
||||
item.CurrentPermissions
|
||||
= (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
|
||||
|
||||
item.BasePermissions = (uint)PermissionMask.All;
|
||||
item.EveryOnePermissions = 0;
|
||||
item.NextPermissions = (uint)PermissionMask.All;
|
||||
@@ -758,7 +692,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public string NoteCardAgentInventory(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
//m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName + "\n" + request);
|
||||
//m_log.Debug("[CAPS]: NoteCardAgentInventory Request is: " + request);
|
||||
@@ -796,6 +730,75 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the CopyInventoryFromNotecard caps handler.
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
public string CopyInventoryFromNotecard(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
Hashtable response = new Hashtable();
|
||||
response["int_response_code"] = 404;
|
||||
response["content_type"] = "text/plain";
|
||||
response["keepalive"] = false;
|
||||
response["str_response_string"] = "";
|
||||
|
||||
try
|
||||
{
|
||||
OSDMap content = (OSDMap)OSDParser.DeserializeLLSDXml(request);
|
||||
UUID objectID = content["object-id"].AsUUID();
|
||||
UUID notecardID = content["notecard-id"].AsUUID();
|
||||
UUID folderID = content["folder-id"].AsUUID();
|
||||
UUID itemID = content["item-id"].AsUUID();
|
||||
|
||||
// m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, FolderID:{0}, ItemID:{1}, NotecardID:{2}, ObjectID:{3}", folderID, itemID, notecardID, objectID);
|
||||
|
||||
if (objectID != UUID.Zero)
|
||||
{
|
||||
SceneObjectPart part = m_Scene.GetSceneObjectPart(objectID);
|
||||
if (part != null)
|
||||
{
|
||||
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(notecardID);
|
||||
if (!m_Scene.Permissions.CanCopyObjectInventory(notecardID, objectID, m_HostCapsObj.AgentID))
|
||||
{
|
||||
return LLSDHelpers.SerialiseLLSDReply(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InventoryItemBase item = null;
|
||||
InventoryItemBase copyItem = null;
|
||||
IClientAPI client = null;
|
||||
|
||||
m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
|
||||
item = m_Scene.InventoryService.GetItem(new InventoryItemBase(itemID));
|
||||
if (item != null)
|
||||
{
|
||||
copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID);
|
||||
if (copyItem != null && client != null)
|
||||
{
|
||||
m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder);
|
||||
client.SendBulkUpdateInventory(copyItem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID);
|
||||
if (client != null)
|
||||
client.SendAlertMessage("Failed to retrieve item");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard : {0}", e.ToString());
|
||||
}
|
||||
|
||||
response["int_response_code"] = 200;
|
||||
return LLSDHelpers.SerialiseLLSDReply(response);
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetUploader
|
||||
@@ -1067,6 +1070,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
// XXX Maybe this should be some meaningful error packet
|
||||
return null;
|
||||
}
|
||||
|
||||
///Left this in and commented in case there are unforseen issues
|
||||
//private void SaveAssetToFile(string filename, byte[] data)
|
||||
//{
|
||||
@@ -1090,53 +1094,4 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public class BakedTextureUploader
|
||||
{
|
||||
public event UploadedBakedTexture OnUpLoad;
|
||||
private UploadedBakedTexture handlerUpLoad = null;
|
||||
|
||||
private string uploaderPath = String.Empty;
|
||||
private UUID newAssetID;
|
||||
private IHttpServer httpListener;
|
||||
|
||||
public BakedTextureUploader(string path, IHttpServer httpServer)
|
||||
{
|
||||
newAssetID = UUID.Random();
|
||||
uploaderPath = path;
|
||||
httpListener = httpServer;
|
||||
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle raw uploaded baked texture data.
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public string uploaderCaps(byte[] data, string path, string param)
|
||||
{
|
||||
handlerUpLoad = OnUpLoad;
|
||||
if (handlerUpLoad != null)
|
||||
{
|
||||
Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); });
|
||||
}
|
||||
|
||||
string res = String.Empty;
|
||||
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
||||
uploadComplete.new_asset = newAssetID.ToString();
|
||||
uploadComplete.new_inventory_item = UUID.Zero;
|
||||
uploadComplete.state = "complete";
|
||||
|
||||
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
||||
|
||||
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
||||
|
||||
// m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ using OpenMetaverse.Messages.Linden;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -58,9 +59,15 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
protected Scene m_scene = null;
|
||||
|
||||
/// <value>
|
||||
/// Debug level.
|
||||
/// </value>
|
||||
public int DebugLevel { get; set; }
|
||||
|
||||
protected Scene m_scene;
|
||||
private IConfigSource m_gConfig;
|
||||
bool enabledYN = false;
|
||||
bool enabledYN;
|
||||
|
||||
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
||||
|
||||
@@ -97,12 +104,21 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand(
|
||||
"event queue",
|
||||
false,
|
||||
"debug eq",
|
||||
"debug eq [0|1]",
|
||||
"Turn on event queue debugging",
|
||||
"debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n"
|
||||
+ "debug eq 0 will turn off event queue debugging.",
|
||||
HandleDebugEq);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gConfig = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
||||
@@ -129,6 +145,22 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void HandleDebugEq(string module, string[] args)
|
||||
{
|
||||
int debugLevel;
|
||||
|
||||
if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]");
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLevel = debugLevel;
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"Set event queue debug level to {0} in {1}", DebugLevel, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Always returns a valid queue
|
||||
/// </summary>
|
||||
@@ -205,7 +237,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
private void ClientClosed(UUID AgentID, Scene scene)
|
||||
{
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||
// m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||
|
||||
int count = 0;
|
||||
while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5)
|
||||
@@ -217,11 +249,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
queues.Remove(AgentID);
|
||||
}
|
||||
|
||||
List<UUID> removeitems = new List<UUID>();
|
||||
lock (m_AvatarQueueUUIDMapping)
|
||||
{
|
||||
foreach (UUID ky in m_AvatarQueueUUIDMapping.Keys)
|
||||
{
|
||||
// m_log.DebugFormat("[EVENTQUEUE]: Found key {0} in m_AvatarQueueUUIDMapping while looking for {1}", ky, AgentID);
|
||||
if (ky == AgentID)
|
||||
{
|
||||
removeitems.Add(ky);
|
||||
@@ -230,11 +264,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
foreach (UUID ky in removeitems)
|
||||
{
|
||||
UUID eventQueueGetUuid = m_AvatarQueueUUIDMapping[ky];
|
||||
m_AvatarQueueUUIDMapping.Remove(ky);
|
||||
MainServer.Instance.RemovePollServiceHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
|
||||
}
|
||||
|
||||
MainServer.Instance.RemovePollServiceHTTPHandler("","/CAPS/EQG/" + eventQueueGetUuid.ToString() + "/");
|
||||
}
|
||||
}
|
||||
|
||||
UUID searchval = UUID.Zero;
|
||||
|
||||
removeitems.Clear();
|
||||
@@ -253,7 +289,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
foreach (UUID ky in removeitems)
|
||||
m_QueueUUIDAvatarMapping.Remove(ky);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,16 +347,21 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
|
||||
// Register this as a caps handler
|
||||
// FIXME: Confusingly, we need to register separate as a capability so that the client is told about
|
||||
// EventQueueGet when it receive capability information, but then we replace the rest handler immediately
|
||||
// afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but
|
||||
// really it should be possible to directly register the poll handler as a capability.
|
||||
caps.RegisterHandler("EventQueueGet",
|
||||
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
{
|
||||
return ProcessQueue(m_dhttpMethod, agentID, caps);
|
||||
}));
|
||||
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
|
||||
// delegate(Hashtable m_dhttpMethod)
|
||||
// {
|
||||
// return ProcessQueue(m_dhttpMethod, agentID, caps);
|
||||
// }));
|
||||
|
||||
// This will persist this beyond the expiry of the caps handlers
|
||||
MainServer.Instance.AddPollServiceHTTPHandler(
|
||||
capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
|
||||
capsBase + EventQueueGetUUID.ToString() + "/",
|
||||
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
|
||||
|
||||
Random rnd = new Random(Environment.TickCount);
|
||||
lock (m_ids)
|
||||
@@ -346,6 +386,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request)
|
||||
{
|
||||
// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Invoked GetEvents() for {0}", pAgentId);
|
||||
|
||||
Queue<OSD> queue = TryGetQueue(pAgentId);
|
||||
OSD element;
|
||||
lock (queue)
|
||||
@@ -368,12 +410,31 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DebugLevel > 0 && element is OSDMap)
|
||||
{
|
||||
OSDMap ev = (OSDMap)element;
|
||||
m_log.DebugFormat(
|
||||
"[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
|
||||
ev["message"], m_scene.GetScenePresence(pAgentId).Name);
|
||||
}
|
||||
|
||||
array.Add(element);
|
||||
|
||||
lock (queue)
|
||||
{
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
array.Add(queue.Dequeue());
|
||||
element = queue.Dequeue();
|
||||
|
||||
if (DebugLevel > 0 && element is OSDMap)
|
||||
{
|
||||
OSDMap ev = (OSDMap)element;
|
||||
m_log.DebugFormat(
|
||||
"[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
|
||||
ev["message"], m_scene.GetScenePresence(pAgentId).Name);
|
||||
}
|
||||
|
||||
array.Add(element);
|
||||
thisID++;
|
||||
}
|
||||
}
|
||||
@@ -410,148 +471,161 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
|
||||
{
|
||||
// TODO: this has to be redone to not busy-wait (and block the thread),
|
||||
// TODO: as soon as we have a non-blocking way to handle HTTP-requests.
|
||||
|
||||
// if (m_log.IsDebugEnabled)
|
||||
// {
|
||||
// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ ";
|
||||
// foreach (object key in request.Keys)
|
||||
// public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
|
||||
// {
|
||||
// // TODO: this has to be redone to not busy-wait (and block the thread),
|
||||
// // TODO: as soon as we have a non-blocking way to handle HTTP-requests.
|
||||
//
|
||||
//// if (m_log.IsDebugEnabled)
|
||||
//// {
|
||||
//// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ ";
|
||||
//// foreach (object key in request.Keys)
|
||||
//// {
|
||||
//// debug += key.ToString() + "=" + request[key].ToString() + " ";
|
||||
//// }
|
||||
//// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name);
|
||||
//// }
|
||||
//
|
||||
// Queue<OSD> queue = TryGetQueue(agentID);
|
||||
// OSD element;
|
||||
//
|
||||
// lock (queue)
|
||||
// element = queue.Dequeue(); // 15s timeout
|
||||
//
|
||||
// Hashtable responsedata = new Hashtable();
|
||||
//
|
||||
// int thisID = 0;
|
||||
// lock (m_ids)
|
||||
// thisID = m_ids[agentID];
|
||||
//
|
||||
// if (element == null)
|
||||
// {
|
||||
// //m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName);
|
||||
// if (thisID == -1) // close-request
|
||||
// {
|
||||
// debug += key.ToString() + "=" + request[key].ToString() + " ";
|
||||
// m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName);
|
||||
// responsedata["int_response_code"] = 404; //501; //410; //404;
|
||||
// responsedata["content_type"] = "text/plain";
|
||||
// responsedata["keepalive"] = false;
|
||||
// responsedata["str_response_string"] = "Closed EQG";
|
||||
// return responsedata;
|
||||
// }
|
||||
// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name);
|
||||
// responsedata["int_response_code"] = 502;
|
||||
// responsedata["content_type"] = "text/plain";
|
||||
// responsedata["keepalive"] = false;
|
||||
// responsedata["str_response_string"] = "Upstream error: ";
|
||||
// responsedata["error_status_text"] = "Upstream error:";
|
||||
// responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
// return responsedata;
|
||||
// }
|
||||
//
|
||||
// OSDArray array = new OSDArray();
|
||||
// if (element == null) // didn't have an event in 15s
|
||||
// {
|
||||
// // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
||||
// array.Add(EventQueueHelper.KeepAliveEvent());
|
||||
// //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// array.Add(element);
|
||||
//
|
||||
// if (element is OSDMap)
|
||||
// {
|
||||
// OSDMap ev = (OSDMap)element;
|
||||
// m_log.DebugFormat(
|
||||
// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
|
||||
// ev["message"], m_scene.GetScenePresence(agentID).Name);
|
||||
// }
|
||||
//
|
||||
// lock (queue)
|
||||
// {
|
||||
// while (queue.Count > 0)
|
||||
// {
|
||||
// element = queue.Dequeue();
|
||||
//
|
||||
// if (element is OSDMap)
|
||||
// {
|
||||
// OSDMap ev = (OSDMap)element;
|
||||
// m_log.DebugFormat(
|
||||
// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
|
||||
// ev["message"], m_scene.GetScenePresence(agentID).Name);
|
||||
// }
|
||||
//
|
||||
// array.Add(element);
|
||||
// thisID++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// OSDMap events = new OSDMap();
|
||||
// events.Add("events", array);
|
||||
//
|
||||
// events.Add("id", new OSDInteger(thisID));
|
||||
// lock (m_ids)
|
||||
// {
|
||||
// m_ids[agentID] = thisID + 1;
|
||||
// }
|
||||
//
|
||||
// responsedata["int_response_code"] = 200;
|
||||
// responsedata["content_type"] = "application/xml";
|
||||
// responsedata["keepalive"] = false;
|
||||
// responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
||||
//
|
||||
// m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
//
|
||||
// return responsedata;
|
||||
// }
|
||||
|
||||
Queue<OSD> queue = TryGetQueue(agentID);
|
||||
OSD element;
|
||||
|
||||
lock (queue)
|
||||
element = queue.Dequeue(); // 15s timeout
|
||||
|
||||
Hashtable responsedata = new Hashtable();
|
||||
|
||||
int thisID = 0;
|
||||
lock (m_ids)
|
||||
thisID = m_ids[agentID];
|
||||
|
||||
if (element == null)
|
||||
{
|
||||
//m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName);
|
||||
if (thisID == -1) // close-request
|
||||
{
|
||||
m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName);
|
||||
responsedata["int_response_code"] = 404; //501; //410; //404;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Closed EQG";
|
||||
return responsedata;
|
||||
}
|
||||
responsedata["int_response_code"] = 502;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Upstream error: ";
|
||||
responsedata["error_status_text"] = "Upstream error:";
|
||||
responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
OSDArray array = new OSDArray();
|
||||
if (element == null) // didn't have an event in 15s
|
||||
{
|
||||
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
||||
array.Add(EventQueueHelper.KeepAliveEvent());
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
array.Add(element);
|
||||
|
||||
lock (queue)
|
||||
{
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
array.Add(queue.Dequeue());
|
||||
thisID++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OSDMap events = new OSDMap();
|
||||
events.Add("events", array);
|
||||
|
||||
events.Add("id", new OSDInteger(thisID));
|
||||
lock (m_ids)
|
||||
{
|
||||
m_ids[agentID] = thisID + 1;
|
||||
}
|
||||
|
||||
responsedata["int_response_code"] = 200;
|
||||
responsedata["content_type"] = "application/xml";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
public Hashtable EventQueuePoll(Hashtable request)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
public Hashtable EventQueuePath2(Hashtable request)
|
||||
{
|
||||
string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
|
||||
// pull off the last "/" in the path.
|
||||
Hashtable responsedata = new Hashtable();
|
||||
capuuid = capuuid.Substring(0, capuuid.Length - 1);
|
||||
capuuid = capuuid.Replace("/CAPS/EQG/", "");
|
||||
UUID AvatarID = UUID.Zero;
|
||||
UUID capUUID = UUID.Zero;
|
||||
|
||||
// parse the path and search for the avatar with it registered
|
||||
if (UUID.TryParse(capuuid, out capUUID))
|
||||
{
|
||||
lock (m_QueueUUIDAvatarMapping)
|
||||
{
|
||||
if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID))
|
||||
{
|
||||
AvatarID = m_QueueUUIDAvatarMapping[capUUID];
|
||||
}
|
||||
}
|
||||
|
||||
if (AvatarID != UUID.Zero)
|
||||
{
|
||||
return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
|
||||
}
|
||||
else
|
||||
{
|
||||
responsedata["int_response_code"] = 404;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Not Found";
|
||||
responsedata["error_status_text"] = "Not Found";
|
||||
responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
return responsedata;
|
||||
// return 404
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responsedata["int_response_code"] = 404;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Not Found";
|
||||
responsedata["error_status_text"] = "Not Found";
|
||||
responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
return responsedata;
|
||||
// return 404
|
||||
}
|
||||
|
||||
}
|
||||
// public Hashtable EventQueuePath2(Hashtable request)
|
||||
// {
|
||||
// string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
|
||||
// // pull off the last "/" in the path.
|
||||
// Hashtable responsedata = new Hashtable();
|
||||
// capuuid = capuuid.Substring(0, capuuid.Length - 1);
|
||||
// capuuid = capuuid.Replace("/CAPS/EQG/", "");
|
||||
// UUID AvatarID = UUID.Zero;
|
||||
// UUID capUUID = UUID.Zero;
|
||||
//
|
||||
// // parse the path and search for the avatar with it registered
|
||||
// if (UUID.TryParse(capuuid, out capUUID))
|
||||
// {
|
||||
// lock (m_QueueUUIDAvatarMapping)
|
||||
// {
|
||||
// if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID))
|
||||
// {
|
||||
// AvatarID = m_QueueUUIDAvatarMapping[capUUID];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (AvatarID != UUID.Zero)
|
||||
// {
|
||||
// return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// responsedata["int_response_code"] = 404;
|
||||
// responsedata["content_type"] = "text/plain";
|
||||
// responsedata["keepalive"] = false;
|
||||
// responsedata["str_response_string"] = "Not Found";
|
||||
// responsedata["error_status_text"] = "Not Found";
|
||||
// responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
// return responsedata;
|
||||
// // return 404
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// responsedata["int_response_code"] = 404;
|
||||
// responsedata["content_type"] = "text/plain";
|
||||
// responsedata["keepalive"] = false;
|
||||
// responsedata["str_response_string"] = "Not Found";
|
||||
// responsedata["error_status_text"] = "Not Found";
|
||||
// responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
// return responsedata;
|
||||
// // return 404
|
||||
// }
|
||||
// }
|
||||
|
||||
public OSD EventQueueFallBack(string path, OSD request, string endpoint)
|
||||
{
|
||||
@@ -715,6 +789,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
OSD item = EventQueueHelper.GroupMembership(groupUpdate);
|
||||
Enqueue(item, avatarID);
|
||||
}
|
||||
|
||||
public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID)
|
||||
{
|
||||
OSD item = EventQueueHelper.PlacesQuery(groupUpdate);
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using log4net.Config;
|
||||
using Nini.Config;
|
||||
using NUnit.Framework;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.ClientStack.Linden;
|
||||
using OpenSim.Region.CoreModules.Framework;
|
||||
using OpenSim.Tests.Common;
|
||||
using OpenSim.Tests.Common.Mock;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class EventQueueTests
|
||||
{
|
||||
private TestScene m_scene;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
MainServer.Instance = new BaseHttpServer(9999, false, 9998, "");
|
||||
|
||||
IConfigSource config = new IniConfigSource();
|
||||
config.AddConfig("Startup");
|
||||
config.Configs["Startup"].Set("EventQueue", "true");
|
||||
|
||||
CapabilitiesModule capsModule = new CapabilitiesModule();
|
||||
EventQueueGetModule eqgModule = new EventQueueGetModule();
|
||||
|
||||
m_scene = SceneHelpers.SetupScene();
|
||||
SceneHelpers.SetupSceneModules(m_scene, config, capsModule, eqgModule);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddForClient()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
|
||||
|
||||
// TODO: Add more assertions for the other aspects of event queues
|
||||
Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RemoveForClient()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
UUID spId = TestHelpers.ParseTail(0x1);
|
||||
|
||||
SceneHelpers.AddScenePresence(m_scene, spId);
|
||||
m_scene.IncomingCloseAgent(spId);
|
||||
|
||||
// TODO: Add more assertions for the other aspects of event queues
|
||||
Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
151
OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs
Normal file
151
OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Mono.Addins;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
/// <summary>
|
||||
/// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
|
||||
/// </summary>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FetchInventory2Module : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public bool Enabled { get; private set; }
|
||||
|
||||
private Scene m_scene;
|
||||
|
||||
private IInventoryService m_inventoryService;
|
||||
|
||||
private string m_fetchInventory2Url;
|
||||
|
||||
private FetchInventory2Handler m_fetchHandler;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig config = source.Configs["ClientStack.LindenCaps"];
|
||||
if (config == null)
|
||||
return;
|
||||
|
||||
m_fetchInventory2Url = config.GetString("Cap_FetchInventory2", string.Empty);
|
||||
|
||||
if (m_fetchInventory2Url != string.Empty)
|
||||
Enabled = true;
|
||||
}
|
||||
|
||||
public void AddRegion(Scene s)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
m_scene = s;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene s)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene s)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
m_inventoryService = m_scene.InventoryService;
|
||||
|
||||
// We'll reuse the same handler for all requests.
|
||||
if (m_fetchInventory2Url == "localhost")
|
||||
m_fetchHandler = new FetchInventory2Handler(m_inventoryService);
|
||||
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
|
||||
public void Close() {}
|
||||
|
||||
public string Name { get { return "FetchInventory2Module"; } }
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
RegisterFetchCap(agentID, caps, "FetchInventory2", m_fetchInventory2Url);
|
||||
}
|
||||
|
||||
private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
|
||||
{
|
||||
string capUrl;
|
||||
|
||||
if (url == "localhost")
|
||||
{
|
||||
capUrl = "/CAPS/" + UUID.Random();
|
||||
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest);
|
||||
|
||||
caps.RegisterHandler(capName, reqHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
capUrl = url;
|
||||
|
||||
caps.RegisterHandler(capName, capUrl);
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
|
||||
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,8 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
// private IAssetService m_assetService;
|
||||
@@ -147,7 +146,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
if (m_scene.TryGetClient(agentID, out client))
|
||||
{
|
||||
if (!mm.UploadCovered(client, mm.UploadCharge))
|
||||
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
|
||||
{
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||
@@ -210,6 +209,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
|
||||
string assetType,UUID AgentID)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[NEW FILE AGENT INVENTORY VARIABLE PRICE MODULE]: Upload complete for {0}", inventoryItem);
|
||||
|
||||
sbyte assType = 0;
|
||||
sbyte inType = 0;
|
||||
|
||||
@@ -259,13 +261,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
item.AssetType = assType;
|
||||
item.InvType = inType;
|
||||
item.Folder = parentFolder;
|
||||
item.CurrentPermissions = (uint)PermissionMask.All;
|
||||
item.CurrentPermissions
|
||||
= (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
|
||||
item.BasePermissions = (uint)PermissionMask.All;
|
||||
item.EveryOnePermissions = 0;
|
||||
item.NextPermissions = (uint)PermissionMask.All;
|
||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||
m_scene.AddInventoryItem(item);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,21 +332,22 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
grp.IsAttachment = false;
|
||||
// Required for linking
|
||||
grp.RootPart.UpdateFlag = 0;
|
||||
grp.RootPart.ClearUpdateSchedule();
|
||||
|
||||
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
|
||||
{
|
||||
m_scene.AddSceneObject(grp);
|
||||
grp.AbsolutePosition = obj.Position;
|
||||
}
|
||||
|
||||
|
||||
allparts[i] = grp;
|
||||
}
|
||||
|
||||
for (int j = 1; j < allparts.Length; j++)
|
||||
{
|
||||
rootGroup.RootPart.UpdateFlag = 0;
|
||||
allparts[j].RootPart.UpdateFlag = 0;
|
||||
// Required for linking
|
||||
rootGroup.RootPart.ClearUpdateSchedule();
|
||||
allparts[j].RootPart.ClearUpdateSchedule();
|
||||
rootGroup.LinkToGroup(allparts[j]);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Mono.Addins;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class UploadBakedTextureModule : INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// For historical reasons this is fixed, but there
|
||||
/// </summary>
|
||||
private static readonly string m_uploadBakedTexturePath = "0010/";// This is in the LandManagementModule.
|
||||
|
||||
private Scene m_scene;
|
||||
private bool m_persistBakedTextures;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig sconfig = source.Configs["Startup"];
|
||||
if (sconfig != null)
|
||||
m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene s)
|
||||
{
|
||||
m_scene = s;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene s)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene s)
|
||||
{
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close() { }
|
||||
|
||||
public string Name { get { return "UploadBakedTextureModule"; } }
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
caps.RegisterHandler(
|
||||
"UploadBakedTexture",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
"/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath,
|
||||
new UploadBakedTextureHandler(
|
||||
caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture));
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user