Compare commits

...

1814 Commits

Author SHA1 Message Date
UbitUmarov 4f00fb2659 flotsam: minor log message change 2020-07-30 21:18:58 +01:00
UbitUmarov 87b55a0627 flotsam: still bad 2020-07-30 21:14:15 +01:00
UbitUmarov 3b06891252 dont break asset cache folders spread more than needed 2020-07-30 18:10:06 +01:00
UbitUmarov 111c741f1b flotsam: change the changes 2020-07-30 01:40:54 +01:00
UbitUmarov 1c37f357b3 flotsam: more changes 2020-07-30 01:39:04 +01:00
UbitUmarov c19a0cc21f flotsam: deeper changes on files expire 2020-07-30 00:02:02 +01:00
UbitUmarov c575c211f9 flotsam: slower... 2020-07-28 21:01:45 +01:00
UbitUmarov bd2476c61e flotsam: slow it a lot more, make some debug log visible 2020-07-28 04:26:13 +01:00
UbitUmarov d52b794828 flotsam add a cooldown on files expire/deletes also 2020-07-28 02:57:41 +01:00
UbitUmarov cbc8974245 duuhhhh what was in my coffe ? 2020-07-27 18:17:09 +01:00
UbitUmarov e2982fbadc make clear that MaxRegionsViewDistance can be set to zero, disabling nearby regions visibility and crossings 2020-07-27 18:05:38 +01:00
UbitUmarov c4a0b8fa3f fix the option name on the ini file 2020-07-27 16:39:40 +01:00
UbitUmarov be5c2bb212 Xengine: remove option CompactMemOnLoad, that wasn't that good; add option AttachmentsDomainLoading to allow attachments to load on own appdomain even if AppDomainLoading is false. Scripts will be slower, use more memory but will be disposed on avatar leave, if gc is in good mood. This may be usefull on regions with a lot of traffic, sure use Yengine even better, 2020-07-27 16:13:09 +01:00
UbitUmarov 0c716cbd73 remove async await no longer used 2020-07-24 19:24:34 +01:00
UbitUmarov e08ca7402c reduce default http keepalive to just 30s because to viewers connections flood. 2020-07-24 19:19:16 +01:00
UbitUmarov d9a680703f cosmetics on http server 2020-07-24 17:12:38 +01:00
UbitUmarov e0aff5e640 avoid some null refs 2020-07-24 13:24:55 +01:00
UbitUmarov bb56157c92 remove a forgotten gc collect on flotsam cache 2020-07-23 23:11:59 +01:00
UbitUmarov 6fafb7462d avoid ethernal references 2020-07-23 19:39:45 +01:00
UbitUmarov c077cfdd78 bad c&p 2020-07-23 19:08:25 +01:00
UbitUmarov c2af3a5474 avoid ethernal references 2020-07-23 19:04:56 +01:00
UbitUmarov 25582af3dc lludpclient: use jobengine again, keeping less ethernal references 2020-07-23 18:35:34 +01:00
UbitUmarov 03e3078a9f add fixed skys to opensim library 2020-07-21 18:17:00 +01:00
UbitUmarov 6e15cf41a4 fix new sky ambient color; Rainbow texture with retouch fro AI Austin (red side gradient) 2020-07-21 17:38:11 +01:00
UbitUmarov 53b9f87da6 change defauld sky cloud D parameter 2020-07-19 21:50:56 +01:00
UbitUmarov baa95b8707 add/change some assets 2020-07-19 10:45:02 +01:00
UbitUmarov 730c864df8 add another asset. This may not be that good still :( 2020-07-16 23:27:03 +01:00
UbitUmarov ce92ee1057 cache bad folders requests for 30s. Suitcase can induce a ton of this, and viewers keep requesting 2020-07-16 18:23:17 +01:00
UbitUmarov 7a55f82f74 add a expire cache for simple items that can be a stored on a dictionary key, not value 2020-07-16 18:17:04 +01:00
UbitUmarov 1f822c6077 allow the use of Sky or water from a asset, not just full daycycle. This may need more work 2020-07-15 22:56:09 +01:00
UbitUmarov f7104a66a5 change parcel env group power check to only parcel environment modify 2020-07-15 22:52:47 +01:00
UbitUmarov 4176e1491e missing file 2020-07-15 19:42:40 +01:00
UbitUmarov 4bc74139a4 dispose prematurely discon sockets 2020-07-15 19:15:11 +01:00
UbitUmarov 402186844c cosmetics 2020-07-15 19:13:22 +01:00
UbitUmarov 6a27f3fb20 useless changes 2020-07-15 05:15:32 +01:00
UbitUmarov 6c5bf4ed25 useless cosmetics 2020-07-15 01:40:53 +01:00
UbitUmarov f32c0ead05 avoid c# fun things, plus cosmetics 2020-07-14 17:54:58 +01:00
UbitUmarov b2068fd39f give up calling gc.collect on flotsamcache. Did nothing visible and has negative side effects 2020-07-13 23:26:09 +01:00
UbitUmarov ba972b50ed disable console command restart, that currently will just break everything ( there is also the restart module that will do the same if used ) 2020-07-13 21:35:50 +01:00
UbitUmarov fe7d9625aa cosmetics 2020-07-13 06:16:11 +01:00
UbitUmarov 6ba5b78851 check local grid before doing hg fetch asset metadata 2020-07-11 20:48:50 +01:00
UbitUmarov 541cb15751 fix a bug on flotsam getfilename 2020-07-11 20:03:31 +01:00
UbitUmarov ebf5b69283 mantis 8725: increase channeldigger smooth strength, tanks Datapanic 2020-07-10 20:14:14 +01:00
UbitUmarov 82ccf57533 take some asset classes out of ViewerEnvironment.cs to own files 2020-07-10 19:54:40 +01:00
UbitUmarov fe5e6d4189 avoid a null ref during shutdown (one of them..) 2020-07-10 19:35:39 +01:00
UbitUmarov 01b4f83421 change the 4 fixed skys for eep viewers again (sorry). This also fixes the issue of viewers not showing the selected fixed sky. Clear viewer cache. On regions use fcache deletedefaultassets so updated grid ones are used. In alternative use fcache cachedefaultassets to override all default assets by the ones on this commit. Note that this hides the grid ones, and this is lost if you clear the region asset cache 2020-07-10 00:12:36 +01:00
UbitUmarov f334c1206f change Midday asset (uuid 6c83e853-e7f8-cad7-8ee6-5f31c453721c) fixing its water. eep viewers cache needs to be clear, region asset cache needs this entry removed (comand fcache deletedefaultassets will remove default assets from region cache, forcing reload from grid). Normal robust asset services should update it grid side. Otherwise, if already present, you will need to change directly on db 2020-07-09 18:40:48 +01:00
UbitUmarov 107ece1ce0 change default (in code) waterFogDensity 2020-07-09 17:38:31 +01:00
UbitUmarov af6fa37cc2 mantis 8675: flotsam cache only log missing files if log level >= 2 (thanks mewtwo0641 ) this log will include things that may not even be assets due to how gatherer works; change a bit filename composition 2020-07-09 16:27:11 +01:00
UbitUmarov 28fcbc65f9 add GC.collect to flotsam cache expire. This is ugly but so is GC 2020-07-07 17:35:27 +01:00
UbitUmarov e5c2bd505c fix a bug on region eep env set permission 2020-06-30 20:23:51 +01:00
UbitUmarov 5b596bb29e update script syntax 2020-06-30 13:29:42 +01:00
UbitUmarov c4f05016d7 of course merge did messup libomv 2020-06-29 01:30:40 +01:00
UbitUmarov fb35f31078 fix the merge 2020-06-29 01:29:58 +01:00
UbitUmarov 7cf329c846 Merge branch 'master' into uglysky
# Conflicts:
#	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
#	bin/OpenMetaverse.Rendering.Meshmerizer.dll
#	bin/OpenMetaverse.StructuredData.dll
#	bin/OpenMetaverse.dll
#	bin/OpenMetaverseTypes.dll
2020-06-29 01:28:33 +01:00
UbitUmarov 1c4300ff91 fix a flag name 2020-06-29 01:16:12 +01:00
UbitUmarov 34fa6abc00 do not trust ms documentation about inner stream dispose 2020-06-29 01:03:00 +01:00
UbitUmarov d7fb822533 Merge branch 'master' into uglysky 2020-06-27 13:34:49 +01:00
UbitUmarov 16cfb3deab mantis 8717: fix local heap use account (will automatlic recompile scripts) 2020-06-27 13:33:11 +01:00
UbitUmarov 27a81d4909 minor moon rotation change 2020-06-27 13:16:28 +01:00
UbitUmarov a568b759bc sunphase depends on the env where av is or has 2020-06-26 11:29:31 +01:00
UbitUmarov 71d8bcd90c missed other 2020-06-25 21:47:57 +01:00
UbitUmarov 86bd9ca255 missing changed test files 2020-06-25 21:24:51 +01:00
UbitUmarov e2ffc17d1f fix sqlite region migrations 2020-06-25 17:44:23 +01:00
UbitUmarov 73754670ca small change on wl converter 2020-06-25 17:20:56 +01:00
UbitUmarov b7750e52d6 lang env on PGSQL 2020-06-24 11:36:34 +01:00
UbitUmarov 63ae8a09c6 removed the disabled region settings from tests 2020-06-24 08:18:50 +01:00
UbitUmarov 768f506a23 work around sunlight_color mess 2020-06-23 16:07:25 +01:00
UbitUmarov 60da45b715 lang env on sqlite 2020-06-23 14:28:34 +01:00
UbitUmarov 1d42d8ab6e still not good, add more spaghetti 2020-06-22 18:51:10 +01:00
UbitUmarov f3eb71113e still not good, add more spaghetti 2020-06-22 18:16:48 +01:00
UbitUmarov 7b3ac662dc on load, store the env via the module, so it is stored. This api is still a bit incoerent 2020-06-22 16:47:20 +01:00
UbitUmarov 16c18c0855 actually just go back to extension settings.bin. Actual name it totally irrelevant, as long it is unique 2020-06-22 16:27:21 +01:00
UbitUmarov eec92454b0 define again asset file extention settings.bin for bw comp 2020-06-22 16:23:49 +01:00
UbitUmarov 8fe2cd6c46 save/load environments to/from oars 2020-06-22 15:46:39 +01:00
UbitUmarov 7b77609537 shut up HG STATUS NOTIFIER 2020-06-21 17:09:33 +01:00
UbitUmarov 7da23b6714 missing files 2020-06-21 14:59:20 +01:00
UbitUmarov 53b0ee242d add a 3 to 1 daycycle and make it the default 2020-06-21 14:27:24 +01:00
UbitUmarov 5b87347476 and add some untested ossl 2020-06-21 12:41:10 +01:00
UbitUmarov e04af236f2 forced still bad 2020-06-21 02:56:20 +01:00
UbitUmarov 29bf9522e2 forced still bad 2020-06-21 02:31:57 +01:00
UbitUmarov bcacd2ff21 cancel forced env on make child agent 2020-06-21 01:46:36 +01:00
UbitUmarov 5b56a09cb2 some fixes on env protocol, forced env, etc 2020-06-21 01:41:14 +01:00
UbitUmarov 17e7e9b354 enable threat check on the new ossl method 2020-06-19 21:17:26 +01:00
UbitUmarov edf93abdbc try adding a clear init 2020-06-19 20:06:59 +01:00
UbitUmarov e3ecf0ddbe add LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String environment). note this is a hack, we cant do the ll* one 2020-06-19 19:55:40 +01:00
UbitUmarov d322248fd1 fix send parcel env version 2020-06-19 02:06:58 +01:00
UbitUmarov dd2495be9d remove dead config options 2020-06-18 16:52:45 +01:00
UbitUmarov 1b870131d4 give/use the new group power 2020-06-18 14:33:14 +01:00
UbitUmarov 362025be38 update libomv 2020-06-18 14:23:24 +01:00
UbitUmarov 3c8b4423b1 missing file 2020-06-18 13:49:46 +01:00
UbitUmarov cca383b452 more to go, fix lsl funtions for parcels env 2020-06-18 13:47:34 +01:00
UbitUmarov f708b413a1 more to go 2020-06-18 13:18:08 +01:00
UbitUmarov 6cb2cb40cc a ton more to go 2020-06-18 12:16:00 +01:00
UbitUmarov 8f79439558 a ton more to go 2020-06-18 12:11:36 +01:00
UbitUmarov 44c90bf294 misspell all across the board 2020-06-18 12:01:53 +01:00
UbitUmarov 104f7f0eb2 store parcel uglysky on mysql region db (others one day..) 2020-06-18 01:36:01 +01:00
UbitUmarov 369a2e1453 clear parcels uglysky on clearing override flag 2020-06-17 21:08:52 +01:00
UbitUmarov e7807d4359 missing files 2020-06-17 16:12:24 +01:00
UbitUmarov e538628dec 2first dirty version and non persistent parcel uglysky 2020-06-17 15:49:13 +01:00
UbitUmarov 7a9e03876a block some region/estate settings no longer avaiable 2020-06-17 12:34:38 +01:00
UbitUmarov 24689f064c disable cap EstateChangeInfo, currently broken on viewers 2020-06-17 11:46:56 +01:00
UbitUmarov 46dce3cedb speeup time update a bit ( this will be a conf option) 2020-06-16 16:12:14 +01:00
UbitUmarov 70f867a518 yeack, revert that... for now we do need to use diferent notification methods 2020-06-16 15:27:43 +01:00
UbitUmarov 24a0f0f6da send event message WindlightRefresh for all viewers 2020-06-16 13:47:44 +01:00
UbitUmarov 833ae02121 update libomv 2020-06-16 04:18:14 +01:00
UbitUmarov 00b2837d30 fix wl lightnorm 2020-06-16 01:58:08 +01:00
UbitUmarov 9ae867abd3 missing file 2020-06-15 04:06:24 +01:00
UbitUmarov 4329f5962a stop sending sun direction, recent viewers should not need it, and it costs cpu 2020-06-15 04:03:06 +01:00
UbitUmarov b3ce8e9fc7 big numbers need more bits.. 2020-06-14 21:41:50 +01:00
UbitUmarov 3a5d5fd50e store as llsd notation on region db, plus a few more changes 2020-06-14 20:45:09 +01:00
UbitUmarov dfa69b1869 add some assets 2020-06-14 01:18:59 +01:00
UbitUmarov d1c78564bb Merge branch 'master' into uglysky 2020-06-14 00:01:38 +01:00
UbitUmarov d7089bcff2 mantis 8715: fix peer http port. thanks GuduleLapointe 2020-06-13 23:59:55 +01:00
UbitUmarov 05dc8594f0 corner cases.. 2020-06-13 19:06:17 +01:00
UbitUmarov 1980c01eb8 change legacy altitudes 2020-06-13 18:08:48 +01:00
UbitUmarov 9a18678fec and of course i missed a file.. 2020-06-13 15:51:17 +01:00
UbitUmarov b37141182a more on SendViewerTime() 2020-06-13 15:48:35 +01:00
UbitUmarov 3bf0f6c407 do not display 0:xx:xx PM 2020-06-12 20:02:55 +01:00
UbitUmarov e404d671c8 better keep some things sorted 2020-06-12 10:16:59 +01:00
UbitUmarov d1ecccfaca add some ossl 2020-06-11 19:55:12 +01:00
UbitUmarov e407f69b2c add other env time function 2020-06-11 19:52:59 +01:00
UbitUmarov e8b9735f95 add some lsl functions 2020-06-11 17:12:22 +01:00
UbitUmarov 02ccbd0bbd some more changes; add some interface functions 2020-06-11 17:08:39 +01:00
UbitUmarov c6fcc33e49 a few more changes on sun position 2020-06-11 06:08:21 +01:00
UbitUmarov 13ed40d9f6 replace sun module 2020-06-11 00:01:43 +01:00
UbitUmarov 9ce70be5ce env asset can be any llsd type 2020-06-10 20:32:30 +01:00
UbitUmarov 2179aa14e0 Merge branch 'master' into uglysky 2020-06-10 20:21:07 +01:00
UbitUmarov efb2b67456 update libomv 2020-06-10 20:19:48 +01:00
UbitUmarov fa0a87f1c0 Merge branch 'master' into uglysky 2020-06-10 12:37:40 +01:00
UbitUmarov a61b5d5d38 revert some changes to groups V2 that will break external modules, with no special gain 2020-06-10 12:36:10 +01:00
UbitUmarov 8d2b502393 missing file 2020-06-10 09:37:28 +01:00
UbitUmarov e2be90caaf replace lightshare early work 2020-06-10 09:26:55 +01:00
UbitUmarov 0d76635113 do store a new flag on region db 2020-06-09 19:44:57 +01:00
UbitUmarov bde4354c15 some changes on viewer caps detection 2020-06-09 18:43:26 +01:00
UbitUmarov fa0044fb6c webutil remove some not that usefull timing logs, plust some cosmetics 2020-06-09 13:39:30 +01:00
UbitUmarov f4dfe2159c xinventory connector, remove a garbage dictionary copy. remove naive retry option 2020-06-09 13:32:42 +01:00
UbitUmarov 444a6b707b also allow purge/delete of LostAndFound folder, or we can not clean it with recent viewers 2020-06-09 04:20:18 +01:00
UbitUmarov 5b338fb31a fix a typo 2020-06-09 03:11:05 +01:00
UbitUmarov e1b234d9d0 change show uptime to 24hour format 2020-06-09 02:20:35 +01:00
UbitUmarov d3cb210080 apply similar changes to groups V2 2020-06-09 01:03:27 +01:00
UbitUmarov 351235f78e XmlRpcGroup: minor change 2020-06-09 00:53:03 +01:00
UbitUmarov 9c55c5bdb2 XmlRpcGroup: fix groupNoticesEnabled check 2020-06-09 00:04:01 +01:00
UbitUmarov 1a57abebfc XmlRpcGroup: try to improve notices attachments 2020-06-08 23:17:41 +01:00
UbitUmarov 775420c46a set object select on demand, not when it is created 2020-06-05 01:57:17 +01:00
UbitUmarov b440a9534d AgentCircuitManager: always remove possible old one on add 2020-06-04 20:19:05 +01:00
UbitUmarov 38fc68ac0c some changes to AgentCircuitManager 2020-06-04 19:58:07 +01:00
UbitUmarov 7ef69edf33 flotsam: also expire weakreferences 2020-06-04 19:52:34 +01:00
UbitUmarov 7a07731371 on simple cases no need to parse at all 2020-06-04 02:50:39 +01:00
UbitUmarov 84a3ff37ab don't load a full xml doc when we just want a single forward parse 2020-06-04 02:37:27 +01:00
UbitUmarov 301f28cfd4 add some heap variation to floatsam optional cache expire log 2020-06-03 14:34:11 +01:00
UbitUmarov 2efa53af52 also show total number of a avatar prims on attachments show 2020-06-03 01:19:42 +01:00
UbitUmarov 0a22bde6d1 replace a clear attachments by a full delete 2020-06-03 00:36:03 +01:00
UbitUmarov 3188db7041 force Yengine scripts recompile 2020-06-02 22:18:28 +01:00
UbitUmarov 06bdfc48d0 move the ToUpper to where it belongs 2020-06-02 18:25:13 +01:00
UbitUmarov 239c07ed9d oops ToUpper is needed on default animation names 2020-06-02 18:17:53 +01:00
UbitUmarov 8cebc84de7 let objects use default animations 2020-06-02 18:05:22 +01:00
UbitUmarov fde3727453 avoid null refs on part inventory, that can happen if only using default animations names for example 2020-06-02 17:02:42 +01:00
UbitUmarov 9b09bd255c change osNpcSaveAppearance to save huds by default like before, so its coerent with past and the other save app methods 2020-06-01 21:31:18 +01:00
UbitUmarov 9bd5310fe8 expose the option to save HUDs into notecard on the API 2020-06-01 21:05:57 +01:00
UbitUmarov 873b3b0af6 do not store HUDs on appearence notecards 2020-06-01 19:07:49 +01:00
UbitUmarov 190acf093a finally enable cap GetAsset(ViewerAssets) by default. Note that users with FS6.0.x will have issues. They need to upgrade 2020-06-01 18:12:32 +01:00
UbitUmarov 43094592d5 show number of prims on attachments show command 2020-06-01 02:02:00 +01:00
UbitUmarov e0c49c42e3 and more changes on uuid gatherer and libomv 2020-05-31 14:21:50 +01:00
UbitUmarov 41d9441512 fix typo 2020-05-31 02:17:51 +01:00
UbitUmarov f0581ff1ff and more changes on uuid gatherer and libomv 2020-05-31 01:35:03 +01:00
UbitUmarov 8ac70b6155 and more changes on uuid gatherer and libomv 2020-05-30 21:34:13 +01:00
UbitUmarov 42b75021b6 more changes on uuid gatherer 2020-05-30 19:44:11 +01:00
UbitUmarov 5ac1fff43e update libomv 2020-05-30 19:43:41 +01:00
UbitUmarov b541de034c make some limit use of new libomv things 2020-05-30 15:51:01 +01:00
UbitUmarov 7b8db526b3 update libomv 2020-05-30 15:28:44 +01:00
UbitUmarov 9896224605 agent preferences needs to work without backend storage 2020-05-30 14:13:07 +01:00
UbitUmarov 8f39405380 err ok not so fast 2020-05-27 00:18:32 +01:00
UbitUmarov 563d5d30ee some more suport for a new inventory and asset type 2020-05-27 00:04:19 +01:00
UbitUmarov 182b266ec4 avoid potencial null ref 2020-05-26 15:16:37 +01:00
UbitUmarov d2dbe3f4d0 Yeackk bad bad typo 2020-05-26 14:46:15 +01:00
UbitUmarov 8a9ebe48ce mantis 8708: dont bother updating something abotu to be deleted ( and that was also wrong) 2020-05-26 13:23:06 +01:00
UbitUmarov 0a48da85a3 SOP to xml: don't waste space with some unset optional parameters. 2020-05-26 12:48:08 +01:00
UbitUmarov d460a3fc86 missing file 2020-05-25 14:50:10 +01:00
UbitUmarov 1c5b9e5af8 missing file 2020-05-25 14:45:53 +01:00
UbitUmarov 66eb8a2c2e let engines Suspend and resume scripts return false if script not on that engine 2020-05-25 14:41:59 +01:00
UbitUmarov 5f52de2578 mantis 8706: avoid spurius logs on Yengine during object delete 2020-05-24 15:04:44 +01:00
UbitUmarov cc4e14a88d add missing ';' on mysql connection strings 2020-05-23 17:06:19 +01:00
UbitUmarov b598573f41 fix DataSnapShot 2020-05-22 16:55:20 +01:00
UbitUmarov 4679ede2f2 missing file 2020-05-22 14:03:28 +01:00
UbitUmarov f326cc8901 reduce garbage on WebFetchInvDesc 2020-05-22 14:00:12 +01:00
UbitUmarov 3c33d5c448 change nullterm arg default true 2020-05-22 00:55:54 +01:00
UbitUmarov 86d8f9963c make a bit more use of it 2020-05-22 00:29:01 +01:00
UbitUmarov 8d8ead9776 add own version of utf8 getbytes. More recent .net versions (core?) do have similar, but not want got there now, besides only similar.. 2020-05-21 22:41:15 +01:00
UbitUmarov 6e0d82f584 add 2 minor speedups on allow parcel owner more restrive checks 2020-05-21 21:55:23 +01:00
UbitUmarov 35b0b77656 update libomv 2020-05-20 13:51:42 +01:00
UbitUmarov 0bfacb7892 change hg link request log message 2020-05-20 03:02:01 +01:00
UbitUmarov fffac7d531 mantis 8704: fix issues on YEngine 2020-05-20 00:35:51 +01:00
UbitUmarov 5167bd097b mantis 8250: a few more changes 2020-05-19 21:50:21 +01:00
UbitUmarov 337832ecbe mantis 8250: if flying, stay flying 2020-05-19 17:01:32 +01:00
UbitUmarov 822fea4a99 missing file, of course 2020-05-19 16:05:43 +01:00
UbitUmarov aca62392ac mantis 8250: make same changes to avatar move to target (still no new OSSL) 2020-05-19 15:59:53 +01:00
UbitUmarov 28b22a4fc1 revert the use of direct data on xml decode, for now 2020-05-18 04:31:11 +01:00
UbitUmarov aca5728ab2 try to work around missing BOM 2020-05-18 02:37:03 +01:00
UbitUmarov e308ab8843 .net xml things don't like null terminated strings 2020-05-18 01:12:40 +01:00
UbitUmarov 9ecee558b5 whatever... 2020-05-18 00:28:24 +01:00
UbitUmarov 4fa8e20aab add more cooldown to flotsam cache files expire 2020-05-18 00:20:28 +01:00
UbitUmarov fe72b54652 cosmetics 2020-05-17 17:16:29 +01:00
UbitUmarov 9ce52ed2fc cosmetics 2020-05-16 03:01:44 +01:00
UbitUmarov dc5a0244fc cosmetics 2020-05-16 02:22:01 +01:00
UbitUmarov cfe1285869 missing files 2020-05-16 02:14:13 +01:00
UbitUmarov 65ca238cd7 do unpack appearence cacheitems on tps 2020-05-16 01:52:53 +01:00
UbitUmarov baf5c61387 simplify GruntWork on getassets (needs more) 2020-05-16 01:16:19 +01:00
UbitUmarov 48892ad8a7 timestamp http requests 2020-05-15 23:40:19 +01:00
UbitUmarov 7098091616 avoid null ref 2020-05-15 18:17:13 +01:00
UbitUmarov c0597e278b update libomv 2020-05-15 15:12:34 +01:00
UbitUmarov 79bb22eaf6 fix typo 2020-05-15 15:11:06 +01:00
UbitUmarov 214cf5d60b llsdXml: do direct base64 encode 2020-05-15 14:41:38 +01:00
UbitUmarov 5848d3a6bb make scenepresence IDisposable 2020-05-14 13:36:27 +01:00
UbitUmarov 67bc086782 add sog TemporaryInstance flag 2020-05-14 12:51:55 +01:00
UbitUmarov 8b77162020 make sog, sop and sop inventory IDisposable 2020-05-14 12:02:46 +01:00
UbitUmarov dd55a3d19c fix a bug on part inventory locking 2020-05-14 11:51:57 +01:00
UbitUmarov af1e20d054 missing file 2020-05-13 14:58:26 +01:00
UbitUmarov 4c7107dfda cosmetics 2020-05-13 14:51:05 +01:00
UbitUmarov f15c6be20c update libomv 2020-05-13 13:55:13 +01:00
UbitUmarov a2c7a13065 silly bug 2020-05-12 20:42:31 +01:00
UbitUmarov 51bc19f1ab no need to clone something Idisposable when we just want to see values 2020-05-12 18:58:07 +01:00
UbitUmarov d613287a77 mk TaskInventoryDictionary IDisposable 2020-05-12 18:52:33 +01:00
UbitUmarov c63fabe054 well and it does get all assets, grrr 2020-05-12 04:19:45 +01:00
UbitUmarov 48df8869e8 duuhh windows does not update lastaccesstime 2020-05-12 03:03:31 +01:00
UbitUmarov 6a4564869b flotsam file touch before expire: gatherer.GatherAll already touchs and tries to fecth all assets. This is nasty to use anyway.. avoid it 2020-05-12 00:56:47 +01:00
UbitUmarov 7c0b3387dd give up on simplehandler for root default get for now 2020-05-11 23:28:59 +01:00
UbitUmarov c40b297fc7 (TEST) add a default root uri GET handler. this may be usefull for some cases. 2020-05-11 23:07:29 +01:00
UbitUmarov 4bf4c76a64 cosmetics 2020-05-11 19:35:13 +01:00
UbitUmarov 8da733c485 test xbakes async/await store 2020-05-11 19:06:09 +01:00
UbitUmarov 713c222ec8 remove some redundancy 2020-05-11 15:12:21 +01:00
UbitUmarov 7f3bb9267a oops a bad end slash 2020-05-11 13:38:59 +01:00
UbitUmarov 6d92b75452 more on end slash and uri handler determination 2020-05-11 13:01:27 +01:00
UbitUmarov 2629d9d901 comment out estimatedLocalCost test 2020-05-10 21:30:34 +01:00
UbitUmarov c15869438c move currency-base-uri simulator feature to global settings, based on [Economy] economy setting on opensim.ini. make sampleMoney honour it 2020-05-10 21:27:23 +01:00
UbitUmarov aafc6579a1 remove end slash from most URLs we send to viewers 2020-05-10 21:14:52 +01:00
UbitUmarov c1d69018bd some viewers send '//' at end of url plus cosmetics 2020-05-09 18:54:51 +01:00
UbitUmarov a367828a85 clean a few more things before giving a socket to websockets. (this would happen later anyway) 2020-05-09 00:16:01 +01:00
UbitUmarov ea11f1aeb8 SampleMoneyModule: remove last '/' on currency-base-uri 2020-05-08 17:30:46 +01:00
UbitUmarov bcb9ab29d7 SampleMoneyModule: suport viewers new opensimextra currency-base-uri sim feature override for helperURI (that we call economy on some ini files, just because) 2020-05-08 17:00:43 +01:00
UbitUmarov fa5b4dc5d8 add AddOpenSimExtraFeature to simulator features, so it is done under proper locking. Fix gridservice extra features merge (they override older). This does need a future cleanup 2020-05-08 16:54:18 +01:00
UbitUmarov 72c1c923f8 SampleMoneyModule: add private xmlrpc methods 2020-05-08 14:50:46 +01:00
UbitUmarov c2c00c5d84 add httpserver HandleXmlRpcRequests with local set of xlmrpc methods 2020-05-08 14:37:08 +01:00
UbitUmarov f38c5d7ac2 SampleMoneyModule: add the needed php fake uris, since we no longer folish look for xmlrpc on everything not decoded, return back the reqeusted amount or viewers get confused. 2020-05-08 05:35:47 +01:00
UbitUmarov bf218f2cef make httpserver HandleXmlRpcRequests public 2020-05-08 05:26:25 +01:00
UbitUmarov f70f0b5ffd cosmetics 2020-05-07 14:26:07 +01:00
UbitUmarov f0fc1f628f another missing file 2020-05-07 02:33:54 +01:00
UbitUmarov 1908c095d3 missing file 2020-05-07 02:31:05 +01:00
UbitUmarov 58a4f45712 change eventqueue queues type, move event methods to other file (using partial class) 2020-05-07 02:26:25 +01:00
UbitUmarov 6c49f16132 minor changes 2020-05-07 02:15:25 +01:00
UbitUmarov ac7187eada avoid a null ref, plus some cleanup 2020-05-07 02:02:50 +01:00
UbitUmarov d5baeb4690 add SslMode=None to some connection strings 2020-05-07 00:37:25 +01:00
UbitUmarov 1e8e59e635 also override Output(string format) on remoteConsole 2020-05-02 18:31:02 +01:00
UbitUmarov 41d7d2f2f4 do dispose requests in context queue 2020-05-02 17:32:14 +01:00
UbitUmarov 0b0b5111df simplify PollServiceRequestManager, now that low level does serielaze requests 2020-05-02 15:25:05 +01:00
UbitUmarov 6d030e2f2b try to shutup some errors dunring shutdown, due to .net mess 2020-05-02 14:25:57 +01:00
UbitUmarov 1ad3a256f2 do http requests serialization at lower level 2020-05-02 14:23:52 +01:00
UbitUmarov ab14241871 mantis 8678: try fix rest console client 2020-05-01 17:49:11 +01:00
UbitUmarov 929fa3efbd dispose of jobengine queue 2020-05-01 15:42:02 +01:00
UbitUmarov 5fa81a6ca9 give viewers more time to start uploading assets 2020-04-30 17:02:37 +01:00
UbitUmarov 22c28a0260 make Caps IDisposable 2020-04-30 03:37:28 +01:00
UbitUmarov 36d005e1cc update circuit child status when it changes 2020-04-30 02:32:41 +01:00
UbitUmarov 003b109561 move DynamicMenuModule to simpleh.., 2020-04-30 01:59:36 +01:00
UbitUmarov b023914cc0 move RegionConsoleModule to simpleh.., and try to fix it 2020-04-30 01:31:34 +01:00
UbitUmarov 715c7a4825 fix localconsole so viewer one can display things 2020-04-30 00:47:53 +01:00
UbitUmarov 52f50d2035 move UploadObjectAsset to simpleh.. 2020-04-29 23:17:36 +01:00
UbitUmarov 88a81a9ca4 move ObjectAdd to simpleh.. 2020-04-29 22:55:02 +01:00
UbitUmarov c289b83250 remove dead code 2020-04-29 16:57:58 +01:00
UbitUmarov 5da135a90b a few changes to updateitemasset things 2020-04-29 16:52:54 +01:00
UbitUmarov ae15b75f79 change UploadBakedTextureModule. Make it shared and self contained 2020-04-29 16:29:20 +01:00
UbitUmarov b0e1347cd0 silly typo... 2020-04-29 13:44:44 +01:00
UbitUmarov 693adf9ecf hide handler types not in use from show http-handlers 2020-04-29 13:41:57 +01:00
UbitUmarov 6c349e6534 let show caps list display the avatar name 2020-04-29 13:32:02 +01:00
UbitUmarov d42c7e5e32 change CopyInventoryFromNotecard to simpleh.. 2020-04-29 13:18:50 +01:00
UbitUmarov b069b668e4 make some use of those 2020-04-29 12:34:48 +01:00
UbitUmarov c39ffa4dd1 add some utf8 getbytes help functions 2020-04-29 12:24:45 +01:00
UbitUmarov 7b5934ea26 add timeouts and placehold for future code 2020-04-29 10:39:36 +01:00
UbitUmarov 3a21d4de1e split the Upload* caps per asset type. We will need that one day. move uploadtaskscript to simpleh 2020-04-29 09:58:17 +01:00
UbitUmarov 7a8a7c7168 missing file 2020-04-28 21:38:03 +01:00
UbitUmarov bff6be4f66 give up on baked flag (test) 2020-04-28 21:34:54 +01:00
UbitUmarov f9e3c9adab clear baked flag on uploaded npc baked. This may cause issues on older grids (test) 2020-04-28 20:41:47 +01:00
UbitUmarov 3482259518 add SimpleBinaryHandler 2020-04-28 16:21:03 +01:00
UbitUmarov 1f7286fb95 do things in the right order 2020-04-28 15:53:50 +01:00
UbitUmarov 0b29bff512 restore lost things in the process 2020-04-28 15:47:13 +01:00
UbitUmarov 1abc6149bb split file bunchofcaps a bit 2020-04-28 15:43:07 +01:00
UbitUmarov d8b182afff change the http handler of those update* caps to simplehandler 2020-04-28 14:29:37 +01:00
UbitUmarov b6a02269f7 change update of agent or object inventory items assets. This may need better check 2020-04-28 13:48:49 +01:00
UbitUmarov dee822208a make FetchInventory2 a shared module 2020-04-28 01:39:10 +01:00
UbitUmarov 7e2ed9ee2b change FetchInventory2 region handler 2020-04-28 01:15:18 +01:00
UbitUmarov bfcbdc8a93 change voice modules handlers 2020-04-27 21:42:35 +01:00
UbitUmarov 5929e43c2c change MoapModule 2020-04-27 20:02:10 +01:00
UbitUmarov 27ea249194 change meshUploadFlagModule 2020-04-27 20:00:03 +01:00
UbitUmarov b4fc5c33ec rename wrong RegionSimpleStatsHandler as RegionStatsSimpleHandler 2020-04-27 18:06:27 +01:00
UbitUmarov 04b28f206a mantis 8688: put RegionStatsHandler : BaseStreamHandler tempory back, to give time for external modules to update 2020-04-27 18:00:37 +01:00
UbitUmarov 6d66770228 change the RemoteParcelRequest cap 2020-04-27 17:46:33 +01:00
UbitUmarov b5067baa4a it is nice to actually send the options back 2020-04-27 17:40:55 +01:00
UbitUmarov 89dee19060 move httpMethod OPTIONS handling to top, this needs to be chacked 2020-04-27 17:25:55 +01:00
UbitUmarov fa844d7e6e add soem try/catch (and yes..yes right on last commit should hed been write... 2020-04-27 16:40:54 +01:00
UbitUmarov 0518b397a3 add SimpleOSDMapHandler, for caps that have just one httpmethod and body should be decoded as OSDMap, so we don't right the same things all pver 2020-04-27 15:46:31 +01:00
UbitUmarov a3cd0cbfcb no need for stream hanlder description 2020-04-27 14:52:43 +01:00
UbitUmarov 9d08f8307e recover LLSD login handler 2020-04-27 14:35:19 +01:00
UbitUmarov 6ffb5bcf23 move RegionStatsHandler 2020-04-27 00:54:32 +01:00
UbitUmarov 8526f938f7 move /friends handler 2020-04-27 00:23:59 +01:00
UbitUmarov 8900d1139e xmlrpc and josonrpc only allowed on uri root, and only those there 2020-04-26 23:05:27 +01:00
UbitUmarov 6050eff683 improve show http-handlers 2020-04-26 21:51:15 +01:00
UbitUmarov b68748507d move /estate handler 2020-04-26 20:05:10 +01:00
UbitUmarov c07f4f3c41 change NeighbourHandlers whatever they are... 2020-04-26 19:13:35 +01:00
UbitUmarov 05f098be56 change region objecthandlers 2020-04-26 18:11:34 +01:00
UbitUmarov 473dba93e8 update show http-handlers 2020-04-26 17:03:16 +01:00
UbitUmarov e0418da6e1 change region avatarhandlers 2020-04-26 16:54:58 +01:00
UbitUmarov e63231887b move map to that 2020-04-25 23:25:29 +01:00
UbitUmarov dcc2f764f2 add a /index.php fake handler, for map. only does ?method=.. but can be extended) 2020-04-25 23:24:00 +01:00
UbitUmarov 70d2878d0a simplify default 404 message, removing wrong(missing) host info 2020-04-25 21:13:54 +01:00
UbitUmarov cafe49d44b change ParcelPropertiesUpdate 2020-04-25 20:49:13 +01:00
UbitUmarov d44baf20cd fix map image encoder parameter 2020-04-25 20:25:38 +01:00
UbitUmarov 2d1900165b change GodsModule 2020-04-25 19:44:25 +01:00
UbitUmarov 0348c01ce7 change SimulatorFeaturesModule 2020-04-25 19:19:19 +01:00
UbitUmarov 830b034b81 change EstateAccess 2020-04-25 18:54:01 +01:00
UbitUmarov 8fb4b2f4e3 change AvatarPickerSearchModule 2020-04-25 18:03:50 +01:00
UbitUmarov 5bde41b30f remove obsole code 2020-04-25 17:00:07 +01:00
UbitUmarov 605a01fe6e move monitor stats handlers to simpleStreamHandler 2020-04-25 15:54:44 +01:00
UbitUmarov 99658309ce missing file 2020-04-25 15:32:21 +01:00
UbitUmarov ee77a6d80b move some region base handlers to simpleStreamHandler 2020-04-25 15:31:30 +01:00
UbitUmarov 80de74e127 cancel keepalive if http status not OK, this maybe a bit 2 hardm but ok for now 2020-04-25 14:27:44 +01:00
UbitUmarov 7f2cfe734b null uri path is already checked at low level 2020-04-25 14:10:59 +01:00
UbitUmarov eae9928961 null method is already checked at low level, remove optional status 500 message 2020-04-25 13:45:45 +01:00
UbitUmarov 288dffcda1 change cap CreateInventoryCategory 2020-04-25 12:55:02 +01:00
UbitUmarov e48d2f2c1f move worlmap handlers to simpleStreamHandler 2020-04-24 21:40:14 +01:00
UbitUmarov 23961abf8a move EstateChangeInfo cap to simpleStreamHandler 2020-04-24 20:01:03 +01:00
UbitUmarov bac6890391 we can speedup some not simple StreamHandler a bit 2020-04-24 18:14:41 +01:00
UbitUmarov 07caee4956 move a materials cap to simpleStreamHandler 2020-04-24 17:50:13 +01:00
UbitUmarov 84cd4b4808 move a few more caps to simpleStreamHandler 2020-04-24 16:09:23 +01:00
UbitUmarov 3d09ff57f0 move a few more caps to simpleStreamHandler 2020-04-24 13:56:16 +01:00
UbitUmarov 7856192da6 move SEED cap to simpleStreamHandler 2020-04-24 02:37:50 +01:00
UbitUmarov ba8d188a0d remove another wrong ':' 2020-04-24 01:07:58 +01:00
UbitUmarov 76019258e3 remove wrong ':' 2020-04-24 01:06:52 +01:00
UbitUmarov 899620bc13 remove some '/' just wasting space 2020-04-24 00:54:21 +01:00
UbitUmarov f955482dfd move ServerReleaseNotes module to simpleStreamHandler 2020-04-24 00:40:52 +01:00
UbitUmarov 8d2f90a8e2 let show http-handlers list simpleStreamHandlers 2020-04-24 00:24:02 +01:00
UbitUmarov 9000240238 change GetCapsDetails(..) 2020-04-23 23:58:06 +01:00
UbitUmarov ca5756a100 fix agentpreferences cap path 2020-04-23 23:54:57 +01:00
UbitUmarov f2a025bc41 Oppps better clear the online before returning 2020-04-23 23:36:34 +01:00
UbitUmarov 6cd822fd83 clear online status from gridUserService when killing dup presences 2020-04-23 23:32:33 +01:00
UbitUmarov 7a24d8af52 change AgentPreferencesModule to use SimpleStreamHandler, as a simple first test 2020-04-23 22:35:31 +01:00
UbitUmarov 9a5a811c7d extend Caps to use SimpleStreamHandler 2020-04-23 22:32:18 +01:00
UbitUmarov 426d83c535 change SimpleStreamHandler to have a processor method argument 2020-04-23 22:30:40 +01:00
UbitUmarov 46162e620a change response content lengh when using rawbuffer 2020-04-23 22:28:27 +01:00
UbitUmarov 10988fe980 exclude root path from SimpleStremHandler 2020-04-23 18:29:45 +01:00
UbitUmarov 0fe51f34c2 add SimpleStrem(Request)Handler, for simple uripaths, any method or query 2020-04-23 18:23:43 +01:00
UbitUmarov e818c570bb expose uripath 2020-04-23 18:16:56 +01:00
UbitUmarov 5a51553e7d missing file 2020-04-23 16:08:16 +01:00
UbitUmarov fefcda52f5 use concurrentdic on pollhandlers, simplify a bit 2020-04-23 16:04:54 +01:00
UbitUmarov 92518129ee remove redundant code 2020-04-23 13:24:08 +01:00
UbitUmarov 212c25f906 fix http version 2020-04-22 00:00:24 +01:00
UbitUmarov 6b6baa9e51 reduce ServicePointManager.DefaultConnectionLimit back 12 for os other than windows 2020-04-21 23:05:53 +01:00
UbitUmarov 1475b83699 risk reduncing iddle timeout again, because it is needed on current framework 2020-04-21 15:46:41 +01:00
UbitUmarov 50b81258a9 change event pool timeout handling 2020-04-21 00:19:19 +01:00
UbitUmarov 43fdbf87d4 remove some useless code form http low level; delay normal connection close, to let client do it instead 2020-04-21 00:13:02 +01:00
UbitUmarov c097f148dd locate default anims also by uuid, rename/chage a few things 2020-04-18 17:26:25 +01:00
UbitUmarov e2f84f0c1f send 100 continue code the way ms seems to want 2020-04-16 02:13:03 +01:00
UbitUmarov 4ab8da01bc flush sslstreams in keepalive case ( should not be needed but well ) 2020-04-16 01:51:57 +01:00
UbitUmarov bdddedc550 let samplemoneymodule see EconomyModule config setting 2020-04-16 01:40:39 +01:00
UbitUmarov e859985cfa actually commit the uri fix 2020-04-15 21:23:13 +01:00
UbitUmarov 7572a60993 avoid a null ref on get log level 2020-04-15 11:48:52 +01:00
UbitUmarov a6abc3d2b6 mantis 8688: fix uri parsing in secure case ; add tls11 and tls12 to list of protocols (.net.46 ones) 2020-04-15 11:48:03 +01:00
UbitUmarov 944f3dd7ec sleep a script by 1second on non fatal OSSL errors 2020-04-14 17:01:35 +01:00
UbitUmarov f20845c89e sleep a script by 1second on non fatal LSL errors 2020-04-14 16:56:53 +01:00
UbitUmarov 8baab939d2 oops fix query handling on getassets 2020-04-13 15:37:12 +01:00
UbitUmarov 920a26eeec add request QueryFlags 2020-04-13 15:01:04 +01:00
UbitUmarov b419f71a68 also expose the request client IP as seen by server port 2020-04-13 14:34:03 +01:00
UbitUmarov e0ba96055c change osrequest Query back to hashtable, add QueryAsDictionary as new better option. (recover compatibily with current external modules 2020-04-13 14:24:22 +01:00
UbitUmarov 745a469af8 fix recent bug on Urlmodule 2020-04-13 13:53:37 +01:00
UbitUmarov d1f1324a2d update scriptSyntax 2020-04-12 23:19:34 +01:00
UbitUmarov bbc5d5bc2d ate least one viewer for androide does not decode correctly llsd, go back send more useless data, to suport them. this should be reverted one day 2020-04-12 18:10:20 +01:00
UbitUmarov f95925e0fd http server change remote endpoint handling 2020-04-11 19:57:34 +01:00
UbitUmarov 7ce9f890b1 http server useless changes 2020-04-11 16:41:39 +01:00
UbitUmarov 0d940df4e2 http server: change uri query handling 2020-04-11 15:18:49 +01:00
UbitUmarov 1c6d454691 remove excess garbage 2020-04-10 22:52:25 +01:00
UbitUmarov 6fea9dafaf yeack increase TimeoutMaxIdle again for now 2020-04-09 18:43:55 +01:00
UbitUmarov 50cd0ab982 missing file 2020-04-09 16:19:37 +01:00
UbitUmarov 0a1e1ae9e0 http asset send: prioritize baked textures 2020-04-09 16:18:27 +01:00
UbitUmarov 7ecc9408a9 flag baked texture assets 2020-04-09 16:08:44 +01:00
UbitUmarov 05c77f9342 cosmetics 2020-04-09 14:01:15 +01:00
UbitUmarov c99014991b cosmetics 2020-04-09 13:41:41 +01:00
UbitUmarov 523d6dd2da stop a vivox error 2020-04-08 16:38:07 +01:00
UbitUmarov f976d10de2 more changes on http server low level 2020-04-08 14:35:31 +01:00
UbitUmarov f0f067d05c missing file 2020-04-08 00:09:23 +01:00
UbitUmarov b4eb5d6cca send parcels onwership change updates to all avatars that may want it 2020-04-08 00:01:05 +01:00
UbitUmarov 29f59fe407 reduce httppipeline depth 2020-04-06 16:53:28 +01:00
UbitUmarov 3989dbac31 fix rez time on inworld object copy 2020-04-06 12:02:36 +01:00
UbitUmarov 0a4232430b remove some dead code 2020-04-03 03:54:32 +01:00
UbitUmarov 50b8c90b42 change response m_body send (currently not in use) 2020-04-03 03:20:47 +01:00
UbitUmarov f1761a5b6c remove a log message under cond comp 2020-04-02 23:05:22 +01:00
UbitUmarov 4af5dfa0d0 update a license file 2020-04-02 22:33:25 +01:00
UbitUmarov 1e083c38ad nissing files 2020-04-02 21:54:18 +01:00
UbitUmarov fe9df55410 nissing files 2020-04-02 21:52:31 +01:00
UbitUmarov 67cd5efab3 replace external httpserver by embedded one (based on same code) - This may still be very bad; clean solution and runprebuild, or clone to clan folder 2020-04-02 21:44:34 +01:00
UbitUmarov 650b051cdf httpserver send now has priority, use it 2020-03-31 22:03:43 +01:00
UbitUmarov 817c2b3bb9 httpserver send is now async 2020-03-31 22:01:45 +01:00
UbitUmarov e558dd3ac6 update httpserver.dll this needs testing. May not be that nice... 2020-03-31 21:43:40 +01:00
UbitUmarov ef49ac7049 do hide hidden groups on profile 2020-03-30 18:18:36 +01:00
UbitUmarov 2e66f8dbdf store sop pseudocrc and region cacheID on sqlite 2020-03-28 16:18:31 +00:00
UbitUmarov 0958eceadd store sop pseudocrc and region cacheID on PGSQL ( others later) 2020-03-28 01:31:00 +00:00
UbitUmarov 87646f340b store sop pseudocrc and region cacheID on mysql ( others later) 2020-03-27 17:34:05 +00:00
UbitUmarov 1002987aea invalidate region cacheid on oar load 2020-03-27 17:27:54 +00:00
UbitUmarov 918f56d682 fix lludp to read pseudocrc from SOP; move region cacheID to region settings 2020-03-27 17:26:49 +00:00
UbitUmarov 8e6fc69a11 let pseudoCRC (for objcache) be per part and not just per SOG 2020-03-27 17:22:18 +00:00
UbitUmarov 0a4a3199f5 update libomv again (arm issues) 2020-03-20 21:09:00 +00:00
UbitUmarov f1204e2147 contrary to some docs, PROCESSOR_ARCHITECTURE is not defined on linux 2020-03-20 16:18:36 +00:00
UbitUmarov 9ce4b8914b LevelUpload setting is now on [Permissions], so look for it there also 2020-03-20 10:54:10 +00:00
UbitUmarov 010f091dd4 mantis 8675: delay material delete (the reported log message may still happen, but less 2020-03-20 10:50:56 +00:00
UbitUmarov 9864d1abfc tell detected endian also 2020-03-18 19:09:59 +00:00
UbitUmarov f2c0957f5a update libomv 2020-03-18 18:46:54 +00:00
UbitUmarov ac43124a93 duhhh 2020-03-18 17:59:35 +00:00
UbitUmarov 59d3f9fa62 log processor arch 2020-03-18 17:41:29 +00:00
UbitUmarov 5401e323dc update libomv 2020-03-18 14:42:14 +00:00
UbitUmarov cfef190424 mantis 8674: give up asking viewers to use htts on vivox. Several just fail 2020-03-15 22:13:31 +00:00
UbitUmarov 63c5da539f minor change to legacy mesh stream cost estimation, so small lowest lod does not give excessive contribution 2020-03-15 17:47:27 +00:00
UbitUmarov 5f76a62d29 cosmetics 2020-03-13 21:27:57 +00:00
UbitUmarov b292950b1c fix a lock i missed.. 2020-03-11 16:04:02 +00:00
UbitUmarov beee52032e current vivox server certs are invalid 2020-03-10 13:42:09 +00:00
UbitUmarov c172adbaec minor patching to outdated vivox suport. This can't be updated without proper API spec, that vivox is refusing to provide to me 2020-03-10 03:52:38 +00:00
UbitUmarov e4f7a1c07a a few missing files 2020-03-07 21:13:42 +00:00
UbitUmarov 033f6f889d a few changes to flotsam asset cache 2020-03-07 20:34:56 +00:00
UbitUmarov 2e9417bd01 mantis 8670: replace bom fallback textures with ones havign alpha channel, now done with older j2k compressor 2020-03-07 20:30:24 +00:00
UbitUmarov cf5630f2f7 mantis 8670: replace bom fallback textures with ones havign alpha channel 2020-03-07 15:43:29 +00:00
UbitUmarov 3956fbe496 missed only line on last commit 2020-03-06 19:31:07 +00:00
UbitUmarov 98de42eedc flotsam: add comands deletedefaultassets to delete local default assets (on folder bin/assets) from cache so they can be refreshed from grid and cachedefaultassets to load those local assets into cache. This comands may cause desync with grid or other regions. Viewers will need to clear cache so see effects. Use with care 2020-03-06 19:20:12 +00:00
UbitUmarov 38b93a0f50 define Mr Opensim data on Constants 2020-03-06 16:00:40 +00:00
UbitUmarov abe26f39f6 yeackk silly bug on new avaterpickeravaterpicker 2020-03-05 00:00:08 +00:00
UbitUmarov 1df06f459a avoid duplicated udpbuffer free that may still happen 2020-03-04 22:39:44 +00:00
UbitUmarov 8728e4cf2f missing file 2020-03-04 20:04:08 +00:00
UbitUmarov ad601c9502 take lludp out of usermanagement module 2020-03-04 20:02:45 +00:00
UbitUmarov 20b974cff0 place the try/catch in right place on profiles process. This is still bad. Last code changes moved from blocking a user for a long time, to block profiles for all, for a long time. This because some viewers like firestorm, ask for the profiles of all user friends to show their ugly 1st life pictures. thats hundred requests taking from 500ms to more than 30s each 2020-03-04 17:19:12 +00:00
UbitUmarov ed34c00956 add catch log to profiles process 2020-03-04 04:50:54 +00:00
UbitUmarov d0ba9f84df add some async work to profiles module, take profile out of groups v2, not its job 2020-03-04 02:45:10 +00:00
UbitUmarov 248d56d3ad add LSL_Integer osClearObjectAnimations() to remove all animations on a prim, returning the number it had; some clean on sending 2020-03-03 23:21:05 +00:00
UbitUmarov 6684c35bb0 fix object animation updates when also moving 2020-03-03 22:25:24 +00:00
UbitUmarov 25b4a310f5 mantis 8668: invalidate part VOC on lsl scale change 2020-03-03 11:37:23 +00:00
UbitUmarov c30cb8a9cf change root part physics type none to apply physics 2020-03-02 04:05:18 +00:00
UbitUmarov be16cf9531 sync some more things with work copy 2020-03-02 01:56:34 +00:00
UbitUmarov 97cb6254ef cosmetics, rename a few vars, etc 2020-03-02 01:32:33 +00:00
UbitUmarov 904553cdb3 update libomv 2020-03-02 01:04:15 +00:00
UbitUmarov d3b1465444 mantis 8667: remove wildcards from a very limited test of a very limited thing 2020-03-02 00:07:02 +00:00
UbitUmarov cf948d56a1 pesty warning 2020-03-01 22:03:33 +00:00
UbitUmarov 7e9ce0929d missing file 2020-03-01 21:46:31 +00:00
UbitUmarov 693492a3f1 several changes to lludp FetchInventoryDescendents 2020-03-01 21:45:28 +00:00
UbitUmarov dc225e348d several changes to lludp FetchInventory 2020-03-01 18:56:07 +00:00
UbitUmarov 71b5ca95e6 change Async object delete to inventory threading model 2020-03-01 16:16:09 +00:00
UbitUmarov e76006aff5 avoid a null ref at shutdown 2020-03-01 03:22:58 +00:00
UbitUmarov 49386d34e5 pesty warning 2020-03-01 03:05:14 +00:00
UbitUmarov af7d09c6b5 more cosmetics (and possible more typos) 2020-03-01 02:27:48 +00:00
UbitUmarov 4d67fdfa9d cosmetics (and possible lots of typos) 2020-03-01 01:19:09 +00:00
UbitUmarov 3707301c59 changes to load oar with --merge: with option --mergeReplaceObjects it will replace objects already in region, without it, skip; with opetion merge-parcels will try to merge them, without it ignores oar parcels. as before without --merge all is replaced. renamed the options force* as merge* since they are merge suboptions 2020-02-28 18:36:52 +00:00
UbitUmarov 665037e366 cosmetics 2020-02-28 00:53:51 +00:00
UbitUmarov 22e201bb49 add harder restrictions to llGiveInventoryList. permissions per item as giveinventory, target avatar must see the prim region. Add 3seconds delay 2020-02-27 23:10:16 +00:00
UbitUmarov 7ef657c415 LSL add a translation layer btw lsl permitions and internal permissions 2020-02-27 21:37:23 +00:00
UbitUmarov d1df9c9ee5 some lsl cleanup 2020-02-27 21:07:35 +00:00
UbitUmarov 8c74e47557 a few changes to objects permissions 2020-02-26 20:33:29 +00:00
UbitUmarov c2ca5a699d missing file.. 2020-02-26 19:33:55 +00:00
UbitUmarov ad5aff2d17 more on scripts *target* events 2020-02-26 19:18:07 +00:00
UbitUmarov 94f88e330b one more case 2020-02-26 18:24:40 +00:00
UbitUmarov ea8eeaa307 do no append zero when clipping strings ( may still happen on other places) 2020-02-26 16:58:41 +00:00
UbitUmarov 7d7fc8f06a Yengine script, don't dispose twice 2020-02-26 05:17:46 +00:00
UbitUmarov 20d77d3905 mantis 8665: avoid crash at shutdown, that line should not be needed 2020-02-26 05:09:04 +00:00
UbitUmarov 771381558e index targets by scriptID 2020-02-26 04:50:55 +00:00
UbitUmarov 6dd5ea0c96 it is a good idea to actually change the respective source file... 2020-02-26 03:28:23 +00:00
UbitUmarov 828a3bb7f8 yeack, scripts can set targets, not having the events 2020-02-26 03:26:44 +00:00
UbitUmarov ca48bf4117 those events are per script not per part 2020-02-26 03:18:22 +00:00
UbitUmarov c9137912c9 missing file 2020-02-25 23:08:17 +00:00
UbitUmarov ceb9289f13 change (not)at_(rot)target checks 2020-02-25 23:02:38 +00:00
UbitUmarov d47ce25b5b change lsl say/whisper/shout text lenght limit 2020-02-24 05:57:54 +00:00
UbitUmarov 6cadcb8bdf try save a few ns on chat to objects 2020-02-24 05:37:42 +00:00
UbitUmarov df2536c407 try save a few ns on chat to avatars 2020-02-24 05:36:05 +00:00
UbitUmarov 1de010e969 change pending messages for scripts listeners queue type 2020-02-24 03:06:35 +00:00
UbitUmarov 72d38b267e small text format change 2020-02-24 03:01:46 +00:00
UbitUmarov 5f232077a7 give a tiny more time for deattach event to trigger 2020-02-24 03:00:09 +00:00
UbitUmarov 270a3e3836 do release controls on some objects delete 2020-02-21 19:19:19 +00:00
UbitUmarov c887446b7e sog DelinkFromGroup: change order of some operations 2020-02-21 19:15:08 +00:00
UbitUmarov 60a924f3c6 change part inventory adding some scripts speed up and controls release 2020-02-21 19:11:29 +00:00
UbitUmarov 0e6a7c3dac cosmetics 2020-02-20 21:50:07 +00:00
UbitUmarov 6c94f5d432 fix HandleRevokePermissions() 2020-02-20 08:29:09 +00:00
UbitUmarov 7c977f9e27 fix release controls on deattach 2020-02-20 08:27:42 +00:00
UbitUmarov d7671f3c01 a few changes to script engines releasecontrols 2020-02-20 08:20:15 +00:00
UbitUmarov 8d8b5b756f mantis 8663: add CertificateValidationCallback set. Thanks Manni 2020-02-18 20:23:14 +00:00
UbitUmarov 6d2bb27ef7 fix a test 2020-02-17 22:05:27 +00:00
UbitUmarov c8a95e21ee mysql region store: do not use double to store float 2020-02-17 21:11:21 +00:00
UbitUmarov b9cf2244a4 stop some log spam on shutdown that happens on linux 2020-02-17 17:54:56 +00:00
UbitUmarov c11249f1ca yeack ... // is not a ini file comment 2020-02-17 14:53:39 +00:00
UbitUmarov 23aae75563 add osslDefaultEnable.ini and osslEnable.ini.example. Similar use as opensimDefaults and opensim. Second files do local overrides to defautl settings. This should easy upgrades to versions that are compatible (most cases). (Dan Banner idea and request) 2020-02-17 00:53:30 +00:00
UbitUmarov e155ab7814 patch a test 2020-02-14 20:17:52 +00:00
UbitUmarov 59414467e2 several changes to (task)inventory offering 2020-02-14 19:47:57 +00:00
UbitUmarov 55333a5171 fix axis rotation on sog bounding box 2020-02-14 19:34:32 +00:00
UbitUmarov a42085f1a9 fix llGiveInventoryList notification on a group owned prim also 2020-02-13 05:20:00 +00:00
UbitUmarov 20a08c9f41 make a message more readable 2020-02-13 04:59:17 +00:00
UbitUmarov fa4602e048 improve TaskInventoryAccepted (that is also decline) 2020-02-13 04:58:20 +00:00
UbitUmarov 0e7c19e181 fix llGiveInventory notification on a group owned prim 2020-02-13 04:41:50 +00:00
UbitUmarov 75e5217fff fix a group owned permission 2020-02-13 02:58:32 +00:00
UbitUmarov e1d5892f78 notecards text len is in bytes not chars 2020-02-13 00:38:02 +00:00
UbitUmarov f3238781cc oops 2020-02-10 02:19:35 +00:00
UbitUmarov fb2380efd6 fix handling of materials maps clear and total removal with SLSL 2020-02-09 19:14:17 +00:00
UbitUmarov 11c49c211c change a log message 2020-02-08 19:03:24 +00:00
UbitUmarov c239269762 change uuids on scripts gather 2020-02-08 18:45:38 +00:00
UbitUmarov ce72aa2eac ignore some assets on gather 2020-02-08 17:45:51 +00:00
UbitUmarov b97237b513 missed another file 2020-02-08 16:31:23 +00:00
UbitUmarov 8cbe743440 missing file and remove dead code 2020-02-08 16:27:30 +00:00
UbitUmarov 68e7e65e2e scritps can not read notecards with embedded items 2020-02-08 16:09:12 +00:00
UbitUmarov 9478e607db fix a typo on useraccount store 2020-02-08 13:05:23 +00:00
UbitUmarov 22227fa0b8 reduce some more spam on log 2020-02-08 01:10:30 +00:00
UbitUmarov c2ab11a51e reduce some spam on log 2020-02-08 00:29:41 +00:00
UbitUmarov 169f161576 cosmetics 2020-02-07 22:44:14 +00:00
UbitUmarov 43fea6530f yeack, better not break other notecards HG; improve TestNotecardAsset() 2020-02-07 22:39:36 +00:00
UbitUmarov c245ce3c25 change string terminator check 2020-02-06 22:54:17 +00:00
UbitUmarov b2ef1545e5 oops, some fixes 2020-02-06 22:39:04 +00:00
UbitUmarov 88d91b68f7 TestNotecardAsset() does not even create a valid notecard. Disable it for now 2020-02-06 19:29:00 +00:00
UbitUmarov 8060d132b9 mantis 8651: try to improve notecards HG sharing ( not tested) 2020-02-06 19:16:23 +00:00
UbitUmarov 7a79a6ddfe mantis 8651: clean code a bit 2020-02-06 16:13:32 +00:00
UbitUmarov 4de3dc2860 mantis 8651: change embedded decode a bit 2020-02-06 15:27:53 +00:00
UbitUmarov 18f2e25b23 mantis 8651: try to fix items embedded in notecards. This may need more work 2020-02-06 06:12:51 +00:00
UbitUmarov 3196d2fa6f mantis 8547: allow volume detectors to tell detector prim link number. Note that this is not as spec, also that the name llDetectedLinkNumber should actually be llDetectorLinkNumber since it refers to the detector not detected object 2020-02-03 13:25:00 +00:00
UbitUmarov 662c41ddee clear sell data when selling a object copy 2020-02-02 20:16:33 +00:00
UbitUmarov a22acd1c5c remove a few more references to simianGrid 2020-02-02 17:31:43 +00:00
UbitUmarov 9a5844fdb9 remove folder addin-db-002 on runprebuild 2020-02-02 17:01:27 +00:00
UbitUmarov 441b4e01f6 remove also caps with method DELETE; NOTE: to update existent regions with last commit you need to clean the solution, run prebuild, and delete folder bin/addin-db-002 2020-02-02 16:37:45 +00:00
UbitUmarov 941b65b44a removed outdated suport for simianGrid. Simian was a web/php alternative to Robust (https://code.google.com/archive/p/openmetaverse) 2020-02-02 16:18:08 +00:00
UbitUmarov fdecf80016 mantis 8654: exclude NPCs from some Friends ops 2020-02-01 15:26:58 +00:00
UbitUmarov 016886b3c6 changes on sqlite estatedata 2020-01-31 13:09:37 +00:00
UbitUmarov f89afd2aa8 fix some sqlite regionstore tables 2020-01-31 00:08:51 +00:00
UbitUmarov fb1911d409 revert 8cc02916ab. allow physics sit on
phanton to fall back to ugly sit because some objects depend on it
2020-01-29 21:23:30 +00:00
UbitUmarov 8075c1e363 do store UserCountry 2020-01-28 19:49:45 +00:00
UbitUmarov 53c9473100 mantis 8653 fix npc movement updates 2020-01-28 15:45:47 +00:00
UbitUmarov 76987fb647 ... osSetLinkStandTarget 2020-01-25 15:51:36 +00:00
UbitUmarov 8df27ba2a1 forgot again sintaxe 2020-01-25 15:32:03 +00:00
UbitUmarov 868c05fdf6 why not also osGetLinkStandTarget 2020-01-25 15:29:59 +00:00
UbitUmarov 5bb96cf18e update sintaxe 2020-01-25 14:26:00 +00:00
UbitUmarov 004cab9289 add osGetLinkSitActiveRange 2020-01-25 14:24:53 +00:00
UbitUmarov 64c7e1de5b add osSetLinkSitActiveRange 2020-01-25 13:32:52 +00:00
UbitUmarov 598ba5d6ae fix the dbs migrations 2020-01-23 11:14:12 +00:00
UbitUmarov f61b83b1ea store the new variables on sqlite and pgsql ( could not test) 2020-01-23 10:47:09 +00:00
UbitUmarov 2a38210fe9 serialize the new variables 2020-01-22 22:01:05 +00:00
UbitUmarov 33eabf1069 store the new variables on mysql 2020-01-22 21:32:40 +00:00
UbitUmarov da0ba17d1a fix bug on sit active range check 2020-01-22 21:19:38 +00:00
UbitUmarov 59f41598db limit unscripted and not done by physics sits to 10m distance again 2020-01-22 18:37:32 +00:00
UbitUmarov 7adaede14a mantis 8634: add osSetSitActiveRange(float range) , osSetStandTarget(vector feetAproxPosition) and respective get functions. range <0 disables sits on the prim, = 0 uses region default,feetAproxPosition is in prim local frame. <0,0,0> disables it. Still no persistance. feedback required! 2020-01-22 18:23:35 +00:00
UbitUmarov 8db60ba3aa back to sits and stands 2020-01-22 00:15:23 +00:00
UbitUmarov 8cc02916ab don't let physics sit on phantom fall back to ugly default 2020-01-20 19:26:12 +00:00
UbitUmarov 3f601c9267 don't allow viewer to change rotation on sit 2020-01-20 19:01:15 +00:00
UbitUmarov 0bd102a397 tell viewers to autopilot on sit, but bypass it, so camera does get set 2020-01-20 18:25:59 +00:00
UbitUmarov 0e1e247289 ok ok reduce stand jump a bit 2020-01-20 16:12:59 +00:00
UbitUmarov b70d44eb7e try to cache cof is a waste of time 2020-01-20 16:11:20 +00:00
UbitUmarov 80fe0c640b do not use viewer autopilot on physics sits also. Viewer side autopilot needs more work to avoid desyncs, that we never had 2020-01-20 16:09:45 +00:00
UbitUmarov 54370169bc remove usage of lludp highpriority send queue. It causes more issues than good 2020-01-20 16:01:21 +00:00
UbitUmarov ad6499cc09 fix last log message, and change things a bit 2020-01-20 11:48:32 +00:00
UbitUmarov ddef089eaa catch more error exception cases on fetchinventory req parsing 2020-01-19 20:10:08 +00:00
UbitUmarov f85e932f59 oops i still did not updated libomv with new flag name 2020-01-19 16:44:27 +00:00
UbitUmarov ba174b777c send allowaccessoverride flag on regionhandshake 2020-01-19 16:30:02 +00:00
UbitUmarov 28db80f100 mantis 8647: try to not lose materials on fast objects take, but without changing a lot of files 2020-01-19 00:31:28 +00:00
UbitUmarov 8db2ddb07f mantis 8645: change sqlite to just flag row delete, for commit to work 2020-01-18 21:09:41 +00:00
UbitUmarov 550f64cb2d mantis 8645: change sqlite (not exactly as provided patch) 2020-01-18 18:01:38 +00:00
UbitUmarov 2b2b5d8bff update httpserver.dll 2020-01-18 14:53:47 +00:00
UbitUmarov 5ad62558b3 mantis 8643: invert the meaning of internal flag TEXFREE true value to mean NOT allow parcel owner to be more restrictive than estate. This should reduce the impact of this feature on new and current regions, specially since some viewers still do not suport it. (yes still lazy to rename the thing) 2020-01-17 09:35:42 +00:00
UbitUmarov 1899a36105 add another kick to GC after map generation at run time 2020-01-13 18:46:25 +00:00
UbitUmarov 62f3892cd7 add a real transparent texure for default transparency and avatar alphas transparency. Asset 3a367d1c-bef1-6d43-7595-e88c1e3aadb3 must be rempoved by hand from current regions cache (at bin/assetcache/3a3) and viewers cache clean 2020-01-12 21:29:25 +00:00
UbitUmarov 6f5b7957a9 fix attachment point changes detection 2020-01-12 10:45:10 +00:00
UbitUmarov f417a647db exclude NPCs on adults and anonymous parcel access check 2020-01-11 17:32:33 +00:00
UbitUmarov c2cef470f5 Estate age and payment (anonimous) access control override parcel settings. Enforce it at parcel level (a bit heavy for now, needs revison) 2020-01-11 16:26:56 +00:00
UbitUmarov b9e74dd504 change IgnoreEstatePaymentAccessControl and IgnoreEstateMinorAccessControl default to true, since this require flags to be set on dbs, and enforcing was not working well 2020-01-11 16:16:49 +00:00
UbitUmarov 29a6c1d0c8 fix IgnoreEstatePaymentAccessControl option 2020-01-11 14:57:43 +00:00
UbitUmarov ea7dd150b1 disable parcels access control if disabled at estate ( not that estate flag is still named TAXFREE 2020-01-11 14:11:46 +00:00
UbitUmarov d92ef598c5 EstateAccess get: do send empty arrays 2020-01-11 12:58:46 +00:00
UbitUmarov ac32188978 add a silly GatekeeperURIAlias example 2020-01-10 01:44:10 +00:00
UbitUmarov 5dbcb7a99e add config option GatekeeperURIAlias to list other FQDN or ips of same local grid 2020-01-10 01:38:41 +00:00
UbitUmarov 42afa8429e mantis 8639: recover object selected state in case of lludp object updates packet size overflow; 2020-01-08 10:25:59 +00:00
UbitUmarov c54460b6f0 update release notes url 2020-01-07 17:30:23 +00:00
UbitUmarov d9d763c8f8 change version 2020-01-07 15:18:49 +00:00
UbitUmarov 7bdc408cac change some lsl flag constants to Hexa 2020-01-07 14:51:07 +00:00
UbitUmarov 066a6fbaa1 changes on lludp acks and resends 2019-12-18 23:26:13 +00:00
UbitUmarov 7516288634 missing files 2019-12-16 16:12:04 +00:00
UbitUmarov 60473ff44e update libomv 2019-12-16 16:05:46 +00:00
UbitUmarov 8c21b30a51 do dispatch RequestLure ims 2019-12-16 01:27:49 +00:00
UbitUmarov d400b2c545 add a formal lock object 2019-12-10 12:36:29 +00:00
UbitUmarov 449bd9beab enforce invariant culture on landmarks 2019-12-10 12:33:56 +00:00
UbitUmarov 052e4a060c mantis 8632: stop trigering Changed on just scale checks 2019-12-03 14:27:31 +00:00
UbitUmarov 5c5e4bd830 a few changes on check targets for lsl 2019-11-27 16:44:45 +00:00
UbitUmarov b3db90db92 and yes mono-addins .... 2019-11-24 20:08:00 +00:00
UbitUmarov bd15005d77 and yes mono-addins again 2019-11-24 18:43:50 +00:00
UbitUmarov e8d1493777 mantis 8631: and another try... 2019-11-24 11:40:04 +00:00
UbitUmarov 17e4b52171 mantis 8631: the missing file 2019-11-24 11:09:25 +00:00
UbitUmarov 9aa0f21ffa mantis 8631: mono addins again (one file missing) 2019-11-24 11:07:55 +00:00
UbitUmarov 6e2b5ac238 fix identation 2019-11-23 01:21:36 +00:00
UbitUmarov 14270e316a fix xml decode of kfm in single prims case 2019-11-23 01:17:03 +00:00
UbitUmarov 2a508edcb4 YEngine: change some startup log messages 2019-11-22 07:42:00 +00:00
UbitUmarov 943d0935a6 YEngine, change default number of exec threads to 2 of priority Normal. Let the threads priority a option on ini files 2019-11-22 07:01:17 +00:00
UbitUmarov d5f918f945 Oooopss 2019-11-22 06:07:28 +00:00
UbitUmarov 9b7ad30ee1 more changes on YEngine scripts heap usage 2019-11-22 04:09:05 +00:00
UbitUmarov 647622bb02 cosmetics 2019-11-20 23:29:24 +00:00
UbitUmarov bd12d60e80 cosmetics 2019-11-20 23:16:20 +00:00
UbitUmarov 0cf3ec553a fix the block of teleport to same region handle 2019-11-18 20:17:48 +00:00
UbitUmarov 730a35eedc Yengine: more on constants operations reduction 2019-11-18 19:07:03 +00:00
UbitUmarov bf0697d5f4 mantis 8551: Simplify Yengine heap usage control 2019-11-18 17:33:02 +00:00
UbitUmarov 496a2228f5 update mono addins again 2019-11-18 04:13:46 +00:00
UbitUmarov b5d2a6088c revert to previus ICSharpCode.SharpZipLib.dll that was .net4.6 unlike new one 2019-11-18 03:49:57 +00:00
UbitUmarov 3708f504a6 fix a info message 2019-11-18 03:18:23 +00:00
Diva Canto 72362dd09c Mono addins uses this, and the version was now incompatible. 2019-11-17 15:19:15 -08:00
Crista Lopes 9fd2b239d9 Replaced mono addins dlls and mautil.exe with the patch 2019-11-17 14:33:00 -08:00
UbitUmarov 7dd5c9ccad update mono addins ( need to runprebuidl and recomp opensim) 2019-11-17 21:40:02 +00:00
UbitUmarov 103ebac082 terrain: make sure modify does get unblocked 2019-11-17 15:01:21 +00:00
UbitUmarov 61f918cbda remove some llUDP options 2019-11-16 22:19:46 +00:00
UbitUmarov cb97ab5c6f make attachments WearReplacesAll option visible 2019-11-14 22:34:39 +00:00
UbitUmarov 45625a02a2 update contributors 2019-11-14 06:49:13 +00:00
UbitUmarov 31aef4e82b work on previus 2 patchs 2019-11-14 06:34:44 +00:00
Terry 999a068172 Complete PostGres from previous commit - (Not Tested)
Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2019-11-14 05:28:57 +00:00
Terry 2f79f463ea Attempt to fix the issue where, when logging into the grid, the user supplies a region name, but instead of going to the specific region, they are sent to a region "Like" the one specified.
Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2019-11-14 05:26:54 +00:00
UbitUmarov eabf9a7c04 mantis 8627: handle the case constant compareOp constant on Yengine 2019-11-13 23:26:22 +00:00
UbitUmarov d9d78c3423 Terrain: more double to float 2019-11-13 19:53:15 +00:00
UbitUmarov 5d2ffdc35b limit max number of attachments to 38. All can be on same point 2019-11-13 18:44:58 +00:00
UbitUmarov 2828aa3e9b Reduce Max region size to 4096m 2019-11-13 18:00:45 +00:00
UbitUmarov 8fcecc93a6 missed a few 2019-11-12 18:24:56 +00:00
UbitUmarov d10f11d310 terrain replace double by float 2019-11-12 18:19:12 +00:00
UbitUmarov 9eb5fd4330 more changes on terrain edit. Silent ignore comand if busy (large area smooth can take ages), brush changes, etc 2019-11-12 03:16:53 +00:00
UbitUmarov 01832b3e3c missing file, of course 2019-11-11 12:54:42 +00:00
UbitUmarov e87dfd48bf Yengine: we also need to cancel timer events in queue, because some bad scripts that do work on X 2019-11-11 12:51:09 +00:00
UbitUmarov 38a77a8bb5 terraforming changes: try recover llmodifyland previus behaviur 2019-11-10 21:12:52 +00:00
UbitUmarov ee68085628 SIO_UDP_CONNRESET should work on macs now, thx Gavin 2019-11-10 19:14:12 +00:00
UbitUmarov 435c30c038 terraforming changes: comment a debug message 2019-11-10 04:37:41 +00:00
UbitUmarov b4d9f7ffe8 terraforming changes: support selected parcel edit; fix area smooth 2019-11-10 02:48:54 +00:00
UbitUmarov f6ea22647d terraforming changes: make jenkis happy 2019-11-10 00:47:40 +00:00
UbitUmarov 727216044b terraforming changes: missing file 2019-11-10 00:03:39 +00:00
UbitUmarov 53339d2970 terraforming changes: make sliders work, remove some brushs, etc. Feedback needed (run prebuild) 2019-11-09 23:59:19 +00:00
UbitUmarov 4b5a3308ad cosmetics 2019-11-08 17:43:22 +00:00
UbitUmarov ca4bb8c492 let autopilot also stand from a object 2019-11-07 03:53:05 +00:00
UbitUmarov bd9f6ae3f0 avoid a null ref 2019-11-07 03:01:07 +00:00
UbitUmarov 8ed0680bb9 handle null refs on llSubStringIndex() 2019-11-06 23:40:53 +00:00
UbitUmarov 926e4ea95e mantis 8624: replace native code libs for Mac by ones signed by Geir Nøklebye (Gavin Hird). Ths again Gavin 2019-11-05 15:39:44 +00:00
UbitUmarov 11a357d7fa YEngine: fix credits comment 2019-11-05 15:08:58 +00:00
UbitUmarov 040c8d5e9a dynamic textures: add ' lossless: [true|false] ', default false, extraParam 2019-11-04 20:17:12 +00:00
UbitUmarov 21f86c453d YEngine: fix wrong language detection on some comments in first line 2019-11-04 17:22:42 +00:00
UbitUmarov bae7b21e87 update libopenmetaverse ( attach points) 2019-11-04 10:44:29 +00:00
UbitUmarov f2cf3b201b avoid a null ref 2019-11-02 21:53:12 +00:00
UbitUmarov 26b5affb04 FlotSamAssetcache write to disk needs be sync. 2019-11-01 15:00:22 +00:00
UbitUmarov 3236e24c74 a disabled module has no caps to tell viewers (cameraonlymoduel) 2019-10-31 16:41:28 +00:00
UbitUmarov 5a3ba2afbb always allow part deselect 2019-10-30 04:46:47 +00:00
UbitUmarov 9d6a1e01f9 fix some mysql timestamps default value 2019-10-29 22:55:51 +00:00
UbitUmarov defa235859 update server release notes default URL 2019-10-29 14:37:41 +00:00
UbitUmarov 4797f8210c update version name 2019-10-28 16:41:26 +00:00
UbitUmarov b073d2ae6b change version 2019-10-28 11:28:00 +00:00
UbitUmarov 3c4bc681c3 refuse to create a new user with empty password 2019-10-24 17:40:39 +01:00
UbitUmarov bf2e0f7737 oops, dont ask things twice 2019-10-24 17:30:24 +01:00
UbitUmarov be6080c3c8 partial revert console Prompt code to fix it 2019-10-24 17:07:59 +01:00
UbitUmarov 46e36601cb remove some more useless NULL arguments 2019-10-22 13:04:01 +01:00
UbitUmarov da0a8d6c43 remove some more useless NULL arguments 2019-10-22 12:39:50 +01:00
UbitUmarov b98ad6c53c remove some useless NULL arguments 2019-10-22 12:23:19 +01:00
UbitUmarov d838a7e5c7 missing file 2019-10-22 12:04:32 +01:00
UbitUmarov 7939974d92 try to fix console AGAIN 2019-10-22 11:55:27 +01:00
UbitUmarov 7f8d5bbdce a few changes on osslEnable.ini 2019-10-21 11:34:32 +01:00
UbitUmarov a7f8412644 a few changes on osslEnable.ini 2019-10-21 11:25:40 +01:00
UbitUmarov 656ea163cc a few changes on LlGetObjectDetails 2019-10-20 10:55:13 +01:00
UbitUmarov ab335b5926 add a few lsl constants 2019-10-19 18:00:45 +01:00
UbitUmarov 7ed339324f same for osSetDynamicTextureURLBlendFace(). thx djphil 2019-10-19 11:49:46 +01:00
UbitUmarov 24b1e84eca change osSetDynamicTextureURL(Blend) to ThreatLevel.VeryHigh,ESTATE_MANAGER,ESTATE_OWNER 2019-10-19 09:59:26 +01:00
UbitUmarov 9d698bcffb Xengine: more on division by Zero 2019-10-18 15:02:32 +01:00
UbitUmarov f09a18a7a8 Yengine: Also error on division by Zero 2019-10-18 14:16:37 +01:00
UbitUmarov 2a90f78fe1 add LSL_Integer osIsNotValidNumber(LSL_Float v) 2019-10-17 23:33:11 +01:00
UbitUmarov d6abf2a2fe simplify last code a bit 2019-10-17 22:40:54 +01:00
UbitUmarov 53c39bf25f Xengine: Error on division by Zero. Yengine will take a lot more work. If your script gets killed by this, don't bother us, your script is just BAD 2019-10-17 21:35:34 +01:00
UbitUmarov 6b930a596b Yengine make float.tostring culture invariant 2019-10-17 19:40:54 +01:00
UbitUmarov 5971021b5d tests: windows does not have 1ms time resolution 2019-10-16 20:16:59 +01:00
UbitUmarov 0587dd38dc fix some texts init 2019-10-16 20:09:31 +01:00
UbitUmarov 96553ecc11 minor text change 2019-10-16 15:47:55 +01:00
UbitUmarov 1a21ab1938 minor text change 2019-10-16 14:54:25 +01:00
UbitUmarov 45ad812457 minor text change 2019-10-16 14:45:04 +01:00
UbitUmarov b87301f692 typo 2019-10-16 14:04:20 +01:00
UbitUmarov 43bf3af138 OSSL: threading issue 2019-10-16 13:53:55 +01:00
UbitUmarov 2abf375351 OSSL: stop reading configuration file on every script start. 2019-10-16 13:42:11 +01:00
UbitUmarov c7714d6320 make OSSL parsing error warning more clear 2019-10-16 13:05:30 +01:00
UbitUmarov 0e3f24a67e change OSSL functions allow control code. Behavior should stat pretty much the same. Some help testing, please 2019-10-16 12:24:07 +01:00
UbitUmarov d79d7e228a add OSSL option PermissionErrortoOwner (true or false). if true ossl functions permission errors will only be sent to prim owner, defaul false: send all around 2019-10-16 00:08:45 +01:00
UbitUmarov 77126cee00 change coments on osslEnable.ini and remove list of functions always suported; 2019-10-15 22:57:30 +01:00
UbitUmarov 23587391f8 basic search: fix people search, add some caching 2019-10-14 11:32:00 +01:00
UbitUmarov 6d1ad6acd5 viewers group search page size is 100 ( and not way to detect other value, so hardwired) 2019-10-13 19:11:21 +01:00
UbitUmarov 5bbaea50e4 groups v2: remove wrong filters on DB search 2019-10-13 18:52:33 +01:00
UbitUmarov 0273baaef6 mantis 8598: filter dead groups from group search. honor querystart request. Viewers are very broken on this, seems protocol was made by someone with no idea about lludp 2019-10-13 16:41:38 +01:00
UbitUmarov 2c1909a873 add osResetAllScripts(LSL_Integer AllLinkset). use with care 2019-10-11 00:01:59 +01:00
UbitUmarov 55d70f5df7 update livomv 2019-10-08 06:31:39 +01:00
Melanie be34b8e79d Fix build break 2019-10-06 23:57:47 +01:00
Melanie eb55f7f2bc Introduce a way to send the grid's message kay, if one is used 2019-10-06 23:24:41 +01:00
Melanie 22599fbf29 Remove a no longer used property that used ScopeID in an improper way 2019-10-06 19:51:46 +01:00
Melanie aed0eaf4d7 Fix an issue where parameter parsing could lead to an exception 2019-10-06 19:51:13 +01:00
UbitUmarov 1b70b569ad explicitly remove useragentserviceconnector dns lookup, effectively removed on a previus commit. This should not be needed with required mono versions and proper configured DNS (that must honour short TTL needed by dynamic DNS ); add some uri validation 2019-10-06 18:24:06 +01:00
UbitUmarov c5e2afa9f8 remove useragentserviceconnector dns lookup also on ossl 2019-10-06 17:09:49 +01:00
Melanie 09d8da7e77 Merge branch 'master' of brain.opensimulator.org:/var/git/opensim 2019-10-06 16:12:54 +01:00
Melanie abdc78d6d3 Stop replacing the host name with it's IP.
Mono DNS resolution is now configurable elsewhere.
Resolving the IP ahead of time causes requests to
be made by IP. If NginX is used to distribute requests
to services by name, this breaks HG teleports.
2019-10-06 16:10:57 +01:00
UbitUmarov 03da5a9714 fix ViewerAsset external url 2019-10-06 02:21:29 +01:00
UbitUmarov 39aa27af2b missing file 2019-09-24 00:26:59 +01:00
UbitUmarov 27a40461e2 do removed the old API function (replaced in 2016). Thanks Terry for finding this old Bug 2019-09-23 16:29:33 +01:00
UbitUmarov 64834a880d fix a HGsuitcase API 2019-09-23 15:59:15 +01:00
UbitUmarov 43b56eaf08 make Console Promt(..) compatible with rest of code, again 2019-09-21 16:59:41 +01:00
UbitUmarov b046ccebf2 make Console Output(..) compatible with rest of code, again 2019-09-21 16:35:38 +01:00
UbitUmarov d7bf623f57 add a missing return 2019-09-18 19:09:48 +01:00
UbitUmarov 63239402ae fix wrong lludp message usage 2019-09-18 18:43:45 +01:00
UbitUmarov 24a977323b avoid a null ref ( this should not be needed) 2019-09-18 05:27:25 +01:00
Robert Adams 4161182be0 Update the Newtonsoft JSON manipulation DLL to latest version (v12.0.3-beta1). 2019-09-17 19:35:05 -07:00
Robert Adams 9956f5cb4a Changes fix some CORS problems when making XMLRPC calls from
browsers (which have gotten very picky over the years).
Add "Access-Control-Allow-Origin" to XMLRPC responses.
Add "Access-Control-Allow-Methods" and "Access-Control-Allow-Headers" to
    the HTTP OPTIONS response (used in CORS pre-flight request).
2019-09-17 19:30:30 -07:00
UbitUmarov 645c0c780d add a extra lenght check 2019-09-17 20:43:55 +01:00
UbitUmarov 63b0bd7f6b fix saving appearence to notecard, so they can work on older regions 2019-09-15 16:49:58 +01:00
UbitUmarov 85aa77566b allow particles scale max to be 7.96m, supported by protocol 2019-09-12 00:25:52 +01:00
UbitUmarov 5f1fde5f38 fix bad indexes math 2019-09-11 15:52:26 +01:00
UbitUmarov 0bef393b6b fix a bad typo 2019-09-11 15:24:28 +01:00
UbitUmarov 025fc98262 take unit tests limited settings in consideration on setappearance 2019-09-11 15:08:09 +01:00
UbitUmarov ecfa3cf7dc pesty warning 2019-09-11 14:09:55 +01:00
UbitUmarov aea5f186c5 remove a config option that controled a useless sim feature. note that at this point, and as normal on master, appearence/bakes etc may have a few more issues than before, as always thanks for your help testing it, and hapy clouds 2019-09-11 14:03:25 +01:00
UbitUmarov 07874fa058 enable agent hover again, (it is still bad on most viewers for opensim 2019-09-11 13:54:14 +01:00
UbitUmarov 9d6c996570 extent supported number of avatar textures/bakes/wearables, tell viewers about it on lludp RegionHandShake; propagate agenthover; block teleports/crossings based on worn wearables and peer version; 2019-09-11 13:51:43 +01:00
UbitUmarov 6aa369d858 disable AvatarHoverHeight useless and viewer side broken (without SSA) 2019-09-09 15:52:50 +01:00
UbitUmarov 304d72565d fix a HG to local grid tp extra check 2019-09-07 01:25:32 +01:00
UbitUmarov f835960d17 go back to protocol 0.7, until 0.8 changes are ready 2019-09-05 00:23:47 +01:00
UbitUmarov 93f13aa00d add osSlerp() 2019-09-04 23:27:48 +01:00
UbitUmarov 7771cc00c4 don't wear vegetables 2019-09-04 13:58:38 +01:00
Melanie 3d019323e8 Cache assets even in cases where the upload fails. That helps in asset upload debugging because the asset can be examined 2019-09-04 11:01:27 +01:00
UbitUmarov bfc1756fe3 fix the fix 2019-09-04 09:38:52 +01:00
UbitUmarov c4904de6a7 fix one of the new warp3d log messages 2019-09-03 21:28:06 +01:00
UbitUmarov fc550e2b3e avoid potencial null ref 2019-09-03 15:21:25 +01:00
UbitUmarov 3aae1d0918 mantis 8585: add a bit more debug messages 2019-09-03 15:19:36 +01:00
UbitUmarov 98b86c012e avoid a null ref 2019-09-03 02:22:08 +01:00
UbitUmarov fd252b1285 add a little more debug for now 2019-09-03 02:10:07 +01:00
UbitUmarov eedb0a1c85 missing file 2019-09-02 22:56:57 +01:00
UbitUmarov ae130d9f25 mantis 8580: make some changes on regions find code. (only gatekeeper
host is used on local grid detection, not its port)
2019-09-02 22:48:42 +01:00
UbitUmarov 38dbc03288 mantis 8585 change assets README 2019-08-31 15:36:18 +01:00
UbitUmarov 7cdce3e276 XbakesModule: allow more textures, older versions will not see 2019-08-31 15:01:15 +01:00
UbitUmarov 695821a93a update httpserver.dll reverting a change win does not seem to like 2019-08-31 05:44:14 +01:00
UbitUmarov 0bafb36aad restore a texture asset removed by mistake 2019-08-30 23:03:39 +01:00
UbitUmarov 694ad7d8bc increase region protocol version to 0.8 2019-08-30 13:04:58 +01:00
UbitUmarov 8938ae498f added some texture assets. Thx Ai Austin 2019-08-29 11:21:26 +01:00
UbitUmarov c0521482ce add a test sim feature 2019-08-29 09:08:45 +01:00
UbitUmarov 85b615309b update libomv with simpler Texture.GetBakesBytes 2019-08-29 08:52:16 +01:00
UbitUmarov 0e33014572 add a few lsl constants 2019-08-28 05:54:18 +01:00
UbitUmarov 450ae4a927 change appearance data sent to others 2019-08-28 04:36:17 +01:00
UbitUmarov 562ec0eed3 update libomv 2019-08-28 04:33:55 +01:00
UbitUmarov 7a82f9ef9f mantis 8470: add constant PrivURL. Thanks Ai Austin 2019-08-27 22:32:26 +01:00
UbitUmarov 60fa28740a mantis 8583: update region information on Grid on map regeneration 2019-08-27 21:24:54 +01:00
UbitUmarov 718c6d1e4d mantis 8583: osGetRegionMapTexture(); now returns prim region map textureID, without any requests to grid 2019-08-27 21:16:22 +01:00
UbitUmarov ab92dff5be a few changes to db generic tables 2019-08-26 03:00:28 +01:00
Melanie 584df2ab38 Fix console outputting raw format strings 2019-08-25 23:07:14 +01:00
UbitUmarov c4e453d948 revert last change and o fix the damm silly bug 2019-08-24 23:33:05 +01:00
UbitUmarov 35e3c3dec4 reduce even more the number of objects per UDP packet on object cache related pkts ( TEST ) 2019-08-24 22:52:47 +01:00
UbitUmarov 030ad7f47a minor change on httpserver dll 2019-08-24 07:57:17 +01:00
Melanie 110644c23a Make ReadConfig a general features of consoles, rather than type dependent 2019-08-21 21:23:54 +01:00
Melanie 7e136c67fd Call SetServer on consoles reflectively to avoid having type checks in places where it tends to be forgotten to update them. 2019-08-21 21:15:58 +01:00
Melanie 0fd17c08ae Massive console refactor. Greatly simplify interface. 2019-08-20 23:28:59 +01:00
UbitUmarov f7a496136d change PGSQL migration 2019-08-19 12:28:17 +01:00
UbitUmarov 4acd07c0fa try again to update SQLite estateban 2019-08-18 20:53:35 +01:00
UbitUmarov 7f52bcbc7f try to update SQLite estateban 2019-08-18 20:35:24 +01:00
UbitUmarov d5db4b9d93 try to update PGSQL estateban 2019-08-18 20:24:19 +01:00
UbitUmarov a687c5fce9 oops... 2019-08-18 02:12:15 +01:00
UbitUmarov 6b868f8682 i do not not store banTime as DateTime, fix the EstateBan decoder 2019-08-18 00:33:23 +01:00
UbitUmarov 115d69e633 missing file 2019-08-17 23:59:01 +01:00
UbitUmarov db374112c6 EstateAccess do fill the fields(mySQL only); fix the response 2019-08-17 23:57:05 +01:00
UbitUmarov eb9cf78e6b EstateAccess: add some ban fields to fill one day 2019-08-17 20:41:49 +01:00
UbitUmarov 16bf737b26 minor update to osslEnable.ini 2019-08-17 19:29:37 +01:00
UbitUmarov 64c56fc52b mantis 8577: add key osGetInventoryItemKey(string name) to get a inventory item ID within prim inventory. the llGetInventory does return the asset it, not item. 2019-08-16 21:24:07 +01:00
UbitUmarov 9ddd2e842e move file HGworldMapModule to where it belongs( runprebuild) 2019-08-15 18:28:58 +01:00
UbitUmarov 7d0b37faec still another missing ShowNPCs case, and needed changes for prev commit 2019-08-15 18:01:51 +01:00
UbitUmarov 12abb3ffe4 make HGworldmap initialize its base wordmap 2019-08-15 17:59:57 +01:00
UbitUmarov 002ef3cd89 mantis 8575: npc map dots could be sent on another spot 2019-08-13 23:06:26 +01:00
UbitUmarov 4812833435 set default value for timestand on groups v2 invites table 2019-08-10 22:18:55 +01:00
UbitUmarov ffd5c5cc9c mantis 8573 and 8569: be more aggressive on drag block with touch on non physical prims 2019-08-10 13:58:11 +01:00
Melanie c9b7ec2af9 Make the DNS cache timeout configurable.
In containerized environments, DNS is simulated. It can change several
times per second as containers move around. The hardcoded timeout was
too long for a container environment.
2019-08-09 12:06:33 +01:00
Melanie f332f3fc41 Merge branch 'master' of brain.opensimulator.org:/var/git/opensim 2019-08-09 11:02:04 +01:00
Melanie 34816fe1ab No idea where this diff comes from - change case to lower 2019-08-09 11:01:19 +01:00
Melanie 0726ef5302 Fix #8572 2019-08-09 10:59:51 +01:00
UbitUmarov c043008e04 add cap EstateChangeInfo 2019-08-07 21:06:20 +01:00
Melanie c80926192a Make showing NPCs on the world map an option 2019-08-07 18:45:04 +01:00
Melanie 1a8c235d58 Remove debug output i left in 2019-08-07 18:30:08 +01:00
Melanie Thielker c3e74d9e04 Put a scope un users. Should fix Unknown UserUMMAU43 unless the user IS unknown 2019-08-07 18:22:13 +01:00
Melanie ba680ceecb Merge branch 'master' of brain.opensimulator.org:/var/git/opensim 2019-08-07 17:58:55 +01:00
Melanie d781742d8e Fix scope support to get friends list names across co-hosted grids 2019-08-07 17:58:08 +01:00
UbitUmarov 21aa26d796 cap EstateAccess: don't meed with keepAlive unless needed 2019-08-07 17:39:17 +01:00
UbitUmarov 8d1c12dfad pesty warning; btw thx LiruCookies for help on estateaccess cap viewer protocol 2019-08-07 16:29:09 +01:00
UbitUmarov 4ea679d9e8 add cap EstateAccess: missing file 2019-08-07 16:20:43 +01:00
UbitUmarov 1e0984b64c add cap EstateAccess 2019-08-07 16:16:49 +01:00
UbitUmarov 5b39860573 silly bug in libomv 2019-08-02 13:13:53 +01:00
UbitUmarov 482c51a42a cosmetics 2019-08-02 04:28:34 +01:00
UbitUmarov 04eb4744df update libopenmetaverse including a ugly hack to try to workaround issues detected with new windows .net4.8 JIT. this can be reverted with that is fixed, this can also go wrong, as usual ;) 2019-08-02 02:36:19 +01:00
UbitUmarov 0142f102ce remove redundant code 2019-08-01 05:37:27 +01:00
UbitUmarov 96dabca85b make sure XEngine does release script events when a script is destroyed 2019-08-01 05:31:03 +01:00
UbitUmarov 618c6ceda5 mantis8569: do aggregate script events when a script is deleted; block nonphysical drag if a touch event is triggered, add a time guard on that 2019-08-01 04:14:49 +01:00
UbitUmarov 6359874d64 mantis8548: let rotation division be -(olderResult) this is formally more correct (and it is the same rotation), keep not normalizing, as SL seems to do 2019-08-01 00:01:27 +01:00
UbitUmarov 0bcd58fd0f mantis8548: change more LSL arguments declarations to their formal form. Still a lot more to do. This is a case where coerence matters over performance, to avoid more future issues 2019-07-31 16:27:36 +01:00
UbitUmarov 1499baf13e mantis8564: add region_up_time to llGetEnv. Returns string with seconds since region start. There where ways do get it, but this makes life easier 2019-07-31 14:34:35 +01:00
UbitUmarov b5b518dc0d change value of PARCEL_DETAILS_DWELL to a higher value to give more room for standard values, change return types, update script syntaxe 2019-07-31 13:38:49 +01:00
TBG Renfold 0163af970f Mantis #8481 part two.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2019-07-31 12:58:11 +01:00
TBG Renfold 8de67dad76 Mantis #8481 part one.
Add llGetParcelDetails(vector pos, [PARCEL_DETAILS_LANDDWELL])

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2019-07-31 12:58:00 +01:00
UbitUmarov cd641e8629 fix configuration loader test 2019-07-31 00:37:27 +01:00
UbitUmarov 944a785a32 now i can login on win .net4.8, but just a little drop on a large (broken) OSD ocean. some of this changes are actually good even on good JIT. Failure seems to be on same code pattern, but same points seem to vary with each JIT compilation, sometimes work, others don't, others always fail, etc 2019-07-30 23:26:29 +01:00
UbitUmarov 185ed42123 cosmetics 2019-07-30 18:34:32 +01:00
UbitUmarov a92b0e7716 Merge branch 'master' of opensimulator.org:/var/git/opensim 2019-07-30 18:22:45 +01:00
Melanie 24aa13239c Also remove the defaults from Configger 2019-07-30 18:15:09 +01:00
Melanie d29ffbf551 Restore the OpenSimDefaults I had to move out of the way to test this 2019-07-30 18:07:02 +01:00
Melanie 08c9ad6a5b Remove the outdated and no longer useful hardcoded config defaults 2019-07-30 18:03:01 +01:00
UbitUmarov 87eb2fa9da cosmetics 2019-07-30 17:51:20 +01:00
Melanie 08b62c8daa Don't try to print XML if a corrupted asset is actually binary data 2019-07-30 16:01:15 +01:00
Melanie 1c8508cfbd Put back the code to create the ready marker file. 2019-07-29 18:05:30 +01:00
Melanie 34209d2a39 Fix godnames module to not add the empty string if only one option is used 2019-07-27 12:12:35 +01:00
Melanie d6723dab37 Merge branch 'master' of brain.opensimulator.org:/var/git/opensim 2019-07-27 12:10:28 +01:00
UbitUmarov 78359c108d mantis 8563: do not modify collection inside a loop on it a foreach on it 2019-07-15 22:10:47 +01:00
Melanie 2f52a3b124 When using FSAssets, the HGAssetService would still use AssetService.
This introduces a new HGAssetService config option named BackingService,
which defaults to the old behaviour, loading AssetService. It can, however,
be used to load FSAssets for HG assets, which eliminates numerous problems.
2019-07-13 13:33:34 +01:00
Melanie aedaa32ddc When using FSAssets, the HGAssetService would still use AssetService.
This introduces a new HGAssetService config option named BackingService,
which defaults to the old behaviour, loading AssetService. It can, however,
be used to load FSAssets for HG assets, which eliminates numerous problems.
2019-07-13 13:30:15 +01:00
UbitUmarov d372309e3c mantis 8558: send sane values for Agents and objects capability (max hard limit) 2019-07-06 20:49:00 +01:00
UbitUmarov 03abb970f4 reduce httptimout on first try to save a asset to grid 2019-06-14 20:13:57 +01:00
UbitUmarov 05f508229c make materials save to grid less async on manual backup or shutdown 2019-06-14 20:12:33 +01:00
UbitUmarov 79442c8c56 handle confirmXfer sync 2019-06-13 01:33:25 +01:00
UbitUmarov b09ea5bdc7 delay timeout a bit 2019-06-13 01:12:47 +01:00
UbitUmarov 086248c13b minor cleanup 2019-06-13 00:08:51 +01:00
UbitUmarov 4b8c5ee6e8 test... 2019-06-12 03:12:51 +01:00
UbitUmarov 878d0defc7 add a lock 2019-06-12 02:41:20 +01:00
UbitUmarov da90da220e still a few more changes to lludp Xfer download for lost udp case 2019-06-12 01:43:32 +01:00
UbitUmarov 238efad690 a few more changes to lludp Xfer download 2019-06-11 01:19:57 +01:00
UbitUmarov 017253fae9 a few more changes to lludp Xfer download 2019-06-10 19:17:32 +01:00
UbitUmarov 2cba0d676e test... 2019-06-09 23:40:50 +01:00
UbitUmarov 9ff7601214 reduce some useless array copies 2019-06-09 20:15:36 +01:00
UbitUmarov 41e2379f97 mantis 8460: reduce odds of watchdog timeout warning 2019-06-04 19:02:50 +01:00
UbitUmarov 38e937f91b add sim feature AvatarHoverHeightEnabled; mantis 8535: make option MeshModelAllowTextureToInventory visible 2019-05-28 21:37:59 +01:00
UbitUmarov 8410a01fb4 missing old flag VEHICLE_FLAG_NO_FLY_UP 2019-05-22 23:16:36 +01:00
UbitUmarov 9c44dc3384 change yengine comments on ini file 2019-05-19 14:20:01 +01:00
UbitUmarov 0e2adbe0fb mantis 8527 and 8517: let llSetLinkPrimitiveParam*() PRIM_TEXTURE ignore texture id/name if invalid, processing the other parameters, for compatibily with old scripts. 2019-05-14 02:48:03 +01:00
UbitUmarov 3ae4115e43 osLocalTeleportAgent: if lookat or fly options, just move the avatar, not telling viewer about any teleport 2019-05-03 00:39:55 +01:00
UbitUmarov 3a055c578d soem cleanup 2019-05-02 03:11:16 +01:00
UbitUmarov ea32a73103 osLocalTeleportAgent: no region crossings :( ; check avatar access to target position; flag 8 == force fly; 16 force nofly (both == fly) 2019-05-01 03:49:24 +01:00
UbitUmarov 11c945a565 add osLocalTeleportAgent(key agent, vector position, vector velocity, vector lookat, LSL_Integer flags). Velocity only works with ubOde but still not good. flags = bit field: 1 use velocity, 2 use lookat, 4 rotate avatar look in current velocity direction (ignored if 2 ie flag = 7 is same as 3). This bypasses most the unnecessary logic of osTeleportAgent, having usage same permissions. It may do region crossings(?). Experimental stage, feedbakc expected ;) 2019-05-01 01:36:10 +01:00
UbitUmarov 9225b78309 missing files... 2019-04-30 23:04:04 +01:00
UbitUmarov 3491af440f missing files... 2019-04-30 23:01:37 +01:00
UbitUmarov e9587c8835 sop: rename a few fields 2019-04-30 22:56:31 +01:00
UbitUmarov 15dd033490 primbasicshape: convert eventual MeshEP to SculpEP 2019-04-30 22:52:58 +01:00
UbitUmarov 8994045d5f old typo 2019-04-23 14:52:15 +01:00
UbitUmarov 5314f375c5 change osSetProjectionParams a bit and add a variant that atkes a linknumber argument. For now can only change one prim per call 2019-04-18 15:26:27 +01:00
UbitUmarov bd442208d8 mantis 8517: actually let NULL_KEY do the same as on PRIM_TEXTURE 2019-04-18 14:01:54 +01:00
UbitUmarov 2b4e5fcded mantis 8517: let texture argument of PRIM_TEXTURE only change the other parameters. On PRIM_NORMAL and PRIM_SPECULAR will be as NULL_KEY removing the material. This may be changed for coerence in future 2019-04-18 13:17:40 +01:00
UbitUmarov 11cad57c9c lludp: change burst, make it per category (overall reduction) 2019-04-16 19:07:26 +01:00
UbitUmarov 37fb937e0d Yengine: rename a field, do some updates using interlocked 2019-04-16 17:28:09 +01:00
UbitUmarov 09d92565dc typo on a debug message format 2019-04-16 15:31:31 +01:00
UbitUmarov 6bbd5eb6a2 Yengine: change binary code version, so scripts are automaticly recompiled with new changes 2019-04-16 11:39:28 +01:00
UbitUmarov 2fa5d10c00 Ynegine: add some missing memory usage on script reset 2019-04-16 00:07:13 +01:00
UbitUmarov a83b7a292b mantis 8518: Yengine; we can't wait for GC (worse finalizers) to count released memory of some local variables, so add a pseudo free; fix memory account on timeslice rentry; change the folder for the debug IL files; fix memory usage on reset. This changes will only take effect on new compiles 2019-04-15 23:32:22 +01:00
UbitUmarov cfd3923868 update warp3d.dll 2019-04-12 00:19:42 +01:00
UbitUmarov a824258c88 warp3d: reduce work prims textures to at most 256x256 2019-04-11 23:47:01 +01:00
UbitUmarov 2b604fa889 update warp3d.dll 2019-04-11 23:44:18 +01:00
UbitUmarov d977613162 do disable probes when voc is disabled 2019-04-10 21:28:41 +01:00
UbitUmarov 4475b3db27 degradate udp network efficiency a even more 2019-04-10 14:01:10 +01:00
UbitUmarov ee989dd552 missing file 2019-04-10 00:27:17 +01:00
UbitUmarov b459b2c65f dont send animation before object 2019-04-10 00:25:49 +01:00
UbitUmarov b051b3a81d change to ping based RTO 2019-04-09 21:30:06 +01:00
UbitUmarov c09b312b05 testing ... 2019-04-09 18:50:08 +01:00
UbitUmarov 49fb9d6b4b degradate udp network efficiency a bit more 2019-04-09 13:05:18 +01:00
UbitUmarov b8a061816f degradate udp network efficiency a bit 2019-04-09 12:46:21 +01:00
UbitUmarov f29fdb6bda old tp timing issues on grid presence notification did came back, so put back old hack 2019-04-09 10:22:55 +01:00
UbitUmarov 2c8e03b589 testing ... 2019-04-09 00:25:38 +01:00
UbitUmarov cadcf412ec linux likes other tz names 2019-04-08 14:04:02 +01:00
UbitUmarov b104934a25 add osGetPSTWallclock() returns wall clock in PST or PDT, for those that for some odd reason think need it. OpenSim girds shoudl use UTC (gtm) but whatever 2019-04-08 13:50:51 +01:00
UbitUmarov 539a3a9273 make robust ban by MAC options visible, thx Bill Blight 2019-04-07 16:29:31 +01:00
UbitUmarov 442ef1cc9e change a comment 2019-04-06 21:27:54 +01:00
UbitUmarov ec6a52c029 change interpretation of a viewer flag 2019-04-06 21:26:12 +01:00
UbitUmarov a25e18587c set SupportViewerObjectsCache true by default 2019-04-06 16:30:19 +01:00
UbitUmarov b7c1d6e7f5 UserAgentService: change handling of its external IP 2019-04-06 16:09:42 +01:00
UbitUmarov 0ebb1f3f4b presence detector: don't even try to logout agents that didn't made to root 2019-04-06 12:25:54 +01:00
UbitUmarov 5ed2b5c990 try handle the special case MaxRegionsViewDistance = 0 (agents only see void around region, even if there are regions around 2019-04-05 14:43:48 +01:00
UbitUmarov 3bc0690a7a temp workaround on sits culling 2019-04-05 12:32:36 +01:00
UbitUmarov 28c9725730 kill avatar on agents that do not see its new region 2019-04-05 12:31:43 +01:00
UbitUmarov 7ce45235e6 make sure viewer knows where to place a sitting avatar, this will need deep revision with culling 2019-04-05 11:19:38 +01:00
UbitUmarov 6485377ecd fix MinRegionViewDistance option (added in last commit); change regions view control 2019-04-05 04:21:40 +01:00
UbitUmarov 63321f9ccc add option RegionViewDistance 2019-04-05 04:08:14 +01:00
UbitUmarov 0652f01d4c duhhh npcs don't have child agents; plus minor typos 2019-04-05 03:45:27 +01:00
UbitUmarov 8d272fb1d0 mantis 8512: fix runprebuild 2019-04-05 03:25:02 +01:00
UbitUmarov 50c810549c change visible regions also by view range change; fix check on crossings 2019-04-04 20:16:23 +01:00
UbitUmarov a56f40470e control visible regions by avatar position and view range, first dirty code 2019-04-04 18:55:40 +01:00
UbitUmarov 07796d5ccf change region cacheid on restart. This should not be needed in future if objects cache info is stored on region db 2019-04-04 18:52:28 +01:00
UbitUmarov 42414bfa55 mantis 8512: add proposed detection of VS2019 to runprebuild (both this and vs2019 untested by me 2019-04-04 15:07:15 +01:00
UbitUmarov 15b6d8c147 send agent view range to new child agents 2019-04-04 00:50:54 +01:00
UbitUmarov 8e094887cd change avatars sending point 2019-04-02 20:27:56 +01:00
UbitUmarov b458c5a9b4 another test.... 2019-04-02 17:26:06 +01:00
UbitUmarov e7f0131509 another test.... 2019-04-02 17:05:47 +01:00
UbitUmarov 433e529512 make tests happy again; try to speedup crossings 2019-04-02 15:58:36 +01:00
UbitUmarov 8152e47a4a change the point where child regions are closed/opened 2019-04-02 15:10:42 +01:00
UbitUmarov 1984cbdbe5 add extra delay before sending initial data 2019-04-02 13:49:25 +01:00
UbitUmarov ba66d2d3c1 minor cleanup on mesh decompress code 2019-04-02 10:13:26 +01:00
UbitUmarov 2739b2f5cc mantis 8509: replace mesh gzip decompress 2019-04-01 18:12:17 +01:00
UbitUmarov 7f55db72d2 Yengine: try fix changing scripts running state if the have long events 2019-04-01 13:58:41 +01:00
UbitUmarov 3b63699b9d still issues on fast hg tps 2019-04-01 13:55:54 +01:00
UbitUmarov 5dc7623e38 change avatar arrival at hg destination handling 2019-04-01 13:18:40 +01:00
UbitUmarov 3327bed34b fix tp set callback log message 2019-04-01 12:46:03 +01:00
UbitUmarov 772aa5234a Yengine: clear events queue on reset. Also keep clearing all on state change. (Linked message events are deleted at sl) 2019-04-01 01:48:23 +01:00
UbitUmarov 7110e98815 rez npcs attachments async again 2019-03-31 23:31:18 +01:00
UbitUmarov 190e2da672 Yengine attachment drop, do set attachment ready event 2019-03-31 22:50:14 +01:00
UbitUmarov 939aff5c3b oops RegionHandShakeReply is not reentrant 2019-03-31 20:43:32 +01:00
UbitUmarov 9650cb8708 remove a potencially dang. lock 2019-03-31 20:31:35 +01:00
UbitUmarov 3a6d87da95 a few more changes on initial data sending 2019-03-31 19:28:06 +01:00
UbitUmarov 89ac80189c do clear MOAP on remove 2019-03-31 05:34:35 +01:00
UbitUmarov 4626f0850a fix osSet/GetPrimitiveParams threat level 2019-03-31 02:12:30 +01:00
UbitUmarov 98be996991 missing file 2019-03-30 12:56:23 +00:00
UbitUmarov fa4716955e make 2 tests happy again 2019-03-30 12:51:10 +00:00
UbitUmarov 6cf85a3db1 a few more changes on initial objects send 2019-03-30 12:07:49 +00:00
UbitUmarov f6db9e044d Yengine: fix scripts resume on attachments drop 2019-03-28 13:46:39 +00:00
UbitUmarov 3644879677 mantis 8508: ignore llAttachToAvatar if already attached 2019-03-28 02:32:36 +00:00
UbitUmarov 1847a42a86 changes on teleports v7 2019-03-28 00:02:24 +00:00
UbitUmarov 5663e2c0c8 try another way 2019-03-27 07:32:06 +00:00
UbitUmarov dad533fe1c timming issues on fast tp back to same region on new code 2019-03-27 06:43:22 +00:00
UbitUmarov 83fd05f131 timming issues on fast tp back to same region on new code 2019-03-27 02:04:11 +00:00
UbitUmarov 5035de053a we should be able to zeroencode compressedupdates 2019-03-25 17:51:38 +00:00
UbitUmarov b32b104996 some more changes on objects sending 2019-03-24 16:15:24 +00:00
UbitUmarov 481d7156d1 mantis 8505 ( and not 8506 by mistake on previus commit) remove the meshes numbre of sides warning. build prims with the number of sides of the high LOD submesh 2019-03-24 01:51:29 +00:00
UbitUmarov 027750e98f compact the trivial te case, a more complete one may be needed even beening heavy 2019-03-24 00:35:30 +00:00
UbitUmarov 33986aea5e mantis 8506: parse highlod mesh and compare its number of prim faces to the number of faces provided and warn mismatch 2019-03-23 23:32:39 +00:00
UbitUmarov 9c322c93cc fix particles encoding on compressedupdate 2019-03-23 08:04:23 +00:00
UbitUmarov b6626739e2 make the text enable option visible for testing 2019-03-23 04:28:22 +00:00
UbitUmarov 010d64dcd2 a bit more suicidal... 2019-03-23 03:58:22 +00:00
UbitUmarov a9aba562b1 pesty warning 2019-03-23 02:24:32 +00:00
UbitUmarov d0052c8174 add more test code to make usage od compressed updates etc. Should be disable, but well many things can go wrong. 2019-03-23 02:18:32 +00:00
UbitUmarov db191cd4e2 oops send flag PrimFlags.InventoryEmpty but do not override others 2019-03-21 07:13:39 +00:00
UbitUmarov cfbd34f618 add some code for compressed updates, but disabled, since more changes are needed elsewhere 2019-03-21 06:52:18 +00:00
UbitUmarov b1cf06796f do send flag PrimFlags.InventoryEmpty 2019-03-21 06:21:57 +00:00
UbitUmarov 7211afb3b9 missing file 2019-03-20 15:12:56 +00:00
UbitUmarov d6b3413c63 RegionHandshake IS critical llupd protocol not to be done by odd modules 2019-03-20 15:09:53 +00:00
UbitUmarov 81ff118378 lludp direct encode RegionHandshake 2019-03-20 14:41:19 +00:00
UbitUmarov fe6317f009 LSL update texture entry is heavy, set all parameters on same update 2019-03-19 21:37:58 +00:00
UbitUmarov af35882eda prevent spurius acceleration values 2019-03-19 13:00:11 +00:00
UbitUmarov c521ff394e recover the UnAckedBytes are in KB fix 2019-03-19 10:59:01 +00:00
UbitUmarov 7884278097 try to avoid some useless full object updates 2019-03-19 10:29:48 +00:00
UbitUmarov a7927e9d7b lludp ObjectAnimation encoding 2019-03-19 09:44:13 +00:00
UbitUmarov 71361f61f4 lludp SimStats encoding 2019-03-19 08:52:14 +00:00
UbitUmarov 132d8be9cc UnAckedBytes are in KB 2019-03-19 07:22:24 +00:00
UbitUmarov b10a3ba023 take the deafult on the parameter overlay 2019-03-19 06:52:57 +00:00
UbitUmarov 182977a872 do not send parceloverlay on crossings (may be bad, or not) 2019-03-19 06:38:43 +00:00
UbitUmarov 1c6be0fae3 ooops 2019-03-19 06:10:08 +00:00
UbitUmarov 6dde1aaa14 try save a few ns on parcel overlays 2019-03-19 06:00:36 +00:00
UbitUmarov c2086e6257 add a few extra checks for viewers animated objects support, to avoid timming issues 2019-03-19 00:47:45 +00:00
UbitUmarov 199d4a1bd0 lludp ReplyTaskInventory, SendXferPacket and AbortXfer enconding 2019-03-18 23:36:49 +00:00
UbitUmarov ee0eef5ee0 also fix the ThrottleOutPacketType 2019-03-18 22:29:24 +00:00
UbitUmarov f17dba9925 oops 2019-03-18 22:26:02 +00:00
UbitUmarov 37619443a7 lludp GenericMessage enconding 2019-03-18 22:19:23 +00:00
UbitUmarov 606d096709 lludp ImprovedInstantMessage enconding 2019-03-18 21:04:42 +00:00
UbitUmarov 6fd7b931b1 lludp ChatFromSimulator enconding; some simplification 2019-03-18 18:58:07 +00:00
UbitUmarov 84187975bd lludp AgentMovementComplete enconding 2019-03-18 18:03:22 +00:00
UbitUmarov b9987b4183 stop sending some useless small packets 2019-03-17 21:37:21 +00:00
UbitUmarov 9ccca71c1b remove redundant code 2019-03-17 19:00:02 +00:00
UbitUmarov 8bb0c05825 lludp: direct encode PacketAck, StartPingCheck and CompletePingCheck 2019-03-17 18:16:38 +00:00
UbitUmarov ee8ad3e69d lludp: direct encode AvatarAppearance 2019-03-17 02:02:40 +00:00
UbitUmarov 2ff5b322be lludp: direct encode CoarseLocationUpdate 2019-03-16 17:44:34 +00:00
UbitUmarov 5428b4799d lludp: direct encode rest of send terseupdates 2019-03-16 15:40:01 +00:00
UbitUmarov d8f9a007f4 bug fix on mapblockreply; direct encode mapitemreply just because.. 2019-03-16 14:30:53 +00:00
UbitUmarov 4a80802bec lludp direct encode mapblockreply. Not bc its a high volume packet, but bc it needed work anyways 2019-03-16 00:38:49 +00:00
UbitUmarov 492ba8f644 minor cleanup 2019-03-15 19:21:44 +00:00
UbitUmarov e1c20a32ca LSL: limit sittext and touchtext to length current viewers cand display 2019-03-15 18:17:50 +00:00
UbitUmarov 46dc9ebd4e lludp: change zero encode of strings; limit them to what current viewers expect 2019-03-15 18:08:05 +00:00
UbitUmarov f143dbc23f lludp direct encode object Properties update packets 2019-03-14 17:11:23 +00:00
UbitUmarov b82337de09 Robust: to tell main httpserver to stop on shutdown 2019-03-12 11:48:17 +00:00
UbitUmarov 1b8999b130 try to work around robust shutdown/quit blocking on mono 2019-03-12 11:14:59 +00:00
root c7a02dc058 Merge branch 'master' of brain.opensimulator.org:/var/git/opensim 2019-03-11 23:41:26 +00:00
root 0a4f0758fa Should have been in the last commit 2019-03-11 23:40:55 +00:00
root c3f9b1568c Fix multi, and single tenancy on MapGet 2019-03-11 23:38:57 +00:00
root e877c94b51 Add a but more status info on marker files 2019-03-11 23:37:53 +00:00
root d8e558a3da Allow anyone to get a CAP to the console - check rights on use 2019-03-11 23:36:52 +00:00
UbitUmarov 68b0d9f31d errr use invariantculture compare not current 2019-03-11 23:24:20 +00:00
UbitUmarov 186e9e2838 at login do try proper region name match before sending just somewhere that looks similar 2019-03-11 23:15:30 +00:00
UbitUmarov 32a03a49fc lludp: direct encode terrain patchs packets 2019-03-10 15:56:14 +00:00
UbitUmarov 7b55d42b11 lludp fix max packet size on ack appends 2019-03-10 11:23:38 +00:00
UbitUmarov 343239c7c3 do not send animated attachments to viewers that do not support them. 2019-03-09 12:04:26 +00:00
UbitUmarov 6bc37f348e ooops bad zeroencode flag 2019-03-08 22:28:57 +00:00
UbitUmarov e9d7ced733 just direct encode avatar animation also 2019-03-08 21:14:08 +00:00
UbitUmarov a32060180f agent animation object ids are only for self avatar 2019-03-08 19:14:09 +00:00
UbitUmarov 155e499457 well let trees have special state and grass data block again. 2019-03-07 18:57:13 +00:00
UbitUmarov 95c4de6144 grass even more 2019-03-07 18:20:17 +00:00
UbitUmarov 4e7cddc6a8 vegetation is special 2019-03-07 17:11:52 +00:00
UbitUmarov 9ccc3ed756 make use of direct object update encoding 2019-03-07 14:53:32 +00:00
UbitUmarov fbd741ece3 prims have at most 9 face textures 2019-03-07 12:12:11 +00:00
UbitUmarov 6ae1341c58 don't read from dbs wrong sound flags 2019-03-07 04:53:41 +00:00
UbitUmarov 9487f5cdd3 don't send irrelevant data 2019-03-07 04:50:05 +00:00
UbitUmarov fdb1ce827b fix packet type 2019-03-06 22:48:00 +00:00
UbitUmarov 0970dc04e2 llupd add direct encode, with inline zeroencode, of objects update ( code path currently not in use) 2019-03-06 22:42:37 +00:00
UbitUmarov cf0f3954a8 lludp do inline zeroencode of some(most) agent full updates (runprebuild) 2019-03-06 20:00:39 +00:00
Robert Adams 87c81b5172 BulletSim: Add delay to stationary check after adding force to Avatar.
Fix to Mantis 8496.
Add parameter [BulletSim] AvatarAddForceFrames.
2019-03-06 10:29:46 -08:00
UbitUmarov 39f73b82d4 dont try to backup a object in the middle of possible multipack link 2019-03-05 17:03:17 +00:00
UbitUmarov 0944a96517 llupd direct encode object updates for agents; let terse updates be zeroencoded. This is not as spec but does work 2019-03-05 16:01:29 +00:00
UbitUmarov b5ad1b7dcc remove lludp throttle texture rate cannibal option. That rate is used by http, and beeing http is still trafic 2019-03-05 09:22:34 +00:00
UbitUmarov 80056abbe7 OOOPPPSSS 2019-03-03 12:15:28 +00:00
UbitUmarov ca1993c72d direct encode lludp terse object update, let contain texture entry 2019-03-02 18:23:29 +00:00
UbitUmarov 9da1ca2b44 ll rez objects: silent ginore null object id; remove redundante llSetColor code 2019-03-02 15:38:36 +00:00
UbitUmarov 8a8ce8b10a put back assetViewer cap code, to allow viewers testing. It is disabled at OpenSimDefaults, and should not be enabled until all major viewers do it right on opensim 2019-03-01 11:57:52 +00:00
UbitUmarov 87733b196b reduce the chance of using a invalid avatar physics actor 2019-03-01 11:48:00 +00:00
Robert Adams bd1b992aaf Add Thread.ResetAbort() to various thread loops to clean up errors on
shutdown. Fixes Mantis #8494.

Threads are aborted when shutting down and ThreadAbortException is odd
in that it is rethrown at the end of the catch unless the abort is
reset. No functional changes but fewer error messages on shutdown.
2019-02-27 07:49:52 -08:00
UbitUmarov 9e182c27fb combat module: those parcel changes are now handled elsewhere 2019-02-27 13:18:38 +00:00
UbitUmarov bcf05afd64 direct encode terseupdates 2019-02-27 10:07:25 +00:00
UbitUmarov fe46f8cd1d avoid packet split on terseupdates 2019-02-26 15:09:18 +00:00
UbitUmarov 4de5e14e54 issues with udp buffers pool on heavy load 2019-02-26 15:02:57 +00:00
UbitUmarov e24adb9ea1 mantis 6569: restore full health on invulnerable set to true; combat module is outdated and needs work. By then the proposal on this mantis should be reviewed 2019-02-26 13:38:03 +00:00
UbitUmarov 91569e00a0 buffers in pool have no data, better mk that clear 2019-02-26 01:16:30 +00:00
UbitUmarov a07951b044 fix UDPBuffersPoolCount value (readable with stats show clientstack 2019-02-26 00:43:44 +00:00
UbitUmarov d5d4dc4754 zero decode using a buffer from the pool 2019-02-25 23:30:01 +00:00
UbitUmarov 91fab70236 removed a redundant function; try to make a particular vi coder happy about removed comments 2019-02-25 23:05:11 +00:00
UbitUmarov d01165818d change UDPPacketBuffer pools (does waste a bit of memory) 2019-02-25 21:46:23 +00:00
UbitUmarov 4dd89ce094 make the options visible on OpenSimDefaults 2019-02-24 10:07:48 +00:00
UbitUmarov cd5a6daa84 also throttle llhttprequest by owner, options: PrimOwnerRequestsBurst = 5, PrimOwnerRequestsPerSec = 25; increase concurrency to 8 2019-02-24 09:46:55 +00:00
UbitUmarov 800f6d6529 several changes to llHttpRequest processing: options section renamed ScriptsHttpRequestModule; throttle by prim (PrimRequestsBurst = 3, PrimRequestsPerSec = 1) and max concurrent connections per instance (MaxPoolThreads = 5), llhttprequest returns if error, nullkey if throttled, reqid otherwise 2019-02-24 07:25:50 +00:00
UbitUmarov 009af3122f update script sintaxe 2019-02-22 22:42:07 +00:00
UbitUmarov d89a089ca2 remove redundant osInventoryDescription() and improve osInventoryDesc() to do the same 2019-02-22 22:28:47 +00:00
UbitUmarov 6e05695244 add LSL_Key osGetLastChangedEventKey() ( it is a alias for lldetectedkey(0) but don't tell anyone 2019-02-21 23:41:49 +00:00
UbitUmarov 5d78f52f7b let Xengine also have that detectedkey 2019-02-21 23:17:53 +00:00
UbitUmarov bd27573130 add LSL_String osGetInventoryName(LSL_Key itemId) and LSL_String osGetInventoryDescription(LSL_String itemNameOrId) 2019-02-21 23:11:03 +00:00
UbitUmarov ece3843798 let changed allowed drop have lldetectedkey[0] return the dropped item id, Yengine and still testing" 2019-02-21 22:54:43 +00:00
UbitUmarov b7507b70bc Yengine changed position and shape events can bt throttled by mineventdelay 2019-02-21 22:05:38 +00:00
UbitUmarov 16596b6ad0 add LSL_Key osGetInventoryLastOwner(string itemNameorid) 2019-02-21 21:56:27 +00:00
UbitUmarov 17ea412da1 fix last owner on add to object inventory 2019-02-21 21:54:24 +00:00
UbitUmarov 0f574d432d Yengine:save minEventDelay in script state 2019-02-20 20:36:43 +00:00
UbitUmarov 72c472f988 Yengine: let llminEventDelay do something: it just ignores a more limited set of events than Xengine (neither do as SL) 2019-02-20 20:12:13 +00:00
UbitUmarov ac651a168a Xengine: exclude a few more events from mineventdelay 2019-02-20 04:54:32 +00:00
UbitUmarov 62fb0961fd missing file on the kick commit 2019-02-20 04:07:42 +00:00
UbitUmarov 7c0eab8a23 Xengine: don't lose state change events 2019-02-20 04:04:35 +00:00
UbitUmarov b56eb2fe63 estate kick now just kill user connection if on same region. The teleport home we did, does not make much sense, and would need more work anyways 2019-02-20 03:05:23 +00:00
UbitUmarov fdf5274c25 add osKickAvatar(LSL_Key agentKey, string alert) 2019-02-20 02:06:25 +00:00
UbitUmarov 98b6ba24b4 oops do show the object delete 2019-02-15 02:28:00 +00:00
UbitUmarov 040ab65f68 (almost) useless change 2019-02-15 02:08:45 +00:00
UbitUmarov b242232c7b minor cleanup 2019-02-15 01:38:49 +00:00
UbitUmarov 06930a1803 don't break permitions on god object return or delete 2019-02-15 01:10:56 +00:00
UbitUmarov f58e1f6265 mantis 8479: deep change DeRezObjects(..) doing independent permitions checks per action. m_useTrashOnDelete should now work except if god deletes, but still not recomended 2019-02-15 01:09:37 +00:00
Robert Adams 52947b6280 Remove some more cut-and-paste typos in 6dof constraint setup in XNA
version of BulletSim. Could only effect operation of flexible linksets when
using the C# version of the Bullet physics engine.
Found by Tampa and AliciaRaven and reported in Mantis 7612.
2019-02-05 08:35:27 -08:00
Robert Adams a1568697d0 Remove cut-and-paste typo in 6dof contstrain setup in XNA version of
BulletSim. Could only effect operation of flexible linksets when using
the C# version of the Bullet physics engine.
Found by Tampa and reported in Mantis 7612.
2019-02-05 08:07:22 -08:00
UbitUmarov 874cc47617 allow more suicidal NonPhysicalPrimMax 2019-02-05 02:25:04 +00:00
UbitUmarov 175817fe55 enforce prim size restrictions on physical state change; Place restrictions on ini values 2019-02-05 01:45:04 +00:00
UbitUmarov b8121ad8a2 prevent freswitch from messing global cert validation, more work is need on rest requests ( also for other things) 2019-02-04 21:44:40 +00:00
UbitUmarov 55f27135dd remove references to obsolete CertificatePolicy 2019-02-04 21:06:50 +00:00
UbitUmarov 364b718acf reduce the odds of MTU violation 2019-02-04 20:12:08 +00:00
UbitUmarov ef3b424b26 optimizers are silly 2019-02-03 00:47:43 +00:00
UbitUmarov 2f3101e1d2 typos, thx 2019-02-01 18:43:39 +00:00
UbitUmarov 75e48610e7 place a global cooldown of 2 min on god map generation 2019-02-01 18:19:27 +00:00
UbitUmarov 6bb8055cc2 change last commit to do as console comand generate map 2019-02-01 12:52:58 +00:00
fly-man- 45de5eb638 Allow Grid owners to regenerate a maptile for a region manually through the use of the God Tools
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2019-02-01 12:38:59 +00:00
UbitUmarov b16ee749ed change default config: allow grid gods by default, if you don't trust grid admins what are you doing there?; disable most god powers unless god level is requested on viewer 2019-01-31 18:02:21 +00:00
UbitUmarov 9046e5cb9d ubode add position to pid control it stopped flying to prevent slow drifts 2019-01-31 17:25:18 +00:00
UbitUmarov 76b777b1fb remove MRM module (minimodule). Its outdated and we have no maintainers. Thanks to all that worked on it. You should either use scripts or a full region module. Or revert this commit and update its code ;) 2019-01-31 12:14:29 +00:00
UbitUmarov 44e6f45ed6 cosmetics 2019-01-31 12:03:14 +00:00
UbitUmarov e0b06d4b6b cosmetics 2019-01-31 11:46:18 +00:00
UbitUmarov 1e1d296ef4 do update physics script events on link ( this does need another cleanup one day 2019-01-31 10:27:21 +00:00
UbitUmarov 73e64c6597 mantis 6702: fix collisions lldetectedlinknumber also on Yengine 2019-01-30 12:27:03 +00:00
UbitUmarov dd43e613f0 oops that went bad on linux, reverting 2019-01-30 00:58:41 +00:00
UbitUmarov d86bb08c28 change GetDrawStringSize so result better matchs rendering size 2019-01-30 00:46:40 +00:00
UbitUmarov eb7715e2f8 a few changes to last commits 2019-01-30 00:12:46 +00:00
UbitUmarov 5fc44398fe actually .. do take the trim out 2019-01-29 22:06:30 +00:00
UbitUmarov 373ec7afa2 try to not lose start and end spaces in osDrawText 2019-01-29 22:01:54 +00:00
UbitUmarov dc633ee768 cosmetics 2019-01-29 21:16:28 +00:00
UbitUmarov 6479eb9022 change encoding few event cap messages 2019-01-29 21:11:21 +00:00
UbitUmarov 6bc8e2413f ubode replace a locklessqueue by .net concurrentqueue 2019-01-29 13:49:29 +00:00
UbitUmarov f1076607dc mantis 8457: ok ok shutup the warning 2019-01-28 07:47:00 +00:00
UbitUmarov 52e5f58c9a add a try catch on HandleMapItemRequest 2019-01-28 04:38:27 +00:00
UbitUmarov cc27168cc1 change encoding of event cap messages 2019-01-28 04:01:09 +00:00
UbitUmarov 4c79a85621 forgotten locks on ubode 2019-01-28 03:37:54 +00:00
UbitUmarov cc204a279e change encoding of a another event cap message 2019-01-28 00:40:33 +00:00
UbitUmarov 695d807696 change encoding of a few event caps messages 2019-01-26 16:42:42 +00:00
UbitUmarov 07946e040d ok i said all ( lie ) 2019-01-25 21:40:30 +00:00
UbitUmarov f7926eb28c ok take the all change 2019-01-25 21:35:23 +00:00
UbitUmarov 367bd48d91 script mono is meaningless for us 2019-01-25 21:21:23 +00:00
UbitUmarov df568b1a66 some sop cleanup 2019-01-25 20:57:48 +00:00
UbitUmarov 61fb39e49b cleanup 2019-01-25 20:54:24 +00:00
UbitUmarov 8048746759 changes on sog boundingbox and other cleanup 2019-01-25 20:52:46 +00:00
UbitUmarov cb94991acb cleanup dead code 2019-01-25 20:50:13 +00:00
UbitUmarov 3ee70aac0b mess around with prioritizer 2019-01-25 20:49:18 +00:00
UbitUmarov e3d0ec6f40 a few changes on priority queues and their heap 2019-01-25 20:46:03 +00:00
UbitUmarov 27f5248d9f Ooops fix bad locking 2019-01-25 03:19:48 +00:00
UbitUmarov f474c10f71 change threads confusing names 2019-01-25 01:50:33 +00:00
UbitUmarov 15c28bb2d4 update libomv with a few more 'useless' changes 2019-01-25 00:23:59 +00:00
UbitUmarov d5059d650f mantis 8452: possible fix 2019-01-22 11:32:51 +00:00
UbitUmarov eb9ac87dd9 fix a bad c&p 2019-01-21 14:09:36 +00:00
UbitUmarov 9e2152d2cb disable tests that now fail bc a scenegraph is now needed to find prims by local id 2019-01-21 13:45:05 +00:00
UbitUmarov 9d002fb568 oops 2019-01-21 13:23:44 +00:00
UbitUmarov 611cfc83d6 give up on Lazy<T> 2019-01-21 13:15:11 +00:00
UbitUmarov 237cf1ced6 some cleanup 2019-01-21 12:59:32 +00:00
UbitUmarov 44d6746f40 well.. put the ode locks back, for now 2019-01-21 08:34:19 +00:00
UbitUmarov d7d5f9f775 change float to byte rounding 2019-01-21 08:03:24 +00:00
UbitUmarov ef43111fc1 another missing file 2019-01-21 06:41:01 +00:00
UbitUmarov da0ea2698b another missing file 2019-01-21 06:14:41 +00:00
UbitUmarov fad63ca814 missing file 2019-01-21 06:09:08 +00:00
UbitUmarov 33a062612f remove terraindata abstraction layer, since we only have heightmap type 2019-01-21 06:05:21 +00:00
UbitUmarov a287a8e121 this looks more like ubode 2019-01-21 01:59:33 +00:00
UbitUmarov 81bb620d64 ubode try remove a legacy lock, that is nasty 2019-01-21 01:43:35 +00:00
UbitUmarov 3897774424 cosmetics on warp3d 2019-01-20 22:50:00 +00:00
UbitUmarov 0c38d52538 cosmetics on terrain patchs 2019-01-20 20:58:27 +00:00
UbitUmarov 3bfa278984 cosmetics 2019-01-20 02:02:24 +00:00
UbitUmarov 881cdc34b3 cosmetics 2019-01-20 00:19:40 +00:00
UbitUmarov 2060b70e5d reduce some delay on shutdown 2019-01-19 08:31:07 +00:00
UbitUmarov bef8ea8bcc mantis 8458: don't forget prims on search map on link/unlink 2019-01-19 07:09:39 +00:00
UbitUmarov cc19957e0a a few more changes to tp home 2019-01-19 00:24:38 +00:00
UbitUmarov 796a8efe25 a few changes to tp home 2019-01-18 22:18:49 +00:00
UbitUmarov fc075c61ed fix HG tp detection 2019-01-18 18:42:14 +00:00
UbitUmarov 04f44bcf99 mantis 8442 more changes to alpha blending (mono does not like last) 2019-01-18 03:02:39 +00:00
UbitUmarov 0c85517e9e update libomv with more changes to low level code 2019-01-17 21:50:07 +00:00
UbitUmarov b2810c4ca7 mantis 8442 more changes to alpha blending 2019-01-16 20:24:16 +00:00
UbitUmarov d8e5b7385e mantis 8442 change alpha blending note BREAKING CHANGEgit push! old scripts using alpha parameter != 255 on osSetDynamicTextureDataBlendFace, will be diferent 2019-01-16 00:29:56 +00:00
UbitUmarov 75d3e7a7a0 disable test not conform to new tp 2019-01-14 20:14:24 +00:00
UbitUmarov cc55cf3080 do HG as old protocol, needs deeper changes 2019-01-14 19:56:29 +00:00
UbitUmarov df14ed7d31 more on TP 2019-01-14 18:39:16 +00:00
UbitUmarov 3cf9a257f7 fix te media 2019-01-14 17:56:23 +00:00
UbitUmarov 31ec5dde45 test a change to TP protocol 2019-01-14 17:25:32 +00:00
UbitUmarov 8bb644159e a few more changes to texturesentry handling on libomv and os 2019-01-14 00:35:45 +00:00
UbitUmarov 4cfcf805b3 mantis 8448: remove silly typos from libomv 2019-01-11 17:26:33 +00:00
UbitUmarov ab35bf5b9d update libomv (fix bug on last) 2019-01-11 09:43:49 +00:00
UbitUmarov f7619b6ee0 update libomv 2019-01-11 04:06:34 +00:00
UbitUmarov 43f4eca67c mantis 8447: empty buttons list in llDialog now shows Ok button 2019-01-10 21:49:38 +00:00
UbitUmarov a1182cddd5 minor direct use of libomv changes 2019-01-10 18:52:08 +00:00
UbitUmarov c0c91f3773 file that depends on libomv changes 2019-01-10 18:24:29 +00:00
UbitUmarov a98b7fc389 update libovm 2019-01-10 18:20:46 +00:00
UbitUmarov 5bd16eaf9e mantis 8445: fix PackFixed(...) 2019-01-09 14:49:01 +00:00
UbitUmarov 7d9d862e8b fix irc protocol 2019-01-08 23:09:22 +00:00
UbitUmarov 47ae155f13 give a bit more time bf closing child agents 2019-01-08 18:07:10 +00:00
UbitUmarov ff8f70418b a few more changes to terraincompressor and libomv 2019-01-08 18:02:07 +00:00
UbitUmarov 2ccaf54a1f update libomv 2019-01-08 03:37:48 +00:00
UbitUmarov c37b2094ba cosmetics: terrain compressor is for 16m x 16m patchs only 2019-01-07 23:54:13 +00:00
UbitUmarov 59cfea73ca missing file 2019-01-06 20:15:30 +00:00
UbitUmarov 950b605b42 more changes on scenegraph etc 2019-01-06 20:10:43 +00:00
UbitUmarov 6e60917522 change its foreach 2019-01-06 02:23:49 +00:00
UbitUmarov 54b4523da8 let DoubleDictionary... also have a values array 2019-01-06 02:10:17 +00:00
UbitUmarov 3e49e13249 change scenegraph locking 2019-01-06 01:44:37 +00:00
UbitUmarov c5604d3857 similar to sps array in scenegraph 2019-01-06 01:23:08 +00:00
UbitUmarov f2b447a08f change mapandarray array update time 2019-01-06 00:47:32 +00:00
UbitUmarov be94a0bffa minor cosmetics 2019-01-05 23:39:39 +00:00
UbitUmarov fc4de64af4 fix reprio trigger on tp 2019-01-04 03:00:36 +00:00
UbitUmarov e79f266714 oops, thats elsewhere 2019-01-04 02:14:20 +00:00
UbitUmarov f58a106068 broadcast position updates after tp 2019-01-04 01:55:18 +00:00
UbitUmarov dd5717f7ae change cancel kill update flags 2019-01-04 01:12:59 +00:00
UbitUmarov d90b45f25e some viewers now also seem to need time bf closing child regions on TP 2019-01-04 00:12:22 +00:00
UbitUmarov 2ac6fb9ae9 allow landing under lower hight skyboxes 2019-01-03 23:11:39 +00:00
UbitUmarov c032724921 reduce tp close child agent delay time 2019-01-03 12:36:36 +00:00
UbitUmarov b24c669c16 more on the hack (runprebuild) 2019-01-02 16:44:13 +00:00
UbitUmarov 9c043fe414 mantis 8438: work around null ref 2019-01-01 13:16:35 +00:00
UbitUmarov 02492f7b15 replace my hack by others hack 2019-01-01 12:06:29 +00:00
UbitUmarov 813fda90da temporary HACK to not kill some viewers 2018-12-31 16:58:44 +00:00
UbitUmarov ae00623b65 lost in updates 2018-12-31 13:33:00 +00:00
UbitUmarov d841c593b9 add a bit more persistence (still mysql only) 2018-12-31 09:54:54 +00:00
Melanie d8ade44fe9 Put the virtual decls back in, they're needed by the freshly donated ...
... XStorage module that creates the XML for the new viewer, anod more.
It overrides them to know if new init XML needs to be cached.
2018-12-31 00:21:50 +00:00
UbitUmarov ffca7de65d add some persistence (mysql only) 2018-12-30 22:31:32 +00:00
UbitUmarov 24c4cf74c6 mantis 8436: fix lludp message 2018-12-30 19:00:43 +00:00
UbitUmarov 488e2bcde2 update libopenmetaverse 2018-12-30 16:15:35 +00:00
UbitUmarov 817b622b79 changes on updates 2018-12-30 02:41:13 +00:00
UbitUmarov cf89799c0b changes on updates 2018-12-29 23:03:03 +00:00
UbitUmarov b156378819 changes on updates 2018-12-29 19:04:39 +00:00
UbitUmarov 333aa0d67c changes on updates 2018-12-29 16:52:16 +00:00
UbitUmarov 7679617d52 change DBGSuids a bit, let it return uuid.zero in more fail cases, not killing region 2018-12-29 13:29:39 +00:00
UbitUmarov 4d3d9998a9 still pgsql 2018-12-28 23:16:05 +00:00
UbitUmarov 616fa8dbee sog GetLinkNumber() forget avatars that did standup 2018-12-28 21:26:07 +00:00
UbitUmarov 00278f7258 remove silly double locking 2018-12-28 21:12:19 +00:00
UbitUmarov 8d28c94879 PGSQL: it may be a good idea to also add the field to the table 2018-12-28 18:52:31 +00:00
UbitUmarov 650cef67d1 PGSQL: store vehicle data 2018-12-28 18:44:33 +00:00
UbitUmarov c14209e362 add some LSL 2018-12-28 14:40:51 +00:00
UbitUmarov 92b7dd27a3 missing file 2018-12-28 14:03:52 +00:00
UbitUmarov 4a73cc81dc now break several things at same time... sog/sop updates, threads options,... 2018-12-28 13:52:59 +00:00
UbitUmarov 0cf5876c45 update pbs 2018-12-28 13:28:25 +00:00
UbitUmarov 21728b3129 some retouchs on animationset code 2018-12-28 11:38:00 +00:00
UbitUmarov 47563564b7 update libopenmetaverse 2018-12-27 17:35:21 +00:00
UbitUmarov 810ab5f1a3 update OpenSimDefaults.ini 2018-12-21 16:10:31 +00:00
UbitUmarov 3a20ccb403 warp3d: add RenderMinHeight and RenderMaxHeight options, work on prims only for now 2018-12-21 15:51:12 +00:00
UbitUmarov 97747cd3d4 warp3d: try handle planar mapping 2018-12-20 23:27:18 +00:00
UbitUmarov b240de6aca remove spurius newline 2018-12-20 08:11:03 +00:00
UbitUmarov 23d03517a9 LINK_ALL_CHILDREN includes sitting avatars 2018-12-19 05:40:18 +00:00
UbitUmarov 5c998f6d60 let osGetPrimitiveParams also return sitting avatar informationg, if PRIM_LINK_TARGET points to one 2018-12-19 05:09:38 +00:00
UbitUmarov f03ee2f795 still another 2018-12-19 04:01:52 +00:00
UbitUmarov 3941c827cc oops 2018-12-19 03:52:43 +00:00
UbitUmarov 9e0a119f9b bug fixes 2018-12-19 03:27:54 +00:00
Stolen Ruby 551c097db9 Added support for f suffix on YEngine floats
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-12-18 21:36:20 +00:00
UbitUmarov 530a6a40ed mantis 8427: add new reject flags, change default, see mantis 2018-12-17 10:57:09 +00:00
UbitUmarov f94b6c3ead update url to 0.9.1.0 page 2018-12-16 21:22:45 +00:00
UbitUmarov 4d13b1db49 avoid sending garbage... 2018-12-16 20:46:51 +00:00
UbitUmarov 921364e877 several changes to last patch 2018-12-16 20:18:26 +00:00
fly-man- ed039a5fe0 Enables the buildin Caps ServerReleaseNotes
~ Dedicated to Quill Littlefeather ~

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-12-16 19:17:18 +00:00
UbitUmarov a2c200e659 Merge branch 'master' of opensimulator.org:/var/git/opensim 2018-12-13 15:39:00 +00:00
Melanie f31845ed8d Triggering a build / IRC message 2018-12-13 14:21:41 +00:00
UbitUmarov 18947d93fc actually disable osSetContentType on osslEnable.ini, so is only enabled by machine owner intentionally 2018-12-13 13:38:32 +00:00
UbitUmarov d6c9ddfdee cleanup last patch 2018-12-11 18:23:26 +00:00
Bill Blight 0881840946 Add osNpcSayTo(key npc, key target, integer channel, string message)
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-12-11 17:32:50 +00:00
UbitUmarov af2a9d9508 mantis 8420: ubOde awake up lazy body 2018-12-11 17:23:55 +00:00
Melanie 5e9fa5e7f5 Return a fake openid token to enable web services on a grid to identify the user 2018-12-11 15:09:06 +00:00
UbitUmarov 2059d548a6 minor changes on llSetContentType 2018-12-11 14:57:33 +00:00
UbitUmarov 2c2b887c8a change osSetContentType threat level 2018-12-11 14:55:32 +00:00
uriesk 34b7d7ec6e Remove OpenID cookie check (agni_sl_session_id) from *SetContentType Remove commented out second llSetContentType thats the same as osSetContentType anyway
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-12-11 14:18:55 +00:00
UbitUmarov 1610595697 Yengine reset global variables possible damaged by bad state file 2018-12-11 00:42:02 +00:00
UbitUmarov 11b467cabf Yengine actually loose the bas state file 2018-12-10 23:45:54 +00:00
UbitUmarov 6297717399 mantis 8419: TakeCopy now sends to objects; Take to a child of trash or lostandfound also, else goes to original folder 2018-12-10 06:23:38 +00:00
UbitUmarov 043a213302 pesty warning 2018-12-08 03:50:51 +00:00
UbitUmarov 6597b7ab46 Yengine try to better recover from invalid state files 2018-12-08 03:31:47 +00:00
UbitUmarov 295f24fe01 mantis 8416: change string compare method (actually on previus commit) 2018-12-08 02:36:59 +00:00
UbitUmarov f8c3fc5e05 mantis 8416: test 2018-12-08 02:26:36 +00:00
UbitUmarov 7b2b29d10d return a proper http error 2018-12-07 04:45:32 +00:00
UbitUmarov 144f353d50 remove a warning 2018-12-07 03:34:42 +00:00
UbitUmarov ede7f28184 disable GetAsset (ViewerAsset) cap. Current viewers implementation is not compatible with opensim 2018-12-07 03:31:38 +00:00
UbitUmarov 58b68aa5e9 fix compile putting back useless things until they are fully removed 2018-12-06 19:04:51 +00:00
UbitUmarov 66f46c6846 ubOde: slow down collision events to attachments 2018-12-06 18:50:42 +00:00
UbitUmarov d2bfe986bf GetAssets: only throttle mesh and texture 2018-12-06 02:28:26 +00:00
UbitUmarov deb0ab7400 GetAssets: we still need to service avatars that did left region 2018-12-04 21:56:39 +00:00
UbitUmarov 037de89a75 clean a bit 2018-12-03 13:51:45 +00:00
UbitUmarov 66f3c6c730 avoid a data copy 2018-12-03 10:39:54 +00:00
UbitUmarov 79234795fd avoid a data copy 2018-12-03 10:17:22 +00:00
UbitUmarov 57bd671e00 stats heap allocation rate can negative 2018-12-02 17:29:13 +00:00
UbitUmarov ca754b0156 avoid a data copy 2018-12-02 16:17:23 +00:00
UbitUmarov 7a4d8017d7 simplify a bit 2018-12-02 00:41:01 +00:00
UbitUmarov 9cb0c51483 cleanup 2018-12-01 23:18:48 +00:00
UbitUmarov 8c80572b02 comment some debug msgs 2018-12-01 23:17:45 +00:00
UbitUmarov 4ced4fed33 replace GetMeshModule and GetTextureModule 2018-12-01 23:13:24 +00:00
UbitUmarov 27dfdcf1fa clean a bit 2018-12-01 18:50:53 +00:00
UbitUmarov e08b43569e potencial mem leak 2018-12-01 18:49:30 +00:00
UbitUmarov 60bc64a90f LLSDxmlencode uint and ulong 2018-11-30 23:13:21 +00:00
UbitUmarov b783244a50 move http range parser to util 2018-11-30 23:10:29 +00:00
UbitUmarov 7554e62861 add a sound 2018-11-30 22:03:30 +00:00
UbitUmarov 0ba13b9b00 recover GetMesh2 cap 2018-11-30 12:28:37 +00:00
UbitUmarov cc7a241cbc remove xmr json functions that where a fix for ossl ones now removed 2018-11-29 21:07:46 +00:00
UbitUmarov 98b12278f0 fix CopyInventoryFromNotecard error handling 2018-11-29 20:21:25 +00:00
UbitUmarov 2eee87fea3 mantis 8414: add cap CreateInventoryCategory handler 2018-11-29 18:57:32 +00:00
UbitUmarov 47bc1fb257 OSSL remove functions with illegal lsl types, also redundante 2018-11-28 08:20:38 +00:00
UbitUmarov a99055160b YEngine no longer uses mono.tasklets 2018-11-27 17:47:37 +00:00
UbitUmarov aeba9c2394 oops fix vs2015 msbuild detection 2018-11-27 17:31:59 +00:00
UbitUmarov 834a8fac2f update DotNetOpenMail.dll 2018-11-27 14:11:43 +00:00
UbitUmarov c98f4d0158 remove unmaintaned and obsolete GlynnTucker.Cache 2018-11-27 13:40:09 +00:00
UbitUmarov 46defa5d31 change runprebuild.bat to not create compile.bat if msbuild for vs2017 or vs2017 not found 2018-11-27 13:02:12 +00:00
UbitUmarov cc6a02dd53 remove option vs2010 from runprebuild.sh 2018-11-27 11:28:33 +00:00
UbitUmarov 28171e1d10 change runprebuild.bat to try to find msbuild of most recent visual studio instaled for compile.bat 2018-11-27 11:20:39 +00:00
UbitUmarov 0307427b94 a few more changes 2018-11-26 20:20:28 +00:00
UbitUmarov 7258531e3b show prim ID on script error 2018-11-26 19:57:42 +00:00
UbitUmarov 27da6f1301 Yengine: simplify ossl severe error message, and make it on debug channel like Xengine 2018-11-26 19:44:32 +00:00
UbitUmarov 911ef0ce52 remove a ossl dev only option 2018-11-26 18:35:45 +00:00
UbitUmarov 87acd20d95 add script constant OS_APIVERSION, we should inc this on any change on any api. a few changes to os npc and avatar animation functions 2018-11-26 16:45:04 +00:00
UbitUmarov 1e76e14cce a fix to contributors list 2018-11-26 12:21:47 +00:00
UbitUmarov 28366f789e change HandlerDeRezObject again to account for out or order packets 2018-11-26 04:19:41 +00:00
UbitUmarov dc9f0d3627 change code feature that old compilers don't suport 2018-11-26 01:29:25 +00:00
UbitUmarov be2c0aa552 fix ossl severe error 2018-11-25 23:10:44 +00:00
UbitUmarov cded996265 remove a dev only conditional on lludp handlers; change parcel lists updates a bit; 2018-11-25 18:56:38 +00:00
UbitUmarov d179b2dda1 avoid data references stuck in packet pools 2018-11-25 18:38:37 +00:00
UbitUmarov 91986445a6 update contributors 2018-11-24 15:24:23 +00:00
UbitUmarov fa29db5552 Yengine: oops rename the var on all relevant places 2018-11-23 02:43:34 +00:00
UbitUmarov 590d7ccf43 try better handling of llupd DeRezObject 2018-11-23 02:09:35 +00:00
UbitUmarov 5dc20ad1e5 Yengine: rename a local var 2018-11-23 01:54:22 +00:00
UbitUmarov 56845d4b75 mantis 8411: fix send inventory item flags mask 2018-11-23 00:42:05 +00:00
UbitUmarov 5951152082 Yengine: try read XEngine state from wire 2018-11-22 01:11:35 +00:00
UbitUmarov fb0c8036f0 Yengine: use using... 2018-11-20 23:07:14 +00:00
UbitUmarov 3e5ca6efd6 Yengine: change script first line processing, also look to language option 2018-11-20 22:54:57 +00:00
UbitUmarov 5485ba2ae6 Yengine: do use SourceHashCode 2018-11-20 22:43:03 +00:00
UbitUmarov a2208e5c8c Yengine: remove some xmr API functions now added to OSSL 2018-11-20 22:32:07 +00:00
UbitUmarov 82415785fc bitbucket still does not like building.md 2018-11-20 18:17:55 +00:00
UbitUmarov cb1ebd1604 add osApproxEquals for float, vector and rotation, note that default margin is 1e-6 to match strings rounding 2018-11-20 18:12:18 +00:00
UbitUmarov c4a0e574c8 mantis 8410: llwhisper, llSay and llShout emit from the source prim not root 2018-11-19 14:07:48 +00:00
UbitUmarov cea34f7065 a few changes to README.md 2018-11-19 11:04:38 +00:00
UbitUmarov b71ec0f2d6 another change to building.md 2018-11-19 10:06:36 +00:00
UbitUmarov 67d5212d53 another change to Building md file 2018-11-19 02:26:08 +00:00
UbitUmarov 8474af04e1 removed repeated lines 2018-11-19 00:56:10 +00:00
UbitUmarov 2fb82f84d2 update osslEnable 2018-11-18 23:35:16 +00:00
UbitUmarov 5f2a76437e update script syntax 2018-11-18 22:45:53 +00:00
UbitUmarov 9dfb906666 add a few string functions to OSSL 2018-11-18 22:40:59 +00:00
UbitUmarov 01b84ef46b some cleanup 2018-11-18 22:39:08 +00:00
UbitUmarov 5b2fab99a6 update osslEnable 2018-11-18 19:45:22 +00:00
UbitUmarov ba87ba9c47 remove odd ossl function 2018-11-18 19:40:51 +00:00
UbitUmarov 9be4663d3c typos 2018-11-18 18:50:19 +00:00
UbitUmarov 65310f3e5e don't share SHA256CryptoServiceProvider (can be improved) 2018-11-18 01:01:39 +00:00
UbitUmarov a23be00bf3 ohh we have build instructions on git also ;) 2018-11-17 23:22:38 +00:00
UbitUmarov bbf1ed6727 code aesthetics 2018-11-17 21:15:36 +00:00
UbitUmarov 6e98272f0d code aesthetics 2018-11-17 20:46:09 +00:00
UbitUmarov ad99461590 code aesthetics 2018-11-17 20:43:16 +00:00
UbitUmarov cebe40f5cd ooops 2018-11-17 20:27:09 +00:00
UbitUmarov f6d4fadb0a a few more changes to pbs 2018-11-17 20:22:15 +00:00
UbitUmarov 87a723cbc8 code aesthetics and simplification 2018-11-17 18:52:16 +00:00
UbitUmarov 852e20a5a7 code aesthetics 2018-11-17 17:35:47 +00:00
UbitUmarov efd6fb05a9 code aesthetics 2018-11-17 17:05:28 +00:00
UbitUmarov 1f5169e636 code aesthetics 2018-11-17 16:04:55 +00:00
UbitUmarov d43eeb1d9d avoid a null ref on Bullet 2018-11-15 22:17:44 +00:00
UbitUmarov 9234613ed5 update script syntax 2018-11-15 20:49:15 +00:00
UbitUmarov 7bcef500a9 remove CM api, add replacement ossl functions, as i should had done on the merge of avination code contrib. (runprebuild) 2018-11-15 20:29:25 +00:00
UbitUmarov d537862cc2 Yengine: remove potencial log spam 2018-11-15 16:57:50 +00:00
UbitUmarov f44569eee5 Yengine: ignore llResetScript() in default state_entry like X does. No idea why some do it, but do 2018-11-15 01:24:46 +00:00
Kevin Cozens 54b4e7a3e3 Fixed spelling error (availble -> available) 2018-11-14 18:16:52 -05:00
Kevin Cozens 06fef1569b De-tabified OpenSim.ini and made trivial fixes to two comments. 2018-11-14 18:12:22 -05:00
UbitUmarov fad6295398 change ossl link sound functions to search for sound both on script host and target prims 2018-11-14 19:02:00 +00:00
UbitUmarov afb1d6cdd7 take friends out of basicDOSprot (too little, too late) 2018-11-14 17:49:05 +00:00
UbitUmarov 35f5d4449b take login service out of basicDOSprot (too little, too late) 2018-11-14 17:33:26 +00:00
UbitUmarov b48cbcbfdd simplify a bit some caps paths 2018-11-14 16:23:14 +00:00
UbitUmarov 942fd5e653 replace Enviroment response encoding ( runprebuild needed) 2018-11-14 15:34:12 +00:00
UbitUmarov a1a8b5f4a7 replace RemoteParcelRequest response encoding ( runprebuild needed) 2018-11-14 13:12:25 +00:00
UbitUmarov 48854ec83d some cleaup 2018-11-13 01:19:44 +00:00
UbitUmarov cc10cd2161 oops 2018-11-13 00:58:27 +00:00
UbitUmarov e4ed2d7d6c similar changes on CopyBundleToInventory 2018-11-12 23:53:20 +00:00
UbitUmarov 191b0888a2 a few changes to deattach object update 2018-11-12 23:21:08 +00:00
UbitUmarov d31854ee3c BuySell: a few changes on sell copy 2018-11-12 22:54:37 +00:00
UbitUmarov 7fcb3fdf11 FSAssets: truncate assets name and description to max size 2018-11-12 20:46:11 +00:00
UbitUmarov c28738a17f fix a http error response 2018-11-12 16:06:40 +00:00
UbitUmarov 64f8036d8f pesty warning 2018-11-12 11:22:39 +00:00
UbitUmarov c05598fe62 ubOde: remove support for old native ODE lib; make inplace terrain changes, if possible 2018-11-12 11:12:52 +00:00
UbitUmarov 9185d397df add a bit more things to ScriptSyntax, change a few more incoerent lsl types in function arguments 2018-11-10 21:00:04 +00:00
UbitUmarov 90db067d2a last commit was relative to mantis 8405 not 8396 2018-11-09 15:33:54 +00:00
UbitUmarov f9a2fbed83 mantis 8396: on access control, change viewer string to match so it does include the viewer name, not just version 2018-11-09 15:22:15 +00:00
UbitUmarov 492b9e3326 mantis 8035: fix number of prims use to be from all owned parcels 2018-11-08 21:52:16 +00:00
UbitUmarov fe63b4c97d fix unknown priority scheme setting error. Thx Ai Austin 2018-11-08 16:38:34 +00:00
UbitUmarov 72d9bbfafb some cleanup 2018-11-08 01:24:13 +00:00
UbitUmarov 31e49a7ab3 update ini files comments on InterestManagement 2018-11-08 01:14:32 +00:00
UbitUmarov ad8ddb8a78 changes to objects updates prioritizing getting dust on my disk. Schemes reduced to SimpleAngularDistance and BestAvatarResponsiveness 2018-11-07 20:32:39 +00:00
UbitUmarov afd3852a36 change region gettexture response if presence not found 2018-11-07 05:11:36 +00:00
UbitUmarov 41df4d7da4 remove some fire and forget methods missed file 2018-11-06 15:23:20 +00:00
UbitUmarov 3741abab7c udp threads don't need to be fg 2018-11-06 15:18:36 +00:00
UbitUmarov 2f07f96686 remove some fire and forget methods 2018-11-06 15:15:35 +00:00
UbitUmarov 6ea394467d if viewer asks for range reply in same format even if its full data 2018-11-06 15:09:49 +00:00
UbitUmarov 9e274ce64d fix typo 2018-11-03 11:52:41 +00:00
UbitUmarov 5b5e53aa1d we should only have one http poll service manager per instance 2018-11-03 11:43:47 +00:00
UbitUmarov 3e6342eb61 fix lsl http url pool service still not starting correctly 2018-11-02 02:25:53 +00:00
UbitUmarov 0aff4a2914 fix lsl http url pool service not beeing removed 2018-11-02 02:21:34 +00:00
UbitUmarov 1ea5116f00 forgot about lsl secure urls service.. so lets try another way for now (mantis 8382) 2018-11-02 00:08:34 +00:00
UbitUmarov 9e71b5575a only main http server listener should run events pool 2018-11-01 21:36:37 +00:00
UbitUmarov 292a9c9cd7 update httpserver.dll 2018-10-30 23:24:59 +00:00
UbitUmarov cf33e0440a reduce some threads priority 2018-10-28 14:43:14 +00:00
UbitUmarov a1d132d3ca let the syntax file include its id again 2018-10-25 02:36:36 +01:00
UbitUmarov a95397e8f5 update syntax file 2018-10-25 02:12:23 +01:00
UbitUmarov 7479638e88 remove a unnecessary scripts constants file 2018-10-25 02:06:44 +01:00
UbitUmarov 82a0fa7dfe update script syntax file 2018-10-24 17:29:31 +01:00
Bill Blight bd4907e960 Protect/Prevent user names from using valid HG identifiers.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-10-23 22:06:16 +01:00
UbitUmarov c643b4236f a few changes to last commit 2018-10-23 18:55:26 +01:00
Mandarinka Tasty 06a35b9559 llName2Key. Thanks to mewtwo0641 and watcher64.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-10-23 18:01:13 +01:00
UbitUmarov 7c8cf9f362 remove a dead module 2018-10-23 12:48:28 +01:00
UbitUmarov 601d965009 remove AttachmentsCommandModule 2018-10-23 12:27:08 +01:00
UbitUmarov cba65b1935 recover the inword region console comand Set AutoGrantAttachPerms 2018-10-23 11:02:16 +01:00
UbitUmarov d842f835a6 remove ThrottlePer100PrimsRezzed option, do not delay attachments with thread.sleep 2018-10-23 10:27:09 +01:00
UbitUmarov 050d53fe5b fix opensim.ini.examplewq coments on mutes module 2018-10-22 02:18:55 +01:00
UbitUmarov dd2fd3e4a0 fix wrong error message in mutelist connector 2018-10-22 02:06:56 +01:00
UbitUmarov fdb4fb3f3f update script syntax 2018-10-21 17:53:02 +01:00
UbitUmarov 495b22470d oops some code got in ahead of time 2018-10-21 12:41:28 +01:00
UbitUmarov 0986555765 mantis 8387: (try) avoid potencial out of order phys operations 2018-10-21 12:13:21 +01:00
lickx 94a5e5b9b7 Add non-transparent water asset
Used by all viewers when 'Transparent Water' is unchecked in the viewer
prefs

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-10-20 19:58:22 +01:00
UbitUmarov 4ca859b4fc mantis 8356: patched by hand, thx Lotek 2018-10-20 19:49:37 +01:00
UbitUmarov 56d5b3bf92 oops 2018-10-20 16:21:36 +01:00
UbitUmarov 47488c9017 change ossl tests setup 2018-10-20 16:01:26 +01:00
UbitUmarov 2c3522a826 ossl error messages are not from a agent 2018-10-20 15:38:50 +01:00
UbitUmarov d1d370ada3 avoid a null ref during jenkins tests 2018-10-20 15:35:04 +01:00
UbitUmarov 05b79e203d change ossl error report and NPC create error handling 2018-10-20 15:25:28 +01:00
UbitUmarov 8b5b251d1a mantis 8398: fix with previus commits; removed redundante code 2018-10-20 14:10:56 +01:00
UbitUmarov 2ea5f09ed3 Remove NPCs from UserManagement when removed 2018-10-20 14:07:01 +01:00
UbitUmarov 6d063785bd add RemoveUser to UserManagement 2018-10-20 14:04:11 +01:00
UbitUmarov e7d9fe966c fix groups v2 agentUUI ofr uuid.zero case 2018-10-20 14:00:13 +01:00
UbitUmarov f01e4600d1 double Ooopss 2018-10-20 02:06:05 +01:00
UbitUmarov 0611d3339b remove TempAttachments module 2018-10-20 01:00:55 +01:00
UbitUmarov d9018cf517 add a few more things to SrcriptSyntax 2018-10-20 00:21:40 +01:00
UbitUmarov 76f8a09bb3 LSLSyntax some cleanup 2018-10-19 19:37:13 +01:00
UbitUmarov 2886408a76 autogen LSLSyntax version uuid 2018-10-19 18:35:31 +01:00
UbitUmarov 4fae8d3d39 cap LSLSyntax was enabled by mistake 2018-10-19 04:06:47 +01:00
UbitUmarov 190e7433cc fix typos 2018-10-19 04:03:52 +01:00
UbitUmarov 6569f12d40 add initial test support for cap LSLSyntax. This does not seem to work for Opensimulator on viewers, In particular with FireStorm seems impossible to replace its own definitions, viwers do note revert to defaults on tp to a region that does not suport this cap, etc. So possible just a dead end. Disabled by default 2018-10-19 03:43:01 +01:00
UbitUmarov db255c97d6 fix AGENT_MALE lsl constant havinf same value as AGENT_AUTOPILOT 2018-10-18 23:15:58 +01:00
UbitUmarov 877a78ce91 change chattype on llRegionSayTo when sending to avatar viewer only.
Thanks Royale for pointing this
2018-10-18 15:04:54 +01:00
UbitUmarov 96acb48334 mantis 7391: deliver llregionSayTo to all scripts on prim that match target specs 2018-10-18 14:42:07 +01:00
UbitUmarov 235dd37b9c better have a lock 2018-10-08 18:53:30 +01:00
UbitUmarov 57ec0d3884 change caps get mesh and texture throttle 2018-10-08 17:29:42 +01:00
UbitUmarov 7eeaee631d avoid a null ref 2018-10-08 16:59:57 +01:00
UbitUmarov 87e97543d6 try to make inventory fetch tests happy 2018-10-07 01:36:47 +01:00
UbitUmarov eb5fe57a17 more use of simpler xml encoder on inventory fetch, plus other cosmetics 2018-10-06 23:47:56 +01:00
UbitUmarov 1bcdcc2419 mantis 8384: try to fix bullet heimap managed memory sharing with unmanaged lib 2018-10-03 21:17:23 +01:00
UbitUmarov 57ae99b113 missed new c# version only code 2018-09-30 05:39:58 +01:00
UbitUmarov 0f1bc23039 a few changes to last patch 2018-09-30 05:11:34 +01:00
Mandarinka Tasty 5751add537 Implementation-and-design-of-ClientOnParcelGodMark
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-09-30 04:36:39 +01:00
UbitUmarov 8812684355 minor changes 2018-09-29 21:40:52 +01:00
Bill Blight 6d9de17d77 **CONFIRMED**AGAIN** , Add new function, osSetOwnerSpeed(float speed), threat level moderate
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-09-29 21:16:33 +01:00
UbitUmarov ed0e2623b9 add a few more gc collect in some spots 2018-09-29 17:42:12 +01:00
UbitUmarov 5a0c9c2fcf more on culture issues 2018-09-27 19:04:11 +01:00
UbitUmarov 37dcb8722c make sure Culture is right on some spots 2018-09-26 22:32:34 +01:00
UbitUmarov a5d6a394ef mantis 8372: replace XMLRPC.dll with utf8 fix 2018-09-17 15:12:02 +01:00
UbitUmarov 391edb862e stop sending agent update again when destiny refused the agent 2018-09-15 00:44:10 +01:00
UbitUmarov e96e923159 some teleport issues.. 2018-09-14 21:54:38 +01:00
UbitUmarov 075ebf3524 fix osDie harakiri for Yengine 2018-09-13 12:32:55 +01:00
UbitUmarov 4652f8b84f pesty warning 2018-09-13 11:38:28 +01:00
UbitUmarov ca404e5001 some cleanup 2018-09-12 13:48:29 +01:00
UbitUmarov cd9327cd8b Merge branch 'master' of opensimulator.org:/var/git/opensim 2018-09-12 13:24:01 +01:00
Melanie e874e3a2ad Merge branch 'master' of opensimulator.org:/var/git/opensim 2018-09-12 13:22:17 +01:00
Melanie 39e82cb043 Squelch "connection reset by peer" exceptions 2018-09-12 13:13:11 +01:00
UbitUmarov 714f4387b8 fix a error message 2018-09-11 10:31:02 +01:00
UbitUmarov f466c56ba4 oooops 2018-09-08 07:39:14 +01:00
UbitUmarov ca9651df0d Yengine cast issue 2018-09-08 04:58:14 +01:00
UbitUmarov 0d93d5ce69 fix script secure llhttlrequest 2018-09-08 04:46:02 +01:00
UbitUmarov e6615a193d a few changes to ScriptSleep() functions 2018-09-04 22:19:30 +01:00
mewtwo0641 4e4d687f3f Add YEngine support for ScriptDelayFactor
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-09-04 21:38:09 +01:00
UbitUmarov 50627304a6 avoid using new c# sintaxe that will fail on older compilers 2018-08-30 20:09:12 +01:00
UbitUmarov 9647a1e6c5 minor changes to last patch 2018-08-30 14:51:07 +01:00
Mandarinka Tasty 99a23421a8 Adding check permission CanIssueEstateCommand for osRegionNotice and new function osRegionNotice(string agentID, string msg)
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-08-30 14:25:19 +01:00
UbitUmarov 7120ffbc08 add the Smoke texture to Opensim Library 2018-08-28 21:51:59 +01:00
UbitUmarov e075b349ce new try on smoke texture 2018-08-27 15:12:24 +01:00
Fly Man d9028ac07f Adjusted Smoke texture
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-08-27 11:51:03 +01:00
UbitUmarov 9f3c803552 avoid potencial null refs 2018-08-26 08:40:35 +01:00
UbitUmarov 7c60e83f30 don't shutdown robust twice 2018-08-26 08:37:30 +01:00
UbitUmarov 58ba645160 mantis 8273 make change on crossings coerent 2018-08-26 03:11:32 +01:00
UbitUmarov 14f55ab36e fix smoke asset filename 2018-08-26 01:33:49 +01:00
UbitUmarov 10e4d01375 remove a comment 2018-08-26 01:01:17 +01:00
fly-man- d3d915ce3c Patching in the Smoke for Mantis 8242
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-08-26 00:54:32 +01:00
UbitUmarov 88d638a0cf mantis 8349: fix landmasks 2018-08-07 20:38:58 +01:00
UbitUmarov 390cb703f3 and some more guard try{}catch{} on ub mesh processing 2018-07-29 23:31:38 +01:00
UbitUmarov a6d5da3e7f mantis 8346: fix argument of osUnixTimeToTimestamp 2018-07-27 14:20:59 +01:00
UbitUmarov 1b5c6c48f9 make BanLineSafeHeight option visible in OpenSimDefaults.ini 2018-07-21 18:36:29 +01:00
UbitUmarov e15fca60d1 mantis8342: make max ban height above ground configurable per regions instance with ini file option BanLineSafeHeight 2018-07-21 18:31:58 +01:00
UbitUmarov 8c1c9129aa mantis8341: fix MOD and LS apis configuration read from ossl file 2018-07-18 22:19:46 +01:00
UbitUmarov 9278a9a9dd http reusecontext is obsolete 2018-07-14 22:35:51 +01:00
UbitUmarov 81fb1b008f http reusecontext is obsolete 2018-07-14 21:51:43 +01:00
UbitUmarov aee981e5e2 http reusecontext is obsolete 2018-07-14 21:48:59 +01:00
UbitUmarov ee2eed8c6f http reusecontext is obsolete 2018-07-14 21:42:07 +01:00
UbitUmarov 01400e38d5 typos 2018-07-14 18:41:13 +01:00
UbitUmarov 0daa4eff8a minor cleanup 2018-07-14 17:07:30 +01:00
UbitUmarov ee6f261415 a few changes about test mesh uploads 2018-07-14 17:01:50 +01:00
UbitUmarov dd508d4c4f use Vector.Distance not util.. 2018-07-14 16:58:09 +01:00
UbitUmarov 282877a454 save a sqrt call 2018-07-14 16:47:51 +01:00
UbitUmarov dd67ab6025 change the scope of those options variables 2018-07-14 16:42:10 +01:00
UbitUmarov a4881797b9 add options for regions to ignore age < 18 and payment access control where they don't apply 2018-07-14 16:36:41 +01:00
UbitUmarov 6b8fda098d recover lost null check in last commit 2018-07-14 16:11:03 +01:00
UbitUmarov 0731220a9d change bitmasks work 2018-07-14 15:21:59 +01:00
UbitUmarov 8ab5a87520 only resize if need 2018-07-14 15:19:09 +01:00
UbitUmarov 84235900b2 do not use lossless compression on dyntextures 2018-07-14 15:13:21 +01:00
UbitUmarov ef8097f998 add missing xml escape 2018-07-14 14:46:08 +01:00
UbitUmarov ea815df6bd add a disabled log 2018-07-14 14:43:20 +01:00
UbitUmarov 6f4052561e send data as bin not string to http lower level 2018-07-14 14:39:29 +01:00
UbitUmarov f9c9dc585c have default ids of avatar alpha and tattoo 2018-07-14 14:27:33 +01:00
UbitUmarov f17b48e73e some cleanup 2018-07-14 14:22:52 +01:00
UbitUmarov 770f59ff87 drop compatibility with old robust that did not suport inventoryService.GetMultipleItems 2018-07-14 14:09:56 +01:00
UbitUmarov c7baee1638 add using into a few more places 2018-07-14 14:05:47 +01:00
UbitUmarov d7a9195078 missed one 2018-07-14 02:12:51 +01:00
UbitUmarov 519d320e3c update ini.example files 2018-07-14 01:10:59 +01:00
UbitUmarov 8ed4bee521 mantis 8333: kept idea but my own code. With ini setting ConsoleHistoryTimeStamp set to true, the console history file will have timestamps. Im lazy date is in en-us culture for now. (robust also) 2018-07-14 00:46:47 +01:00
UbitUmarov a235a28132 minor changes to last patch 2018-07-13 23:03:26 +01:00
fly-man- 334986ddc6 Group Powers changed and Officers role brought back for Groups
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-07-13 22:12:19 +01:00
UbitUmarov 3cea21ab63 mantis 8335: fix string format 2018-07-11 18:26:17 +01:00
UbitUmarov e52bc6b575 Mantis 8308: update libopenjpeg-dotnet-2-1.5.0-dotnet-1.dylib adding missing 64bit support. Built with the macOS 10.13 SDK on Xcode 9.4.1. Thanks Gavin Hird for providing us this. 2018-07-11 12:09:59 +01:00
UbitUmarov ee115a83df Bug fix: Object Wear was doing Add not replace 2018-07-11 03:08:57 +01:00
UbitUmarov c3933ce8b9 replace some string tests 2018-07-08 13:41:55 +01:00
UbitUmarov 60644b440b we don't use tab simbol, we use 4 whitespaces 2018-07-08 13:26:41 +01:00
Vincent Sylvester 6e3f934c4b Add mac banning
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2018-07-08 13:05:47 +01:00
UbitUmarov 102fbf8422 update contributors 2018-07-07 16:44:08 +01:00
UbitUmarov 18cc36cf41 update contributors 2018-07-07 16:22:24 +01:00
Kevin Cozens e5238cadf7 Back-end fix for region name searches made from the viewer grid map dialog.
GetRegionsByName now returns names that include, but don't start with, the
given search string.
2018-07-06 21:28:18 -04:00
UbitUmarov 8ac69a5d27 just remove the test instead 2018-07-06 02:23:06 +01:00
UbitUmarov 834a0e8b6d fix version string size test 2018-07-06 01:57:59 +01:00
UbitUmarov 6da07ded04 let OpenSim.ini.example be closer to functional standalone ini 2018-07-05 22:34:08 +01:00
UbitUmarov 5e1bf88875 test jenkins 2018-07-05 20:27:52 +01:00
UbitUmarov 91247e0631 test 2018-07-05 02:29:56 +01:00
UbitUmarov 39c8db8eb1 ubOde change terrain min height to -100m. Maybe this way a viewer dev mays fix rendering below 0m, like making them think z = 1m for that purpose, for example 2018-06-27 23:14:26 +01:00
UbitUmarov c53658248a reassign estate setting TaxFree to the role of AllowAccessOverride, as viewers did. Keeping name to reuse dbs entries, etc. let viewers change it, but still NOP 2018-06-19 01:18:18 +01:00
UbitUmarov 9b87626cdb mantis 8329: don't fail if response stream is Chunked encoded and http debuglevel >=5 2018-06-18 01:04:26 +01:00
UbitUmarov 31633699cf mantis 8327: refix minor typos 2018-06-16 16:01:09 +01:00
UbitUmarov c3d2f2d119 mantis 8327: fix minor typos 2018-06-16 14:18:05 +01:00
UbitUmarov ba193fc606 minor cleanup 2018-06-16 14:11:44 +01:00
UbitUmarov 76a82ba5de improve llOverMyLand() handling of potencial null refs. ty mrieker 2018-06-09 20:45:05 +01:00
UbitUmarov a48d65fd77 Yengine apply a fix to CheckRunLockInvariants by mrieker 2018-06-09 20:35:35 +01:00
UbitUmarov 3b2786d27e change MaxRegionsViewDistance description a bit 2018-05-28 15:21:51 +01:00
UbitUmarov 83029042d3 ok ok it only has one 't' 2018-05-28 10:09:37 +01:00
UbitUmarov 629eeca836 english typo, thx you know who 2018-05-28 09:48:14 +01:00
UbitUmarov 5463bffa68 make Yengine post attach event as Xengine does. This should fix that event. Thx mrieker for pointing out this issue 2018-05-28 09:25:09 +01:00
UbitUmarov 458fe42afd fix some cases in prim number of sides 2018-05-27 01:54:05 +01:00
UbitUmarov e0b2ee80f9 fix a bug on warp3d.dll 2018-05-26 23:03:27 +01:00
UbitUmarov d5117b6cf7 update warp3d.dll 2018-05-26 19:32:37 +01:00
UbitUmarov 007adce081 missing updated files 2018-05-26 19:02:09 +01:00
UbitUmarov f6765b8668 use RegionInfo.ServerURI to report region url on datasnapshot 2018-05-26 05:43:55 +01:00
UbitUmarov 57fb1ea9df stale LandSnapshot by time also, so dwell can be updated 2018-05-26 04:58:44 +01:00
UbitUmarov 7c50651cd1 add a check to data_exposure option of DataSnapshot module 2018-05-26 03:35:56 +01:00
UbitUmarov 8f0f102869 fix one english typo 2018-05-26 03:18:53 +01:00
UbitUmarov 631308a1d1 map... 2018-05-18 05:31:45 +01:00
Kevin Cozens c7f3f3586d Warp3D tried to do something in RegionLoaded even when the module was disabled 2018-05-16 14:29:45 -04:00
Kevin Cozens 1ea71c6182 Whitespace changes 2018-05-16 14:29:10 -04:00
UbitUmarov 06d6c4abda breaking map a bit more... 2018-05-15 23:56:12 +01:00
UbitUmarov f87219975d bug fix: avoid null ref on trigger soundi if source is a avatar 2018-05-15 00:56:31 +01:00
UbitUmarov 570440256b avoid potencial out of range issues 2018-05-13 03:09:56 +01:00
UbitUmarov fbb77274da OOps my bad, always do deep copy, let viewers do v1 v2 fixes 2018-05-12 21:35:25 +01:00
UbitUmarov 468b25ff69 let wearables check command suport variable number of wearables 2018-05-12 19:57:55 +01:00
UbitUmarov 0d83b9edc3 create user with model: do not copy missing items; convert v1.0 to v2.0 wearables, fail if model has missing wearables 2018-05-12 19:16:23 +01:00
UbitUmarov cf1ea3b093 breaking map (warp3d) suport default map parameters. Planar not suported ( will render as deafaul 2018-05-08 16:58:15 +01:00
UbitUmarov f7475d4a98 breaking map (warp3d)... 2018-05-08 07:01:38 +01:00
UbitUmarov 4837a8a8fa breaking map (warp3d); remove warp3d viewport code not realy used and confusing my last neuron 2018-05-07 17:29:19 +01:00
UbitUmarov fd426354f1 breaking map (warp3d) 2018-05-07 06:08:54 +01:00
UbitUmarov ea5d40f7f2 breaking map (warp3d) 2018-05-07 03:56:53 +01:00
UbitUmarov 00cc17c239 breaking map (warp3d) 2018-05-06 23:28:36 +01:00
UbitUmarov b91c0f0d01 remove some debug lines 2018-05-06 18:04:56 +01:00
UbitUmarov 0467b6dc3b change the AverageTextureColorOnMapTile default to false 2018-05-06 17:50:07 +01:00
UbitUmarov dffa628966 break nap a bit more, add options ExportMapAddScale, ExportMapAddRegionName and (warp3d) AverageTextureColorOnMapTile 2018-05-06 17:32:03 +01:00
UbitUmarov bf0ece8061 fix warp3d textures UV 2018-05-05 04:27:41 +01:00
UbitUmarov 020f34f75b a few more changes to warp3d and export-map 2018-05-05 02:50:27 +01:00
UbitUmarov a91ef313ef change warp3d terrain rendering, so it does cover all area 2018-05-05 00:49:57 +01:00
UbitUmarov 09ae675d28 Merge branch 'master' into httptests 2018-05-04 23:01:53 +01:00
UbitUmarov acd55c6f12 mantis 8084: add the missing PRIM_ALPHA_MODE constants 2018-05-04 20:15:56 +01:00
UbitUmarov 7838689dda why where map and dynamic textures compressed lossless? 2018-05-04 16:59:11 +01:00
UbitUmarov 9ae3452e03 change region console comand export-map: make it work with var regions, center target region and make the display area be the region size plus MaxMaxRegionViewDistance in all 4 directions. Add the region name and total area size text info. Some of this can be made options/comand arguments in future improvements 2018-05-01 16:01:11 +01:00
UbitUmarov 26ecba48f0 Merge branch 'master' into httptests 2018-04-28 12:45:32 +01:00
Kevin Cozens bf175d1f01 Added important comment missed from my previous commit (hash 8af2d99b). 2018-04-27 22:03:54 -04:00
Kevin Cozens 16c72dce5d Whitespace change. 2018-04-27 20:15:39 -04:00
UbitUmarov 76c4296e39 remove a extra source line i left behind 2018-04-27 22:38:27 +01:00
UbitUmarov c6c386cd80 recover previus behavior of FontProp 2018-04-27 22:30:47 +01:00
Kevin Cozens 8af2d99ba9 Do dispose and new Font only once when handling FontProp drawing command. 2018-04-27 16:48:35 -04:00
UbitUmarov f29358744d fix http keep alive header 2018-04-20 09:23:30 +01:00
UbitUmarov 037e5d8031 save a few ns 2018-04-19 19:21:08 +01:00
UbitUmarov ad0b736405 reduce debug logs 2018-04-19 19:11:50 +01:00
UbitUmarov 79ec9d2887 use seconds version of gettimestamp 2018-04-19 19:08:28 +01:00
UbitUmarov 728040ab47 a few minor changes 2018-04-19 18:58:51 +01:00
UbitUmarov fced731e70 save a few ns on lsl vector rotations 2018-04-14 23:34:16 +01:00
UbitUmarov 7c9c5cfedf robust create user: allow new userid to be to generate a new random one; handle possible case of a weareble being a inventory link 2018-04-14 23:05:46 +01:00
UbitUmarov 90482182e5 sound radius: missing file 2018-04-10 22:24:48 +01:00
UbitUmarov ca7bd13dee sound radius is a prim prop only set by llSetSoundRadius, fix it in case viewers do fix its use (ignored for now) 2018-04-10 21:45:11 +01:00
UbitUmarov dc35ce26d0 YEngine: apply a few fixes by Mike Rieker 2018-04-10 21:15:55 +01:00
UbitUmarov 63418349e5 mantis 8275: fix llStopSound for llPlaySound. Code was doing as SL wiki but not as not real regions with FireStorm. Singularity will only stop loop sounds. None stops Trigger 2018-04-10 07:27:10 +01:00
UbitUmarov 5d0a1656bf mantis 8305: add osTriggerSoundLimited(..) 2018-04-10 03:58:54 +01:00
UbitUmarov 8a30d1303d some cleanup on ll sound functions 2018-04-09 00:48:29 +01:00
UbitUmarov 81431e90de update osslEnable.ini with the new functions 2018-04-09 00:23:23 +01:00
UbitUmarov 63da4d3f99 mantis 8305: add several ossl sound funtions that accept a link number for the prim associated to that sound. The link number must point to a single prim 2018-04-09 00:15:45 +01:00
UbitUmarov 996de5eaf1 .. and yes i forgot a file.. again :( 2018-04-06 17:00:58 +01:00
UbitUmarov 75c5821dfa remove GCnotify(). It is wrong in many ways and has no use. GC now does provide more correct ways of getting warning of when its about to happen, but writing to a log file on that is NOT something to do. 2018-04-06 16:56:49 +01:00
Kevin Cozens 6accf854a7 Added references to new math related OSSL functions 2018-04-04 16:44:46 -04:00
UbitUmarov 80c7ffeb29 fix the comment about return value of osAngleBetween() its 0 to PI 2018-04-04 01:25:49 +01:00
UbitUmarov e031d79d48 add auxiliar functions float osVecMagSquare(a), float osVecDistSquare(vector a), float osAngleBetween(vector a, vector b) and float osRound(ffloat value, integer ndigits) 2018-04-03 23:00:37 +01:00
UbitUmarov 86d8f2af5b try fix git 2018-04-01 02:26:08 +01:00
UbitUmarov a8308e2a13 coment out a debug line 2018-04-01 02:19:53 +01:00
UbitUmarov ee6034f751 several changes to materials, add llSet*PrimtiveParams*() support for them. They may be very broken now :( 2018-04-01 01:50:07 +01:00
UbitUmarov f5365cb06d Merge branch 'master' into httptests 2018-03-28 04:29:39 +01:00
UbitUmarov b1569d09bf Merge branch 'master' into httptests 2018-03-27 20:01:55 +01:00
UbitUmarov 20d221a963 Merge branch 'master' into httptests 2018-03-27 16:08:34 +01:00
UbitUmarov e733bfb3b5 fix merge issue 2018-03-20 10:09:22 +00:00
UbitUmarov 1363a95840 Merge branch 'master' into httptests 2018-03-10 22:09:56 +00:00
UbitUmarov 0341b46279 Merge branch 'master' into httptests 2018-03-10 20:51:38 +00:00
UbitUmarov 2369ce413d Yengine: only retry compile if there was a object file in cache with wrong version or signature 2018-03-09 22:44:58 +00:00
UbitUmarov 2dc49dc1e9 remove a unnecessay file check 2018-03-09 21:42:14 +00:00
UbitUmarov c723a1be16 Yengine temp file delete was still bad in case of script errors 2018-03-09 21:33:39 +00:00
UbitUmarov cf5ec5d29c Merge branch 'master' into httptests 2018-03-05 21:04:40 +00:00
UbitUmarov c408f0a38e Merge branch 'master' into httptests 2018-03-05 20:57:13 +00:00
UbitUmarov befe1ad4be fix some LSL functions to return type Key as they should and not string 2018-03-05 17:02:07 +00:00
UbitUmarov dc5cd9a3ae Merge branch 'master' into httptests 2018-03-05 16:39:17 +00:00
UbitUmarov 5ff57f01b7 Yengine: change filename extentions on scripts state (better delete contents of bin/scriptengines/yengine .. btw bin/scriptdata is not used anymore ) 2018-02-25 00:49:44 +00:00
UbitUmarov 85b973ce1d Y(xmr)engine cosmetics... 2018-02-25 00:18:41 +00:00
UbitUmarov 2f94fa4dc7 Yengine fix its section name on opensim.ini.example 2018-02-23 17:59:30 +00:00
UbitUmarov f158867d93 Yengine replace xmr by yeng on console comands 2018-02-23 15:28:05 +00:00
UbitUmarov 2129d941ac rename XMREngine as Yengine (still not all done), big mess source formating changes, move state files to proper folder, fix a source file locking on errors, more changes for cross platform including from Mike,... yes yes i know a messy commit 2018-02-23 14:52:34 +00:00
UbitUmarov 756fbf324a Merge branch 'master' into httptests 2018-02-22 02:50:59 +00:00
UbitUmarov 4a982adb02 Merge branch 'master' into httptests 2018-02-21 15:30:25 +00:00
UbitUmarov 9a73a39989 Merge branch 'master' into httptests 2018-02-18 14:05:57 +00:00
UbitUmarov 467b591f3a COmment out relocation of tmp cs source file during compilation. This seems to cause issues on same win servers, and is only usefull on deep scripts debug (Xengine compiler) 2018-02-18 13:55:19 +00:00
UbitUmarov 01ceb4d17e try to fix xmr on multiregions per instance. Ugly spargetti ...; remove fixes for 2 llparcel functions that should not be needed; remove xmr own API, it has no business having one. 2018-02-07 19:52:18 +00:00
UbitUmarov cddb848c13 add a warning about XMR only suoprting one region per instance at this point, it was never made to suport more 2018-02-07 18:38:37 +00:00
UbitUmarov 53a910e3e5 some more code from mrieker for system threads, give up of all the other mono dependent theading models only availble for linux (and possible not all platforms). This only has impact on micro-threading switching, and this only happens on long events and only every 60ms, aditionally we do remove a totally extra set of threads (that could grow in a uncontroled way on win) and their hanshake with main ones. This may of course be even more broken now :P 2018-02-07 10:26:20 +00:00
UbitUmarov aa2c710c57 due credits even if code goes away 2018-02-05 12:52:46 +00:00
UbitUmarov 38cd12b3cf add mrieker fresh optimization on heap tracker 2018-02-05 12:48:07 +00:00
UbitUmarov a7e2978db9 fix log4net for .net4.6 2018-02-04 02:51:40 +00:00
UbitUmarov b1226609a1 Merge branch 'master' into httptests 2018-02-04 00:17:36 +00:00
UbitUmarov 617d76697d make XMR script cache location option visible 2018-02-03 21:18:32 +00:00
UbitUmarov 73177f2afa some new code got in ahead of its time 2018-02-03 20:50:06 +00:00
UbitUmarov 42d07e283f pesty warnings 2018-02-03 20:37:36 +00:00
UbitUmarov e7e8a7ab4d just DIE damm thread (recent monos issue) 2018-02-03 19:34:17 +00:00
UbitUmarov 04a8ec518d XMR: there is no need for a slice thread, it also causes timing issues; BelowNormal mb 2 Below on win; cosmetics 2018-02-03 08:08:59 +00:00
UbitUmarov 20ca517887 update opensim.ini.example with XMRengine information 2018-02-02 13:04:45 +00:00
UbitUmarov 83e2fee71b add experimental script engine XMRengine donated by mrieker (DreamNation) And our Melanie. ***DANGER*** ***TESTONLY*** ***disable HG*** dont leave running when not looking... tp/crossing to Xengine will reset scripts. i do see a few issues but should be testable, so we can decide if we should invest more on it. 2018-02-02 12:49:40 +00:00
UbitUmarov c70b77a528 Merge branch 'master' into httptests 2018-02-02 11:49:43 +00:00
UbitUmarov c889eb64e5 let ossl have its own config section 2018-02-02 03:50:43 +00:00
UbitUmarov 5ae09e03aa remove a duplicated field 2018-02-01 03:16:32 +00:00
UbitUmarov 3635943d39 remove cap FetchLib2 suport code 2018-01-31 15:19:16 +00:00
UbitUmarov 35d1642889 disable the new Cap_FetchLib2 because viewers do not suport it for opensim. To decide when to use it, they use a hardcode LL owner ID on same code paths, while on others just compare owner to the agent. This makes suport for this cap impossible" 2018-01-31 14:55:01 +00:00
UbitUmarov 4381f16e18 keepalive is default 2018-01-30 08:15:42 +00:00
UbitUmarov 4d051f3acb add missing folders version 2018-01-30 01:37:24 +00:00
UbitUmarov 5548b66dc0 a few more changes on inventory library and inv fetch 2018-01-30 01:07:24 +00:00
UbitUmarov 4c65bb4196 a few more changes on inventory library and inv fetch 2018-01-27 18:09:44 +00:00
UbitUmarov f89b2379a0 add a few more encoding to LLSDxmlEncode.. (W or S ?) 2018-01-27 05:35:40 +00:00
UbitUmarov 13b4ce8199 add Cap_FetchLib2 note that this is still local to regions, not using grid as it possible should, but this needs more work, and issue with HG older grids/regions 2018-01-27 04:32:03 +00:00
UbitUmarov 3dbdacf31f Let MrOpenSim have simple hardcoded profile 2018-01-26 21:12:23 +00:00
UbitUmarov 6978181075 Robust: allow Library assets to override old ones, so they can be updated easily from the xml files keeping same id (left FSAssets out) 2018-01-26 21:04:46 +00:00
UbitUmarov 5e3eb8b370 Merge branch 'master' into httptests 2018-01-26 16:29:15 +00:00
UbitUmarov 98019031df got tired of creating stringbuilders 2018-01-25 09:06:39 +00:00
UbitUmarov cdd3ef857c a few changes to encoder and a few more uses 2018-01-25 08:02:45 +00:00
UbitUmarov 266eabcad4 add a low level LLSDxml encoder for cases where it makes no sense to use more heavy things like OSD, and use it on displaynames 2018-01-25 06:50:49 +00:00
UbitUmarov 3aff72e403 change DataSnapeShoot init again. May still fail on multi regions instances 2018-01-25 00:55:34 +00:00
UbitUmarov 22666ad18a cleanup a bit more 2018-01-24 11:43:42 +00:00
UbitUmarov fc224b444a avoid some large unnecessary strings 2018-01-24 10:02:18 +00:00
UbitUmarov 5a246026a0 let MinHeap self trim on empty; cleanup 2018-01-24 04:48:10 +00:00
UbitUmarov e7b834874e another change to httpserver dll 2018-01-24 04:12:27 +00:00
UbitUmarov c87585ad96 simplify http bycontext key 2018-01-24 03:12:56 +00:00
UbitUmarov 3f7ffc12c4 reduce max keepalime time to 60s 2018-01-24 03:10:11 +00:00
UbitUmarov cf3d3f4f4a move datasnapshot notification to last, but still a issue with very fast service servers 2018-01-22 23:51:15 +00:00
UbitUmarov a67b523acf Merge branch 'master' into httptests 2018-01-22 21:44:05 +00:00
UbitUmarov b164925262 Ooops 2018-01-22 20:07:59 +00:00
UbitUmarov e326792aa3 move datasnapshot notification to when region is actually loaded 2018-01-22 19:56:40 +00:00
UbitUmarov 9e4bf3439c change throtle datasnapshot get 2018-01-22 19:50:07 +00:00
UbitUmarov efc7480342 throtle datasnapshot gen 2018-01-22 18:37:39 +00:00
UbitUmarov e3fc272f50 missing files.. 2018-01-22 17:27:40 +00:00
UbitUmarov d38161f83d retire our BlockingQueue replaced by BlockingCollection and cross fingers 2018-01-22 17:09:38 +00:00
UbitUmarov 437369778d give BlockingCollection more chances 2018-01-22 02:42:50 +00:00
UbitUmarov d4a5454f3c give BlockingCollection more chances 2018-01-22 00:43:33 +00:00
UbitUmarov 73b587989c give BlockingCollection more chances 2018-01-22 00:24:29 +00:00
UbitUmarov 855dcda9c3 give BlockingCollection another chance 2018-01-21 21:02:07 +00:00
UbitUmarov ccdaebaed6 give concurrentqueue another chance 2018-01-21 20:22:28 +00:00
UbitUmarov 0dbed94e13 no need to set MuteListsService twice 2018-01-21 20:09:56 +00:00
UbitUmarov cb5a7246a2 cosmetics (or not) 2018-01-21 16:40:58 +00:00
UbitUmarov 56535cdb47 change version numbers back to 0.9.1.0 2018-01-20 13:30:15 +00:00
UbitUmarov 49b4408782 some cleanup 2018-01-20 12:11:07 +00:00
UbitUmarov ccd47d0cf1 improve LLSDHelpers DeserialiseOSDMap 2018-01-20 10:43:19 +00:00
UbitUmarov e32efe5d22 add sqlite files for mutes module ( done only minimal tests) 2018-01-20 07:09:37 +00:00
UbitUmarov c34f07b6f3 silent ignore mutes on HG visitors, let viewers do it on cache only, proper HG suport is another story... and questionable 2018-01-20 01:28:00 +00:00
UbitUmarov e89f1e635b fail to connect to estates service is a fatal error 2018-01-18 13:04:05 +00:00
UbitUmarov a7db6d3097 Ooops worng ';' 2018-01-18 08:11:42 +00:00
UbitUmarov dd491bba57 abort uploading large region map tiles as soon one fails 2018-01-18 04:28:05 +00:00
UbitUmarov 0a81e35697 pesty warning 2018-01-18 02:53:00 +00:00
UbitUmarov a6e0ba262a iStackTrace(targetThread, true) is no longer safe on windoes also 2018-01-18 02:40:59 +00:00
UbitUmarov 20f3c46b78 NDesk.options .net4.6 2018-01-18 01:18:10 +00:00
UbitUmarov 389e54214d pesty warnings - run prebuild needed 2018-01-18 00:24:51 +00:00
UbitUmarov 4b1a153cfb pesty warning 2018-01-18 00:02:29 +00:00
UbitUmarov 0ad6ba11fe pesty warning 2018-01-17 23:55:30 +00:00
UbitUmarov 707eb8de82 remove more xml things no longer needed on .net >4.5.2 2018-01-17 07:17:24 +00:00
UbitUmarov e9d2d81880 pesty warnings 2018-01-17 07:04:07 +00:00
UbitUmarov ade0d8a81f missed a few 2018-01-17 04:32:22 +00:00
UbitUmarov 029d6e40f6 remove those xml things no longer needed on .net >4.5.2 2018-01-17 04:18:43 +00:00
UbitUmarov 2c8251d450 update DotNetOpenId (.net4.6) 2018-01-17 03:46:24 +00:00
UbitUmarov be02aece36 update C5 (.net4.6) 2018-01-17 03:02:03 +00:00
UbitUmarov 6dec7869b8 update LukeSkywalker.IPNetwork (.net4.6) 2018-01-17 00:55:55 +00:00
UbitUmarov 2c252032c7 test adding missing dep 2018-01-17 00:14:55 +00:00
UbitUmarov d1f6ffc2fd make mono.Addins files show version 1.3.7 2018-01-16 23:47:01 +00:00
UbitUmarov 5579144c16 update mono.Addins to version 1.3.7(.net4.6) 2018-01-16 23:37:16 +00:00
UbitUmarov c35803964f Merge branch 'master' into httptests 2018-01-16 19:12:19 +00:00
UbitUmarov b903287dd1 Merge branch 'master' into httptests 2018-01-16 17:17:44 +00:00
UbitUmarov 8f1a68633e update lsl2c tools and parsing files. This may fix some issues with precendence of unary operators in same case, hope not break on others :( 2018-01-16 01:44:16 +00:00
UbitUmarov 49848b09e6 replace ICSharpCode.SharpZipLib with target .net4.6 2018-01-16 00:44:51 +00:00
UbitUmarov ae04a24e7a recover a lost null check 2018-01-15 18:57:15 +00:00
UbitUmarov 6f3e538c79 replace Newtonsoft.Json and Zlib.net with target .net4.6 2018-01-15 18:13:56 +00:00
UbitUmarov c92ba1cc04 shut up some pesty warnings 2018-01-15 16:23:19 +00:00
UbitUmarov 7a09a10f58 update PrimMesher to a newer version from dahlia (thx dahlia), targeted .net4.6 2018-01-15 15:12:21 +00:00
UbitUmarov 01448d751a update PrimMesh to lkalif 2013 version, .net4.6 and libomv again 2018-01-14 03:25:59 +00:00
UbitUmarov 3d87e37d99 make old Ode PInvoke follow ms coding rules 2018-01-14 01:40:49 +00:00
UbitUmarov 88511bfab2 make ubOde PInvoke follow ms coding rules 2018-01-14 01:02:21 +00:00
UbitUmarov 8a68c330e8 fix a string format 2018-01-14 00:47:12 +00:00
UbitUmarov 1d6a157134 change version to 0.9.1.1 so we can see it inworld 2018-01-13 22:40:44 +00:00
UbitUmarov 4e8fa27411 update again libomv that may depend on new log4net and XMLRPC 2018-01-13 20:43:09 +00:00
UbitUmarov a3d78b24fd add log4net apache license terms, remove axiom 2018-01-13 18:35:28 +00:00
UbitUmarov e0b695a776 testing update log4net to version2.0.8 to .net4.6 ( this more likely to smoke 2018-01-13 18:32:08 +00:00
UbitUmarov eafad5a4cb testing update Nini.dll to .net4.6 2018-01-13 16:20:59 +00:00
UbitUmarov d91c7c5958 testing update Iconic.Zip.dll to .net4.6 2018-01-13 16:08:44 +00:00
UbitUmarov d3ff4e0806 clean some modules api 2018-01-13 14:40:31 +00:00
UbitUmarov 4345d225f1 remove unused dll - XMLRPC is used not this 2018-01-12 19:19:26 +00:00
UbitUmarov 792a1c6e3d fix a string format 2018-01-12 18:09:38 +00:00
UbitUmarov fa78a6fd90 fix some odd sql queries ap not in use 2018-01-12 18:07:37 +00:00
UbitUmarov 271fab6ac2 testing update libomv CSj2k dll to .net4.6, remove unused Axiom dll 2018-01-12 12:45:46 +00:00
UbitUmarov 41633de8cb remove the temporary Xmutes module, replace MuteListModule byt the new one, previusly named MuteListModuleTst 2018-01-12 04:06:02 +00:00
UbitUmarov 17f2838757 testing update libomv dlls to .net4.6 2018-01-12 03:32:55 +00:00
UbitUmarov a3e50ef8dc testing update Warp3d.dll to .net4.6 2018-01-12 03:15:48 +00:00
UbitUmarov 98f79cf735 testing update XMLRPC.dll to .net4.6, not this is not same source that previus one.. so we may have other issues 2018-01-12 03:12:01 +00:00
UbitUmarov 3c3b8fc759 testing update httpserver.dll to .net4.6 2018-01-12 03:07:51 +00:00
UbitUmarov c69920376b change target framework to 4.6 for testing 2018-01-12 00:10:45 +00:00
UbitUmarov 250acf891f exclude folders obj from projects 2018-01-06 00:20:07 +00:00
UbitUmarov 875ca104b8 Merge branch 'master' into httptests 2018-01-05 22:37:42 +00:00
UbitUmarov 3576d6d764 Merge branch 'master' into httptests 2018-01-03 10:48:38 +00:00
UbitUmarov 0259019431 fix merge 2017-12-30 15:50:03 +00:00
UbitUmarov 3b141e6e6f Merge branch 'master' into httptests 2017-12-14 05:37:07 +00:00
UbitUmarov ab0f866087 Merge branch 'master' into httptests
# Conflicts:
#	prebuild.xml
2017-12-12 22:19:31 +00:00
UbitUmarov 17c65d918a Merge branch 'master' into httptests 2017-11-12 12:11:29 +00:00
UbitUmarov cdb7d506fd Merge branch 'master' into httptests 2017-11-12 03:26:48 +00:00
UbitUmarov ca4804b758 Merge branch 'master' into httptests 2017-11-12 03:18:02 +00:00
UbitUmarov 39d1426f27 Merge branch 'master' into httptests 2017-10-30 19:06:17 +00:00
UbitUmarov 16a8e166ff Merge branch 'master' into httptests 2017-10-26 19:01:16 +01:00
UbitUmarov c220c277e2 Merge branch 'master' into httptests 2017-10-15 23:03:39 +01:00
UbitUmarov 68e9baf2e0 Merge branch 'master' into httptests 2017-10-13 20:36:29 +01:00
UbitUmarov b1814d3492 Merge branch 'master' into httptests 2017-10-01 18:05:10 +01:00
UbitUmarov e4dfa50654 replace libomv saving a few op on vector * quaternion 2017-09-17 04:43:53 +01:00
UbitUmarov 765f4eef1e Merge branch 'master' into httptests 2017-09-16 19:01:22 +01:00
UbitUmarov 5687c5d494 Merge branch 'master' into httptests 2017-09-16 01:00:28 +01:00
UbitUmarov b581a64788 ubOde: comment out some debug stats 2017-09-08 20:04:16 +01:00
UbitUmarov 0ac81f6a09 ubOde: hashSpaces aren't that nice 2017-09-08 19:59:38 +01:00
UbitUmarov ca493a1beb Merge branch 'master' into httptests 2017-09-05 20:25:12 +01:00
UbitUmarov 86493d75fa Merge branch 'master' into httptests 2017-09-04 18:39:42 +01:00
UbitUmarov 34da125a4d fix our name is OpenSimulator not OpenSim 2017-08-31 15:25:14 +01:00
UbitUmarov 3fe3471532 improve Prefer32bit configuration option 2017-08-31 15:17:42 +01:00
UbitUmarov c9198dc1d4 .net4.5, take2; vs2010 does not do it, try to make mono5.x msbuild more happy 2017-08-31 13:42:58 +01:00
UbitUmarov 566e79b574 test: .net framework4.5 2017-08-31 13:20:47 +01:00
UbitUmarov a578df9589 CSharp targets name still wrong 2017-08-31 11:29:00 +01:00
UbitUmarov b9fc629bdf fix a whitecode bug, add missing files 2017-08-31 11:23:03 +01:00
UbitUmarov a30d8f8e64 fix a prebuild VS targets assembly name 2017-08-31 09:59:44 +01:00
UbitUmarov 46ead8dcb2 make option Prefer32bit default to false. Thanks Freaky Tech 2017-08-30 22:49:13 +01:00
UbitUmarov 41e8b9f91f update Prebuild with WhiteCore version 2017-08-30 22:24:07 +01:00
UbitUmarov d4a3aa5e08 Merge branch 'master' into httptests 2017-08-29 07:53:34 +01:00
UbitUmarov e4747b938b update httpserver 2017-08-28 13:33:37 +01:00
UbitUmarov 47648557c1 fix some nunit tests 2017-08-28 10:48:46 +01:00
UbitUmarov b3eec90d3c Merge branch 'master' into httptests 2017-08-25 23:47:40 +01:00
UbitUmarov a1aa2f1add Merge branch 'master' into httptests 2017-08-24 02:18:40 +01:00
UbitUmarov b1fdb02be1 Merge branch 'master' into httptests 2017-08-22 18:39:30 +01:00
UbitUmarov 8434def603 update ODE bins for windows to 0.13.3 ( old ode will now also have stati/dynamic friction, cant avoid it 2017-08-21 05:00:18 +01:00
UbitUmarov 6cf27e2191 ubOde move static/dynamic friction to unmanaged code. Note this now requeries ode version OS0.13.3 currently at opensim-libs repo trunk/unmanaged/ODE-OpenSim-Test 2017-08-21 04:54:01 +01:00
UbitUmarov f9c01db33c Merge branch 'master' into httptests 2017-08-19 22:48:31 +01:00
UbitUmarov e2ca5853fc Merge branch 'master' into httptests 2017-08-18 04:33:21 +01:00
UbitUmarov ea53cb0dfa temporary change pcampbot bots lastname convention, to test at osgrid 2017-08-17 22:17:36 +01:00
UbitUmarov c54cd4d808 Merge branch 'master' into httptests 2017-08-17 00:16:29 +01:00
UbitUmarov 6d4b0a8ce3 Merge branch 'master' into httptests 2017-08-16 05:05:57 +01:00
UbitUmarov d1f7fac570 fix merge issues 2017-07-20 14:28:26 +01:00
UbitUmarov fe6ad384e4 merge 2017-07-20 11:30:12 +01:00
UbitUmarov 3fc6f62c45 Merge branch 'master' into httptests 2017-06-19 03:20:40 +01:00
UbitUmarov 10d526f961 Merge branch 'master' into httptests 2017-06-16 02:43:36 +01:00
UbitUmarov 84946e3061 Merge branch 'master' into httptests 2017-06-14 03:04:14 +01:00
UbitUmarov 5842d5f7b0 revert. The .net concurrent objects look nice, but mono5 cpu load with them does not 2017-06-10 13:58:16 +01:00
UbitUmarov 73aa752034 replace some locked objects by .net4.0 concurrent objects 2017-06-10 04:18:31 +01:00
UbitUmarov b5910cfdb7 merge 2017-06-10 02:48:51 +01:00
UbitUmarov 7bea4f1578 Merge branch 'master' into httptests 2017-06-07 20:12:49 +01:00
UbitUmarov 7d58b73bbc some changes on pollevent 2017-06-06 21:55:47 +01:00
UbitUmarov 8971e9f126 Merge branch 'master' into httptests 2017-06-06 21:47:55 +01:00
UbitUmarov 773914591d Merge branch 'master' into httptests 2017-06-06 03:28:30 +01:00
UbitUmarov 258d169392 Merge branch 'master' into httptests 2017-06-06 00:30:01 +01:00
UbitUmarov aea282ba38 Merge branch 'master' into httptests 2017-06-03 07:20:31 +01:00
UbitUmarov 01bd578bb0 Merge branch 'master' into httptests 2017-06-03 07:08:43 +01:00
UbitUmarov de153c2b62 Merge branch 'master' into httptests 2017-06-02 06:26:20 +01:00
UbitUmarov 55babdc160 Merge branch 'master' into httptests 2017-05-31 07:21:21 +01:00
UbitUmarov 6a0eba3d7b disable llhttprequests secure con, since it still collides with main ssl settings 2017-05-27 14:39:56 +01:00
UbitUmarov a2c824e124 get back to .net4.0 for now 2017-05-27 13:56:28 +01:00
UbitUmarov 2603363e3e update test httpserver, be more tolerant on protocols 2017-05-27 12:51:32 +01:00
UbitUmarov a7db505caf stupid mono5 doesn't know about Subject Alternative Name IPAddress 2017-05-27 12:38:31 +01:00
UbitUmarov 117e6ec266 fix wrong cert ip compare 2017-05-27 08:30:12 +01:00
UbitUmarov 6609965f6e ops no 2017-05-27 06:50:45 +01:00
UbitUmarov d5d09253bc add test cert 2017-05-27 06:47:54 +01:00
UbitUmarov 582dc75381 remove a accent from a method name 2017-05-27 06:30:23 +01:00
UbitUmarov c54985f8a1 Merge branch 'master' into httptests 2017-05-27 05:47:05 +01:00
UbitUmarov 2777995331 Merge branch 'master' into httptests 2017-05-25 10:23:52 +01:00
UbitUmarov c0bfaac0ac merge master 2017-05-23 07:35:02 +01:00
UbitUmarov 0320225ca8 reenqueue poll events while conn is open, and not expired 2017-05-21 07:02:35 +01:00
UbitUmarov e520dba717 Merge branch 'master' into httptests 2017-05-21 02:20:40 +01:00
UbitUmarov 774e00b3ee merge 2017-05-20 17:02:25 +01:00
UbitUmarov 78c4f8000e Merge branch 'master' into httptests 2017-05-20 14:30:49 +01:00
UbitUmarov 40091f9be5 Merge branch 'master' into httptests 2017-05-19 03:23:57 +01:00
UbitUmarov eea247fcc5 Merge branch 'master' into httptests 2017-05-14 07:52:50 +01:00
UbitUmarov dcdc527401 Merge branch 'master' into httptests 2017-05-12 01:55:15 +01:00
UbitUmarov 1b7aee89d3 Merge branch 'master' into httptests 2017-05-11 23:14:02 +01:00
UbitUmarov 09c4952c6d merge 2017-05-09 23:22:36 +01:00
UbitUmarov 4b3d57e964 update mysql connector to v6.9.9 .net4.5 2017-05-08 19:08:20 +01:00
UbitUmarov 72811de98b push .Net framework to 4.5, this means minimal OS is now windows Vista (not XP), but we do need this, namely for easier SSL implementation 2017-05-08 19:06:37 +01:00
UbitUmarov 5622b174c4 update mysql connector to v6.9.9 .net4.0 2017-05-08 04:18:17 +01:00
UbitUmarov f358b39ef5 update httpserver 2017-05-08 04:00:47 +01:00
UbitUmarov 6c79cc652b some conditional dispose on http requests inputstream 2017-05-08 00:54:17 +01:00
UbitUmarov b20778d8ec fix merge 2017-05-07 04:45:28 +01:00
UbitUmarov 11f6d28a06 fix merge 2017-05-07 04:21:33 +01:00
UbitUmarov 5f5b7e56db merge fix 2017-05-04 12:57:11 +01:00
UbitUmarov cffe2f87e6 viewer can't tell if a taskitem is group owned if we don't tell him;
missing taskInv serial update"
2017-05-03 15:19:11 +01:00
UbitUmarov 832ca518d7 fix merge 2017-05-03 03:52:55 +01:00
UbitUmarov a680d8b8d7 fix merge 2017-04-25 17:59:53 +01:00
UbitUmarov 45695ef2e3 Merge branch 'master' into httptests 2017-01-08 02:00:24 +00:00
UbitUmarov 694720d7a9 Merge branch 'master' into httptests 2017-01-07 21:05:12 +00:00
UbitUmarov add27a503e Merge branch 'master' into httptests 2017-01-07 16:55:03 +00:00
UbitUmarov 6172446e2a Merge branch 'master' into httptests 2017-01-06 01:09:42 +00:00
UbitUmarov 254b26a7d5 fix merge 2017-01-05 19:32:57 +00:00
UbitUmarov 9d28fd41c6 Merge branch 'master' into httptests 2017-01-05 16:33:01 +00:00
UbitUmarov 5da7752ebc Merge branch 'master' into httptests 2017-01-04 23:16:47 +00:00
UbitUmarov 82a26671b8 Merge branch 'master' into httptests 2017-01-03 11:24:16 +00:00
UbitUmarov 5fc3605955 some cleanup, use more using(), more checks so http request mem stream is closed 2016-12-30 07:15:28 +00:00
UbitUmarov 1107d0ccb9 Merge branch 'master' into httptests 2016-12-30 02:20:52 +00:00
UbitUmarov 2a01173715 Merge branch 'master' into httptests 2016-12-30 01:52:02 +00:00
UbitUmarov 88c96d3973 Merge branch 'master' into httptests 2016-12-28 12:20:02 +00:00
UbitUmarov 5c79e03f18 some cleanup 2016-12-27 12:26:08 +00:00
UbitUmarov 52e7fc31f7 fix typos (thanks you know who) 2016-12-25 16:48:27 +00:00
UbitUmarov 1b95ada105 Merge branch 'master' into httptests 2016-12-25 05:51:08 +00:00
UbitUmarov 86cc02f33e Merge branch 'master' into httptests 2016-12-23 02:53:58 +00:00
UbitUmarov 4bdf89d59b update httpserver muting some socket errors that are normal 2016-12-19 09:07:17 +00:00
UbitUmarov bbbbf47507 add a missing file change 2016-12-18 20:09:02 +00:00
UbitUmarov 82fc8e1a36 Merge branch 'master' into httptests 2016-12-18 05:03:27 +00:00
UbitUmarov 18a292ad02 Merge branch 'master' into httptests 2016-12-14 13:35:53 +00:00
UbitUmarov 8114ff9d06 Merge branch 'master' into httptests 2016-12-09 04:50:07 +00:00
UbitUmarov 30dccd57cd provide remote SSLcommonName to xmlRpcRequest methods, but in a away it can be detected/parsed. This is used by some external modules like DTLNSLMoneyServer. But this module does need to change on this ( and it cannot override default validation rules, it needs to do it on its httplistener with method provided in previus commits 2016-12-09 04:32:59 +00:00
UbitUmarov 6627da693e suport client certificate validation per listenner, with a supplied static callback 2016-12-09 04:07:06 +00:00
UbitUmarov 806e75eefb remove not needed sslport parameter 2016-12-08 23:39:55 +00:00
UbitUmarov 55c04a2410 Merge branch 'master' into httptests 2016-12-07 20:34:11 +00:00
UbitUmarov 95ff859484 change a few ssl config comments 2016-12-07 20:33:38 +00:00
UbitUmarov 3a81642d97 add SSL certs validation options for regions to allow simple encriptation without any peer autentification using simple homemade (or even shared) certs. 2016-12-07 13:30:07 +00:00
UbitUmarov 049dd374e9 add SSL certs validation options for robust to allow simple certificates, possible only for encriptation without any peer autentification. disable validation by default for the small grids case 2016-12-07 12:23:40 +00:00
UbitUmarov 4993a08d25 Merge branch 'master' into httptests 2016-12-06 10:26:57 +00:00
UbitUmarov ccaa7a4a8a save a few lists scaning 2016-12-06 10:26:36 +00:00
UbitUmarov 1680425f4d Merge branch 'master' into httptests 2016-12-04 23:39:15 +00:00
UbitUmarov 9df95afd86 update httpserver 2016-12-02 13:54:11 +00:00
UbitUmarov b981ac42bc Merge branch 'master' into httptests 2016-12-02 13:51:30 +00:00
UbitUmarov ebbb918404 Merge branch 'master' into httptests 2016-11-28 06:02:47 +00:00
UbitUmarov 6b017f94ea update httpserver dll fixing a memory leak 2016-11-27 15:23:08 +00:00
UbitUmarov 877d3092b4 Merge branch 'master' into httptests 2016-11-27 15:14:34 +00:00
UbitUmarov 08dee3fa34 fix pool parameters for httptests 2016-11-19 15:46:47 +00:00
UbitUmarov 7cb3d583a9 merge conflits 2016-11-19 15:45:41 +00:00
UbitUmarov ec8393571f Merge branch 'master' into httptests 2016-11-16 13:07:23 +00:00
UbitUmarov 93ea7bd7f4 Merge branch 'master' into httptests 2016-11-07 11:36:43 +00:00
UbitUmarov bb32b3b4a1 Merge branch 'master' into httptests 2016-11-04 18:31:25 +00:00
UbitUmarov 0c39a3e348 Merge branch 'master' into httptests 2016-11-03 17:19:02 +00:00
UbitUmarov 01a4a883e0 Merge branch 'master' into httptests 2016-11-03 14:01:35 +00:00
UbitUmarov 8c7fe3c0db Merge branch 'master' into httptests 2016-10-25 09:18:13 +01:00
UbitUmarov 2ce0673af2 Merge branch 'master' into httptests 2016-10-21 17:58:17 +01:00
UbitUmarov 085965b86c Merge branch 'master' into httptests 2016-10-11 02:16:16 +01:00
UbitUmarov 6b0094645c change some coments relative to ssl in config files 2016-10-10 20:14:02 +01:00
UbitUmarov 80d4f76d18 keep a unsecure http port up for external services (datasnapshot search). Only fire poolservices on main http listener 2016-10-09 20:18:20 +01:00
UbitUmarov 7aa4bd7006 add a comment about selfsigned certs 2016-10-09 01:15:53 +01:00
UbitUmarov 5b946405a0 changes to regions ssl suport: verify if hostnames are validate by the selected cert, make clear that for now all regions need to have the same ExternalHostName if using sll (due to other code that needs to be changed later) 2016-10-09 01:01:52 +01:00
UbitUmarov 9843e3776e Merge branch 'master' into httptests 2016-10-08 01:27:02 +01:00
UbitUmarov b51739e23e recover regions main http server ssl suport. Using a PKCS12 cert file, and not certs store for now. Option http_listener_cn, cert CN need to the same as external IP. Self sign certs do seem to work, but the viewers option NoVerifySLLCert needs to be set true. CA check is not done but they do check the IP 2016-10-06 21:35:11 +01:00
UbitUmarov db1e75b0ac Merge branch 'master' into httptests 2016-09-21 15:26:30 +01:00
UbitUmarov 82997c5907 Merge branch 'master' into httptests 2016-09-18 20:02:59 +01:00
UbitUmarov e5383604cb Merge branch 'master' into httptests 2016-09-17 12:44:52 +01:00
UbitUmarov 606e9f99f3 forgot the dll 2016-09-03 08:52:15 +01:00
UbitUmarov 4f9378bf97 remove reuse context code, they had notthing worth using and on original code when reusing contexts still in use, etc. Change DLL information to make clear it is a opensim fork, so our responsability not original author 2016-09-03 08:50:22 +01:00
UbitUmarov 9aec227767 Merge branch 'master' into httptests 2016-09-03 07:51:53 +01:00
UbitUmarov 7ba3fb7b5d merge issue 2016-08-19 03:05:25 +01:00
UbitUmarov a0538eb53d fix entity update flags update 2016-08-07 20:53:38 +01:00
UbitUmarov 081c66631c move updates from updates queues into udp queues acording to their payload estimated size and udp sending capability on a time slice, instead always moving a arbitrary number of updates. 2016-08-07 17:07:09 +01:00
UbitUmarov 8d22b79ba4 several changes related to culling option 2016-08-07 14:30:27 +01:00
UbitUmarov 68a4e363dd Merge branch 'httptests' of opensimulator.org:/var/git/opensim into httptests 2016-08-07 00:24:17 +01:00
UbitUmarov 4c7b2b2ed7 Merge branch 'master' into httptests 2016-08-04 06:14:46 +01:00
UbitUmarov c035871e76 Merge branch 'master' into httptests 2016-08-02 18:19:34 +01:00
UbitUmarov d0ccaead0e Merge branch 'master' into httptests 2016-08-02 16:54:11 +01:00
UbitUmarov 3b76b2f176 Merge branch 'master' into httptests 2016-08-02 01:40:00 +01:00
UbitUmarov 5576a100ce Merge branch 'master' into httptests 2016-08-01 01:05:31 +01:00
UbitUmarov a9befe1c62 Merge branch 'master' into httptests 2016-07-31 23:19:51 +01:00
UbitUmarov 62d0e50ca4 Merge branch 'master' into httptests 2016-07-31 00:04:35 +01:00
UbitUmarov a63aef978a Merge branch 'master' into httptests 2016-07-30 21:02:08 +01:00
UbitUmarov cb23d1bf24 Merge branch 'master' into httptests 2016-07-30 20:13:16 +01:00
UbitUmarov 22b1b91599 Merge branch 'master' into httptests 2016-07-30 04:31:26 +01:00
UbitUmarov 18bcacdded Merge branch 'master' into httptests 2016-07-30 01:53:25 +01:00
UbitUmarov 3cf8a58f9d Merge branch 'master' into httptests 2016-07-28 08:25:04 +01:00
UbitUmarov 376084a2e5 Merge branch 'master' into httptests 2016-07-27 23:39:50 +01:00
UbitUmarov 2062418c56 add another gatekeeper login fail reason reply 2016-07-21 11:34:17 +01:00
UbitUmarov 475087de79 add a gatekeeper login fail reason reply 2016-07-21 11:22:13 +01:00
UbitUmarov 2cacd77d41 let FS get a answer to folder uuid.zero, (still seems a no op); send
Library folders list"
2016-07-19 23:50:39 +01:00
UbitUmarov 2c6db4f617 fix a typo 2016-07-19 19:01:03 +01:00
UbitUmarov 46c55b6fa0 some cleanup on FetchInvDescHandler 2016-07-19 18:56:32 +01:00
UbitUmarov eaefae7e20 don't loose inventory items when there are bad folders 2016-07-17 22:52:58 +01:00
UbitUmarov 79e464f33f dont try dequeues if didnt reacquired lock 2016-07-17 16:16:24 +01:00
UbitUmarov e881562d34 fix drop on delayed events processing 2016-07-17 14:15:46 +01:00
UbitUmarov 442b272228 add a Drop method to PollService Event handlers, Drop requests on connections known to be lost or delay event check if they are sending a response 2016-07-17 13:20:56 +01:00
UbitUmarov 6a02ac634b identify contexts by ID now avaiable ( pipeline serialization) 2016-07-17 11:39:38 +01:00
UbitUmarov c802368c86 replace http server with test version 2016-07-17 10:49:59 +01:00
878 changed files with 155173 additions and 110753 deletions

View File

@ -1,38 +1,35 @@
# Building on Windows
Steps:
* runprebuild.bat
* Load OpenSim.sln into Visual Studio .NET and build the solution.
* chdir bin
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
* run OpenSim.exe
# Building on Linux
# Building on Linux / Mac
Prereqs:
* 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
* Mono > 5.0
* On some Linux distributions you may need to install additional packages.
* msbuild or xbuild if still supported by the mono version
* See http://opensimulator.org/wiki/Dependencies for more information.
From the distribution type:
* ./runprebuild.sh
* nant (or !* xbuild)
* type msbuild or xbuild
* cd bin
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
* run mono OpenSim.exe
!* xbuild option switches
!* clean: xbuild /target:clean
!* debug: (default) xbuild /property:Configuration=Debug
!* release: xbuild /property:Configuration=Release
# Using Monodevelop
From the distribution type:
* ./runprebuild.sh
* type monodevelop OpenSim.sln
* review and change those ini files according to your needs
* windows: execute opensim.exe or opensim32.exe for small regions
* linux: run ./opensim.sh
* msbuild (xbuild) option switches
* clean: msbuild /target:clean
* debug: (default) msbuild /property:Configuration=Debug
* release: msbuild /property:Configuration=Release
# References

View File

@ -4,14 +4,9 @@ The following people have contributed to OpenSim (Thank you for your effort!)
These folks represent the current core team for OpenSim, and are the
people that make the day to day of OpenSim happen.
* justincc (OSVW Consulting, justincc.org)
* Melanie Thielker
* Diva (Crista Lopes, University of California, Irvine)
* BlueWall (James Hughes)
* Nebadon Izumi (Michael Cerquoni, OSgrid)
* Snoopy Pfeffer
* Robert Adams (MisterBlue)
* Oren Hurvitz (Kitely)
* Kevin Cozens
* Leal Duarte (Ubit Umarov)
@ -20,11 +15,8 @@ Core developers who have temporarily (we hope) gone chasing the white rabbit.
They are in all similar to the active core developers, except that they haven't
been that active lately, so their voting rights are awaiting their come back.
* Teravus (w3z)
* Arthur Rodrigo S Valadares (IBM)
* Dan Lake
* Marck
* Mic Bowman
* Nebadon Izumi (Michael Cerquoni, OSgrid)
* Alicia Raven
= Past Open Sim Developers =
These folks are alumns of the OpenSim core group, but are now
@ -57,7 +49,15 @@ where we are today.
* John Hurliman
* chi11ken (Genkii)
* dahlia
* justincc (OSVW Consulting, justincc.org)
* Arthur Rodrigo S Valadares (IBM)
* BlueWall (James Hughes)
* Dan Lake
* Marck
* Mic Bowman
* Oren Hurvitz (Kitely)
* Snoopy Pfeffer
* Teravus (w3z)
= Additional OpenSim Contributors =
These folks have contributed code patches or content to OpenSimulator to help make it
@ -69,9 +69,9 @@ what it is today.
* alex_carnell
* Alan Webb (IBM)
* Aleric
* Alicia Raven
* Allen Kerensky
* BigFootAg
* Bill Blight
* BlueWall Slade
* bobshaffer2
* brianw/Sir_Ahzz
@ -131,6 +131,7 @@ what it is today.
* KittyLiu
* Kurt Taylor (IBM)
* Lani Global
* lickx
* lillith_xue
* lkalif
* LuciusSirnah
@ -142,6 +143,7 @@ what it is today.
* Mandarinka Tasty
* MarcelEdward
* Matt Lehmann
* mewtwo0641
* Mic Bowman
* Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
@ -149,6 +151,7 @@ what it is today.
* Micheil Merlin
* Mike Osias (IBM)
* Mike Pitman (IBM)
* Mike Rieker (Dreamnation)
* mikemig
* mikkopa/_someone - RealXtend
* Misterblue
@ -182,16 +185,20 @@ what it is today.
* SpotOn3D
* Stefan_Boom / stoehr
* Steven Zielinski (MOSES)
* Stolen Ruby
* Strawberry Fride
* Talun
* TechplexEngineer (Blake Bourque)
* TBG Renfold
* Terry Ford
* tglion
* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud)
* TomDataWorks
* TomTheDragon (muckwaddle)
* tyre
* uriesk
* Vegaslon <vegaslon@gmail.com>
* Vincent Sylvester
* VikingErik
* Vytek
* webmage (IBM)

73
OpenSim/Addons/Groups/GroupsMessagingModule.cs Normal file → Executable file
View File

@ -252,7 +252,7 @@ namespace OpenSim.Groups
m_debugEnabled = verbose;
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
MainConsole.Instance.Output("{0} verbose logging set to {1}", Name, m_debugEnabled);
}
/// <summary>
@ -599,36 +599,34 @@ namespace OpenSim.Groups
{
if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: Sending chatterbox invite instant message");
UUID fromAgent = new UUID(msg.fromAgentID);
// Force? open the group session dialog???
// and simultanously deliver the message, so we don't need to do a seperate client.SendInstantMessage(msg);
IEventQueue eq = activeClient.Scene.RequestModuleInterface<IEventQueue>();
eq.ChatterboxInvitation(
GroupID
, groupInfo.GroupName
, new UUID(msg.fromAgentID)
, msg.message
, AgentID
, msg.fromAgentName
, msg.dialog
, msg.timestamp
, msg.offline == 1
, (int)msg.ParentEstateID
, msg.Position
, 1
, new UUID(msg.imSessionID)
, msg.fromGroup
, OpenMetaverse.Utils.StringToBytes(groupInfo.GroupName)
);
if (eq != null)
{
eq.ChatterboxInvitation(
GroupID
, groupInfo.GroupName
, fromAgent
, msg.message
, AgentID
, msg.fromAgentName
, msg.dialog
, msg.timestamp
, msg.offline == 1
, (int)msg.ParentEstateID
, msg.Position
, 1
, new UUID(msg.imSessionID)
, msg.fromGroup
, OpenMetaverse.Utils.StringToBytes(groupInfo.GroupName)
);
eq.ChatterBoxSessionAgentListUpdates(
new UUID(GroupID)
, AgentID
, new UUID(msg.toAgentID)
, false //canVoiceChat
, false //isModerator
, false //text mute
, true // Enter
);
var update = new GroupChatListAgentUpdateData(AgentID);
var updates = new List<GroupChatListAgentUpdateData> { update };
eq.ChatterBoxSessionAgentListUpdates(GroupID, new UUID(msg.toAgentID), updates);
}
}
}
}
@ -663,15 +661,12 @@ namespace OpenSim.Groups
ChatterBoxSessionStartReplyViaCaps(remoteClient, groupInfo.GroupName, GroupID);
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
queue.ChatterBoxSessionAgentListUpdates(
GroupID
, AgentID
, new UUID(im.toAgentID)
, false //canVoiceChat
, false //isModerator
, false //text mute
, true
);
if (queue != null)
{
var update = new GroupChatListAgentUpdateData(AgentID);
var updates = new List<GroupChatListAgentUpdateData> { update };
queue.ChatterBoxSessionAgentListUpdates(GroupID, remoteClient.AgentId, updates);
}
}
}
@ -713,11 +708,7 @@ namespace OpenSim.Groups
bodyMap.Add("session_info", sessionMap);
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
if (queue != null)
{
queue.Enqueue(queue.BuildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId);
}
queue?.Enqueue(queue.BuildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId);
}
private void DebugGridInstantMessage(GridInstantMessage im)

284
OpenSim/Addons/Groups/GroupsModule.cs Normal file → Executable file
View File

@ -38,7 +38,7 @@ using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
using PermissionMask = OpenSim.Framework.PermissionMask;
namespace OpenSim.Groups
{
@ -127,7 +127,7 @@ namespace OpenSim.Groups
m_debugEnabled = verbose;
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
MainConsole.Instance.Output("{0} verbose logging set to {1}", Name, m_debugEnabled);
}
public void RegionLoaded(Scene scene)
@ -233,7 +233,7 @@ namespace OpenSim.Groups
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
client.OnRequestAvatarProperties += OnRequestAvatarProperties;
//client.OnRequestAvatarProperties += OnRequestAvatarProperties;
}
@ -249,7 +249,7 @@ namespace OpenSim.Groups
// There might be some problem with the thread we're generating this on but not
// doing the update at this time causes problems (Mantis #7920 and #7915)
// TODO: move sending this update to a later time in the rootification of the client.
if(!sp.haveGroupInformation)
if(!sp.m_haveGroupInformation)
SendAgentGroupDataUpdate(sp.ControllingClient, false);
}
@ -261,7 +261,7 @@ namespace OpenSim.Groups
// Used for Notices and Group Invites/Accept/Reject
sp.ControllingClient.OnInstantMessage -= OnInstantMessage;
}
/*
private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@ -269,7 +269,7 @@ namespace OpenSim.Groups
GroupMembershipData[] avatarGroups = GetProfileListedGroupMemberships(remoteClient, avatarID);
remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups);
}
*/
private void OnClientClosed(UUID AgentId, Scene scene)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@ -281,7 +281,7 @@ namespace OpenSim.Groups
if (client != null)
{
client.OnAgentDataUpdateRequest -= OnAgentDataUpdateRequest;
client.OnRequestAvatarProperties -= OnRequestAvatarProperties;
//client.OnRequestAvatarProperties -= OnRequestAvatarProperties;
// make child possible not called?
client.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest;
client.OnInstantMessage -= OnInstantMessage;
@ -344,14 +344,24 @@ namespace OpenSim.Groups
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
if (m_debugEnabled)
m_log.DebugFormat("[Groups]: OnInstantMessage called");
if(remoteClient == null || !remoteClient.IsActive || remoteClient.AgentId == UUID.Zero)
return;
Scene scene = (Scene)remoteClient.Scene;
if (scene == null)
return;
string remoteAgentIDstr = remoteClient.AgentId.ToString();
//m_log.DebugFormat("[Groups]: IM From {0} to {1} msg {2} type {3}", im.fromAgentID, im.toAgentID, im.message, (InstantMessageDialog)im.dialog);
// Group invitations
if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
{
UUID inviteID = new UUID(im.imSessionID);
GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(GetRequestingAgentIDStr(remoteClient), inviteID);
GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(remoteAgentIDstr, inviteID);
if (inviteInfo == null)
{
@ -374,7 +384,7 @@ namespace OpenSim.Groups
// and the sessionid is the role
string reason = string.Empty;
if (!m_groupData.AddAgentToGroup(GetRequestingAgentIDStr(remoteClient), invitee.ToString(), inviteInfo.GroupID, inviteInfo.RoleID, string.Empty, out reason))
if (!m_groupData.AddAgentToGroup(remoteAgentIDstr, invitee.ToString(), inviteInfo.GroupID, inviteInfo.RoleID, string.Empty, out reason))
remoteClient.SendAgentAlertMessage("Unable to add you to the group: " + reason, false);
else
{
@ -401,121 +411,237 @@ namespace OpenSim.Groups
}
}
m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentIDStr(remoteClient), inviteID);
m_groupData.RemoveAgentToGroupInvite(remoteAgentIDstr, inviteID);
}
// Reject
if (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: Received a reject invite notice.");
m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentIDStr(remoteClient), inviteID);
if (m_debugEnabled)
m_log.DebugFormat("[Groups]: Received a reject invite notice.");
m_groupData.RemoveAgentFromGroup(GetRequestingAgentIDStr(remoteClient), inviteInfo.AgentID, inviteInfo.GroupID);
m_groupData.RemoveAgentToGroupInvite(remoteAgentIDstr, inviteID);
m_groupData.RemoveAgentFromGroup(remoteAgentIDstr, inviteInfo.AgentID, inviteInfo.GroupID);
}
}
}
// Group notices
if ((im.dialog == (byte)InstantMessageDialog.GroupNotice))
else if ((im.dialog == (byte)InstantMessageDialog.GroupNotice))
{
if (!m_groupNoticesEnabled)
return;
UUID GroupID = new UUID(im.toAgentID);
GroupMembershipData grpMemberData = m_groupData.GetAgentGroupMembership(remoteAgentIDstr, remoteAgentIDstr, GroupID);
if (grpMemberData == null)
{
remoteClient.SendAgentAlertMessage("Group membership not found", false);
return;
}
UUID GroupID = new UUID(im.toAgentID);
if (m_groupData.GetGroupRecord(GetRequestingAgentIDStr(remoteClient), GroupID, null) != null)
if ((grpMemberData.GroupPowers & (ulong)GroupPowers.SendNotices) == 0)
{
UUID NoticeID = UUID.Random();
string Subject = im.message.Substring(0, im.message.IndexOf('|'));
string Message = im.message.Substring(Subject.Length + 1);
remoteClient.SendAgentAlertMessage("No permission to send notice to group", false);
return;
}
InventoryItemBase item = null;
bool hasAttachment = false;
int index = im.message.IndexOf('|');
if (index < 0)
return;
if (im.binaryBucket.Length >= 1 && im.binaryBucket[0] > 0)
string Subject = im.message.Substring(0, index);
string Message = im.message.Substring(index + 1);
UUID NoticeID = UUID.Random();
InventoryItemBase item = null;
bool hasAttachment = false;
if (im.binaryBucket.Length >= 1 && im.binaryBucket[0] > 0)
{
UUID itemID = UUID.Zero;
UUID ownerID = UUID.Zero;
try
{
hasAttachment = true;
string binBucket = OpenMetaverse.Utils.BytesToString(im.binaryBucket);
binBucket = binBucket.Remove(0, 14).Trim();
string binBucket = Utils.BytesToString(im.binaryBucket);
binBucket = binBucket.Substring(15); // remove extra LLSD pre header
OSD binBucketOSD = OSDParser.DeserializeLLSDXml(binBucket);
if (binBucketOSD is OSDMap)
{
OSDMap binBucketMap = (OSDMap)binBucketOSD;
UUID itemID = binBucketMap["item_id"].AsUUID();
UUID ownerID = binBucketMap["owner_id"].AsUUID();
item = m_sceneList[0].InventoryService.GetItem(ownerID, itemID);
}
else
m_log.DebugFormat("[Groups]: Received OSD with unexpected type: {0}", binBucketOSD.GetType());
OSDMap binBucketMAP = (OSDMap)OSDParser.DeserializeLLSDXml(binBucket);
itemID = binBucketMAP["item_id"].AsUUID();
ownerID = binBucketMAP["owner_id"].AsUUID();
}
catch
{
m_log.DebugFormat("[GROUPS]: failed to decode group notice bucket");
return;
}
if (m_groupData.AddGroupNotice(GetRequestingAgentIDStr(remoteClient), GroupID, NoticeID, im.fromAgentName, Subject, Message,
hasAttachment,
(byte)(item == null ? 0 : item.AssetType),
item == null ? null : item.Name,
item == null ? UUID.Zero : item.ID,
item == null ? UUID.Zero.ToString() : item.Owner.ToString()))
if (itemID != UUID.Zero && ownerID != UUID.Zero)
{
if (OnNewGroupNotice != null)
item = scene.InventoryService.GetItem(ownerID, itemID);
if(item != null)
{
OnNewGroupNotice(GroupID, NoticeID);
}
// Send notice out to everyone that wants notices
foreach (GroupMembersData member in m_groupData.GetGroupMembers(GetRequestingAgentIDStr(remoteClient), GroupID))
{
if (member.AcceptNotices)
if ((item.CurrentPermissions & (uint)(PermissionMask.Transfer | PermissionMask.Copy)) !=
(uint)(PermissionMask.Transfer | PermissionMask.Copy))
{
// Build notice IIM, one of reach, because the sending may be async
GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
msg.toAgentID = member.AgentID.Guid;
OutgoingInstantMessage(msg, member.AgentID);
remoteClient.SendAgentAlertMessage("Item must be have Copy and Transfer rights to attach to group notice", false);
return;
}
}
hasAttachment = true;
}
}
if (m_groupData.AddGroupNotice(remoteAgentIDstr, GroupID, NoticeID, im.fromAgentName, Subject, Message,
hasAttachment,
(byte)(item == null ? 0 : item.AssetType),
item == null ? null : item.Name,
item == null ? UUID.Zero : item.ID,
item == null ? UUID.Zero.ToString() : item.Owner.ToString()))
{
OnNewGroupNotice?.Invoke(GroupID, NoticeID);
// Send notice out to everyone that wants notices
foreach (GroupMembersData member in m_groupData.GetGroupMembers(remoteAgentIDstr, GroupID))
{
GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)InstantMessageDialog.GroupNotice);
if (member.AcceptNotices)
{
// Build notice IIM, one of reach, because the sending may be async
msg.toAgentID = member.AgentID.Guid;
OutgoingInstantMessage(msg, member.AgentID);
}
}
}
}
if (im.dialog == (byte)InstantMessageDialog.GroupNoticeInventoryAccepted)
{
if (im.binaryBucket.Length < 16) // Invalid
if (!m_groupNoticesEnabled)
return;
//// 16 bytes are the UUID. Maybe.
// UUID folderID = new UUID(im.binaryBucket, 0);
UUID noticeID = new UUID(im.imSessionID);
GroupNoticeInfo notice = m_groupData.GetGroupNotice(remoteClient.AgentId.ToString(), noticeID);
if (notice != null)
if (m_debugEnabled)
m_log.DebugFormat("[xmlGROUPS]: Accepted notice {0} for {1}", noticeID, remoteClient.AgentId);
if (noticeID == UUID.Zero)
return;
UUID folderID = UUID.Zero;
try
{
UUID giver = new UUID(im.toAgentID);
string tmp = string.Empty;
Util.ParseUniversalUserIdentifier(notice.noticeData.AttachmentOwnerID, out giver, out tmp, out tmp, out tmp, out tmp);
m_log.DebugFormat("[Groups]: Giving inventory from {0} to {1}", giver, remoteClient.AgentId);
string message;
InventoryItemBase itemCopy = ((Scene)(remoteClient.Scene)).GiveInventoryItem(remoteClient.AgentId,
giver, notice.noticeData.AttachmentItemID, out message);
if (itemCopy == null)
{
remoteClient.SendAgentAlertMessage(message, false);
return;
}
remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
folderID = new UUID(im.binaryBucket, 0);
}
catch
{
m_log.DebugFormat("[xmlGROUPS]: GroupNoticeInventoryAccepted failed to decode target folder");
return;
}
GroupNoticeInfo notice = m_groupData.GetGroupNotice(remoteAgentIDstr, noticeID);
if (notice == null)
{
if (m_debugEnabled)
m_log.DebugFormat(
"[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
noticeID, remoteClient.AgentId);
return;
}
string tmp;
UUID giver = new UUID(im.toAgentID);
Util.ParseUniversalUserIdentifier(notice.noticeData.AttachmentOwnerID, out giver, out tmp, out tmp, out tmp, out tmp);
m_log.DebugFormat("[Groups]: Giving inventory from {0} to {1}", giver, remoteClient.AgentId);
string message = "Could not find group notice attached item";
InventoryItemBase itemCopy = scene.GiveInventoryItem(remoteClient.AgentId,
giver, notice.noticeData.AttachmentItemID, folderID, out message);
if (itemCopy == null)
{
remoteClient.SendAgentAlertMessage(message, false);
return;
}
remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
}
else if (im.dialog == (byte)InstantMessageDialog.GroupNoticeInventoryDeclined)
{
if (!m_groupNoticesEnabled)
return;
UUID noticeID = new UUID(im.imSessionID);
if (m_debugEnabled)
m_log.DebugFormat("[GROUPS]: Accepted notice {0} for {1}", noticeID, remoteAgentIDstr);
if (noticeID == UUID.Zero)
return;
UUID remoteAgentID = remoteClient.AgentId;
GroupNoticeInfo notice = m_groupData.GetGroupNotice(remoteAgentIDstr, noticeID);
if (notice == null)
{
if (m_debugEnabled)
m_log.DebugFormat(
"[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
noticeID, remoteClient.AgentId);
return;
}
string giver = notice.noticeData.AttachmentOwnerID;
UUID attachmentUUID = notice.noticeData.AttachmentItemID;
if (attachmentUUID == null ||
attachmentUUID == UUID.Zero ||
giver == null ||
giver == UUID.Zero.ToString()
)
return;
if (m_debugEnabled)
m_log.DebugFormat("[xmlGroups]: Deny inventory from {0} to {1}", giver, remoteAgentIDstr);
string message = String.Empty;
InventoryItemBase itemCopy = scene.InventoryService.GetItem(remoteAgentID, attachmentUUID);
if (itemCopy == null)
return;
InventoryFolderBase trash = scene.InventoryService.GetFolderForType(remoteAgentID, FolderType.Trash);
if (trash == null)
{
m_log.DebugFormat("[GROUPS]: failed to find trash folder for {0} ", remoteAgentID);
return;
}
if (itemCopy.Folder == trash.ID || remoteAgentIDstr == notice.noticeData.AttachmentOwnerID)
return;
itemCopy.Folder = trash.ID;
scene.InventoryService.MoveItems(itemCopy.Owner, new List<InventoryItemBase>() { itemCopy });
if (itemCopy == null)
{
remoteClient.SendAgentAlertMessage(message, false);
return;
}
remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
}
// Interop, received special 210 code for ejecting a group member
// this only works within the comms servers domain, and won't work hypergrid
// TODO:FIXME: Use a presense server of some kind to find out where the
// client actually is, and try contacting that region directly to notify them,
// or provide the notification via xmlrpc update queue
if ((im.dialog == 210))
else if ((im.dialog == 210))
{
// This is sent from the region that the ejectee was ejected from
// if it's being delivered here, then the ejectee is here
@ -949,6 +1075,7 @@ namespace OpenSim.Groups
bucket = new byte[19 + name.Length];
bucket[0] = 1; // has attachment?
bucket[1] = info.noticeData.AttachmentType; // attachment type
info.GroupID.ToBytes(bucket, 2);
name.CopyTo(bucket, 18);
}
else
@ -959,7 +1086,6 @@ namespace OpenSim.Groups
bucket[18] = 0; // null terminated
}
info.GroupID.ToBytes(bucket, 2);
msg.binaryBucket = bucket;
}
else
@ -1208,7 +1334,7 @@ namespace OpenSim.Groups
public List<DirGroupsReplyData> FindGroups(IClientAPI remoteClient, string query)
{
return m_groupData.FindGroups(GetRequestingAgentIDStr(remoteClient), query);
return m_groupData.FindGroups(remoteClient.AgentId.ToString(), query);
}
#endregion

View File

@ -246,9 +246,9 @@ namespace OpenSim.Groups
return null;
}
public List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search)
public List<DirGroupsReplyData> FindGroups(string RequestingAgentIDstr, string search)
{
return m_LocalGroupsConnector.FindGroups(AgentUUI(RequestingAgentID), search);
return m_LocalGroupsConnector.FindGroups(RequestingAgentIDstr, search);
}
public List<GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID)
@ -605,14 +605,8 @@ namespace OpenSim.Groups
private string AgentUUI(string AgentIDStr)
{
UUID AgentID = UUID.Zero;
try
{
AgentID = new UUID(AgentIDStr);
}
catch (FormatException)
{
return AgentID.ToString();
}
if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero)
return UUID.Zero.ToString();
if (m_UserManagement.IsLocalGridUser(AgentID))
return AgentID.ToString();
@ -636,14 +630,8 @@ namespace OpenSim.Groups
private string AgentUUIForOutside(string AgentIDStr)
{
UUID AgentID = UUID.Zero;
try
{
AgentID = new UUID(AgentIDStr);
}
catch (FormatException)
{
return AgentID.ToString();
}
if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero)
return UUID.Zero.ToString();
AgentCircuitData agent = null;
foreach (Scene scene in m_Scenes)

View File

@ -39,7 +39,7 @@ namespace OpenSim.Groups
bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
bool openEnrollment, bool allowPublish, bool maturePublish, out string reason);
ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName);
List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search);
List<DirGroupsReplyData> FindGroups(string RequestingAgentIDstr, string search);
List<GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID);
bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason);

View File

@ -173,9 +173,9 @@ namespace OpenSim.Groups
return null;
}
public List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search)
public List<DirGroupsReplyData> FindGroups(string RequestingAgentIDstr, string search)
{
return m_GroupsService.FindGroups(RequestingAgentID, search);
return m_GroupsService.FindGroups(RequestingAgentIDstr, search);
}
public List<GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID)

View File

@ -153,7 +153,7 @@ namespace OpenSim.Groups
return GroupsDataUtils.GroupRecord((Dictionary<string, object>)ret["RESULT"]);
}
public List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string query)
public List<DirGroupsReplyData> FindGroups(string RequestingAgentIDstr, string query)
{
List<DirGroupsReplyData> hits = new List<DirGroupsReplyData>();
if (string.IsNullOrEmpty(query))
@ -161,7 +161,7 @@ namespace OpenSim.Groups
Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["Query"] = query;
sendData["RequestingAgentID"] = RequestingAgentID;
sendData["RequestingAgentID"] = RequestingAgentIDstr;
Dictionary<string, object> ret = MakeRequest("FINDGROUPS", sendData);

View File

@ -192,10 +192,10 @@ namespace OpenSim.Groups
});
}
public List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search)
public List<DirGroupsReplyData> FindGroups(string RequestingAgentIDstr, string search)
{
// TODO!
return m_GroupsService.FindGroups(RequestingAgentID, search);
return m_GroupsService.FindGroups(RequestingAgentIDstr, search);
}
public bool AddAgentToGroup(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID, string token, out string reason)

View File

@ -43,60 +43,63 @@ namespace OpenSim.Groups
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public const GroupPowers DefaultEveryonePowers = GroupPowers.AllowSetHome |
GroupPowers.Accountable |
GroupPowers.JoinChat |
GroupPowers.AllowVoiceChat |
GroupPowers.ReceiveNotices |
GroupPowers.StartProposal |
GroupPowers.VoteOnProposal;
public const GroupPowers DefaultEveryonePowers =
GroupPowers.AllowSetHome |
GroupPowers.Accountable |
GroupPowers.JoinChat |
GroupPowers.AllowVoiceChat |
GroupPowers.ReceiveNotices |
GroupPowers.StartProposal |
GroupPowers.VoteOnProposal;
public const GroupPowers OwnerPowers = GroupPowers.Accountable |
GroupPowers.AllowEditLand |
GroupPowers.AllowFly |
GroupPowers.AllowLandmark |
GroupPowers.AllowRez |
GroupPowers.AllowSetHome |
GroupPowers.AllowVoiceChat |
GroupPowers.AssignMember |
GroupPowers.AssignMemberLimited |
GroupPowers.ChangeActions |
GroupPowers.ChangeIdentity |
GroupPowers.ChangeMedia |
GroupPowers.ChangeOptions |
GroupPowers.CreateRole |
GroupPowers.DeedObject |
GroupPowers.DeleteRole |
GroupPowers.Eject |
GroupPowers.FindPlaces |
GroupPowers.HostEvent |
GroupPowers.Invite |
GroupPowers.JoinChat |
GroupPowers.LandChangeIdentity |
GroupPowers.LandDeed |
GroupPowers.LandDivideJoin |
GroupPowers.LandEdit |
GroupPowers.LandEjectAndFreeze |
GroupPowers.LandGardening |
GroupPowers.LandManageAllowed |
GroupPowers.LandManageBanned |
GroupPowers.LandManagePasses |
GroupPowers.LandOptions |
GroupPowers.LandRelease |
GroupPowers.LandSetSale |
GroupPowers.ModerateChat |
GroupPowers.ObjectManipulate |
GroupPowers.ObjectSetForSale |
GroupPowers.ReceiveNotices |
GroupPowers.RemoveMember |
GroupPowers.ReturnGroupOwned |
GroupPowers.ReturnGroupSet |
GroupPowers.ReturnNonGroup |
GroupPowers.RoleProperties |
GroupPowers.SendNotices |
GroupPowers.SetLandingPoint |
GroupPowers.StartProposal |
GroupPowers.VoteOnProposal;
public const GroupPowers OfficersPowers = DefaultEveryonePowers |
GroupPowers.AllowFly |
GroupPowers.AllowLandmark |
GroupPowers.AllowRez |
GroupPowers.AssignMemberLimited |
GroupPowers.ChangeIdentity |
GroupPowers.ChangeMedia |
GroupPowers.ChangeOptions |
GroupPowers.DeedObject |
GroupPowers.Eject |
GroupPowers.FindPlaces |
GroupPowers.Invite |
GroupPowers.LandChangeIdentity |
GroupPowers.LandDeed |
GroupPowers.LandDivideJoin |
GroupPowers.LandEdit |
GroupPowers.AllowEnvironment |
GroupPowers.LandEjectAndFreeze |
GroupPowers.LandGardening |
GroupPowers.LandManageAllowed |
GroupPowers.LandManageBanned |
GroupPowers.LandManagePasses |
GroupPowers.LandOptions |
GroupPowers.LandRelease |
GroupPowers.LandSetSale |
GroupPowers.MemberVisible |
GroupPowers.ModerateChat |
GroupPowers.ObjectManipulate |
GroupPowers.ObjectSetForSale |
GroupPowers.ReturnGroupOwned |
GroupPowers.ReturnGroupSet |
GroupPowers.ReturnNonGroup |
GroupPowers.RoleProperties |
GroupPowers.SendNotices |
GroupPowers.SetLandingPoint;
public const GroupPowers OwnerPowers = OfficersPowers |
GroupPowers.Accountable |
GroupPowers.AllowEditLand |
GroupPowers.AssignMember |
GroupPowers.ChangeActions |
GroupPowers.CreateRole |
GroupPowers.DeleteRole |
GroupPowers.ExperienceAdmin |
GroupPowers.ExperienceCreator |
GroupPowers.GroupBanAccess |
GroupPowers.HostEvent |
GroupPowers.RemoveMember;
#region Daily Cleanup
@ -151,20 +154,25 @@ namespace OpenSim.Groups
data.Data["ShowInList"] = showInList ? "1" : "0";
data.Data["AllowPublish"] = allowPublish ? "1" : "0";
data.Data["MaturePublish"] = maturePublish ? "1" : "0";
UUID roleID = UUID.Random();
data.Data["OwnerRoleID"] = roleID.ToString();
UUID ownerRoleID = UUID.Random();
data.Data["OwnerRoleID"] = ownerRoleID.ToString();
if (!m_Database.StoreGroup(data))
return UUID.Zero;
// Create Everyone role
_AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group", "Member of " + name, (ulong)DefaultEveryonePowers, true);
_AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group is in the everyone role.", "Member of " + name, (ulong)DefaultEveryonePowers, true);
// Create Officers role
UUID officersRoleID = UUID.Random();
_AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, officersRoleID, "Officers", "The officers of the group, with more powers than regular members.", "Officer of " + name, (ulong)OfficersPowers, true);
// Create Owner role
_AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, roleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true);
_AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, ownerRoleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true);
// Add founder to group
_AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, roleID);
_AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, ownerRoleID);
_AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, officersRoleID);
return data.GroupID;
}
@ -223,15 +231,22 @@ namespace OpenSim.Groups
if (d.Data.ContainsKey("Location") && d.Data["Location"] != string.Empty)
continue;
int nmembers = m_Database.MemberCount(d.GroupID);
if(nmembers == 0)
continue;
DirGroupsReplyData g = new DirGroupsReplyData();
g.groupID = d.GroupID;
if (d.Data.ContainsKey("Name"))
g.groupName = d.Data["Name"];
else
{
m_log.DebugFormat("[Groups]: Key Name not found");
continue;
}
g.members = m_Database.MemberCount(d.GroupID);
g.groupID = d.GroupID;
g.members = nmembers;
groups.Add(g);
}
@ -485,7 +500,7 @@ namespace OpenSim.Groups
// check permissions
bool limited = HasPower(RequestingAgentID, GroupID, GroupPowers.AssignMemberLimited);
bool unlimited = HasPower(RequestingAgentID, GroupID, GroupPowers.AssignMember) | IsOwner(RequestingAgentID, GroupID);
bool unlimited = HasPower(RequestingAgentID, GroupID, GroupPowers.AssignMember) || IsOwner(RequestingAgentID, GroupID);
if (!limited && !unlimited)
{
m_log.DebugFormat("[Groups]: ({0}) Attempt at assigning {1} to role {2} denied because of lack of permission", RequestingAgentID, AgentID, RoleID);
@ -843,7 +858,7 @@ namespace OpenSim.Groups
return false;
}
if (!add && data == null) // it deosn't exist, can't update
if (!add && data == null) // it doesn't exist, can't update
{
m_log.DebugFormat("[Groups]: Group {0} doesn't exist. Can't update it", groupID);
return false;

View File

@ -110,9 +110,8 @@ namespace OpenSim.OfflineIM
{
m_serializer.Serialize(writer, im);
writer.Flush();
imXml = Util.UTF8NoBomEncoding.GetString(mstream.ToArray());
}
imXml = Util.UTF8NoBomEncoding.GetString(mstream.ToArray());
}
OfflineIMData data = new OfflineIMData();

View File

@ -93,7 +93,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.XmlResolver = null;
xmlDoc.LoadXml(xmlSource);
if (xmlDoc.FirstChild.Name == "Nini")
{
@ -123,7 +122,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
throw ex;
}
if (regionCount > 0 | allowRegionless)
if (regionCount > 0 || allowRegionless)
return regionInfos;
m_log.Debug("[WEBLOADER]: Request yielded no regions.");

View File

@ -1934,7 +1934,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
GetSceneFromRegionParams(requestData, responseData, out scene);
health = scene.GetHealth(out flags, out text);
}
catch (Exception e)
catch
{
responseData["error"] = null;
}
@ -3138,7 +3138,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (File.Exists(defaultAppearanceFileName))
{
XmlDocument doc = new XmlDocument();
doc.XmlResolver=null;
string name = "*unknown*";
string email = "anon@anon";
uint regionXLocation = 1000;

View File

@ -28,6 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.IO;
using System.Reflection;
using System.Threading;
@ -49,9 +50,9 @@ namespace OpenSim.Framework.Capabilities
/// </summary>
public delegate IClientAPI GetClientDelegate(UUID agentID);
public class Caps
public class Caps : IDisposable
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_httpListenerHostName;
private uint m_httpListenPort;
@ -64,8 +65,8 @@ namespace OpenSim.Framework.Capabilities
private CapsHandlers m_capsHandlers;
private Dictionary<string, PollServiceEventArgs> m_pollServiceHandlers
= new Dictionary<string, PollServiceEventArgs>();
private ConcurrentDictionary<string, PollServiceEventArgs> m_pollServiceHandlers
= new ConcurrentDictionary<string, PollServiceEventArgs>();
private Dictionary<string, string> m_externalCapsHandlers = new Dictionary<string, string>();
@ -119,6 +120,19 @@ namespace OpenSim.Framework.Capabilities
get { return m_externalCapsHandlers; }
}
[Flags]
public enum CapsFlags:uint
{
None = 0,
SentSeeds = 1,
ObjectAnim = 0x100,
WLEnv = 0x200,
AdvEnv = 0x400
}
public CapsFlags Flags { get; set;}
public Caps(IHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
UUID agent, string regionName)
{
@ -138,12 +152,35 @@ namespace OpenSim.Framework.Capabilities
m_agentID = agent;
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort);
m_regionName = regionName;
Flags = CapsFlags.None;
m_capsActive.Reset();
}
~Caps()
{
m_capsActive.Dispose();
Flags = CapsFlags.None;
if (m_capsActive!= null)
{
m_capsActive.Dispose();
m_capsActive = null;
}
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
public void Dispose(bool disposing)
{
Flags = CapsFlags.None;
if (m_capsActive != null)
{
DeregisterHandlers();
m_capsActive.Dispose();
m_capsActive = null;
}
}
/// <summary>
@ -157,15 +194,27 @@ namespace OpenSim.Framework.Capabilities
m_capsHandlers[capName] = handler;
}
public void RegisterSimpleHandler(string capName, ISimpleStreamHandler handler, bool addToListener = true)
{
//m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
m_capsHandlers.AddSimpleHandler(capName, handler, addToListener);
}
public void RegisterPollHandler(string capName, PollServiceEventArgs pollServiceHandler)
{
// m_log.DebugFormat(
// "[CAPS]: Registering handler with name {0}, url {1} for {2}",
// capName, pollServiceHandler.Url, m_agentID, m_regionName);
m_pollServiceHandlers.Add(capName, pollServiceHandler);
if(!m_pollServiceHandlers.TryAdd(capName, pollServiceHandler))
{
m_log.ErrorFormat(
"[CAPS]: Handler with name {0} already registered (ulr {1}, agent {2}, region {3}",
capName, pollServiceHandler.Url, m_agentID, m_regionName);
return;
}
m_httpListener.AddPollServiceHTTPHandler(pollServiceHandler.Url, pollServiceHandler);
m_httpListener.AddPollServiceHTTPHandler(pollServiceHandler);
// uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
// string protocol = "http";
@ -205,8 +254,9 @@ namespace OpenSim.Framework.Capabilities
foreach (PollServiceEventArgs handler in m_pollServiceHandlers.Values)
{
m_httpListener.RemovePollServiceHTTPHandler("", handler.Url);
m_httpListener.RemovePollServiceHTTPHandler(handler.Url);
}
m_pollServiceHandlers.Clear();
}
public bool TryGetPollHandler(string name, out PollServiceEventArgs pollHandler)
@ -245,9 +295,6 @@ namespace OpenSim.Framework.Capabilities
port = MainServer.Instance.SSLPort;
protocol = "https";
}
//
// caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
caps[kvp.Key] = string.Format("{0}://{1}:{2}{3}", protocol, hostName, port, kvp.Value.Url);
}
}
@ -261,6 +308,7 @@ namespace OpenSim.Framework.Capabilities
caps[kvp.Key] = kvp.Value;
}
return caps;
}

View File

@ -27,6 +27,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@ -40,6 +41,7 @@ namespace OpenSim.Framework.Capabilities
public class CapsHandlers
{
private Dictionary<string, IRequestHandler> m_capsHandlers = new Dictionary<string, IRequestHandler>();
private ConcurrentDictionary<string, ISimpleStreamHandler> m_capsSimpleHandlers = new ConcurrentDictionary<string, ISimpleStreamHandler>();
private IHttpServer m_httpListener;
private string m_httpListenerHostName;
private uint m_httpListenerPort;
@ -73,17 +75,35 @@ namespace OpenSim.Framework.Capabilities
{
lock (m_capsHandlers)
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("PUT", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
if(m_capsHandlers.ContainsKey(capsName))
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("PUT", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("DELETE", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
}
if(m_capsSimpleHandlers.TryRemove(capsName, out ISimpleStreamHandler hdr))
{
m_httpListener.RemoveSimpleStreamHandler(hdr.Path);
}
}
public void AddSimpleHandler(string capName, ISimpleStreamHandler handler, bool addToListener = true)
{
if(ContainsCap(capName))
Remove(capName);
if(m_capsSimpleHandlers.TryAdd(capName, handler) && addToListener)
m_httpListener.AddSimpleStreamHandler(handler);
}
public bool ContainsCap(string cap)
{
lock (m_capsHandlers)
return m_capsHandlers.ContainsKey(cap);
if (m_capsHandlers.ContainsKey(cap))
return true;
return m_capsSimpleHandlers.ContainsKey(cap);
}
/// <summary>
@ -110,6 +130,9 @@ namespace OpenSim.Framework.Capabilities
if (m_capsHandlers.ContainsKey(idx))
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
m_httpListener.RemoveStreamHandler("PUT", m_capsHandlers[idx].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[idx].Path);
m_httpListener.RemoveStreamHandler("DELETE", m_capsHandlers[idx].Path);
m_capsHandlers.Remove(idx);
}
@ -131,8 +154,9 @@ namespace OpenSim.Framework.Capabilities
{
lock (m_capsHandlers)
{
string[] __keys = new string[m_capsHandlers.Keys.Count];
string[] __keys = new string[m_capsHandlers.Keys.Count + m_capsSimpleHandlers.Keys.Count];
m_capsHandlers.Keys.CopyTo(__keys, 0);
m_capsSimpleHandlers.Keys.CopyTo(__keys, m_capsHandlers.Keys.Count);
return __keys;
}
}
@ -146,24 +170,39 @@ namespace OpenSim.Framework.Capabilities
public Hashtable GetCapsDetails(bool excludeSeed, List<string> requestedCaps)
{
Hashtable caps = new Hashtable();
string protocol = "http://";
if (m_useSSL)
protocol = "https://";
string protocol = m_useSSL ? "https://" : "http://";
string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
if (requestedCaps == null)
{
lock (m_capsHandlers)
{
foreach (KeyValuePair<string, ISimpleStreamHandler> kvp in m_capsSimpleHandlers)
caps[kvp.Key] = baseUrl + kvp.Value.Path;
foreach (KeyValuePair<string, IRequestHandler> kvp in m_capsHandlers)
caps[kvp.Key] = baseUrl + kvp.Value.Path;
}
return caps;
}
lock (m_capsHandlers)
{
foreach (string capsName in m_capsHandlers.Keys)
for(int i = 0; i < requestedCaps.Count; ++i)
{
string capsName = requestedCaps[i];
if (excludeSeed && "SEED" == capsName)
continue;
if (requestedCaps != null && !requestedCaps.Contains(capsName))
if (m_capsSimpleHandlers.TryGetValue(capsName, out ISimpleStreamHandler shdr))
{
caps[capsName] = baseUrl + shdr.Path;
continue;
caps[capsName] = baseUrl + m_capsHandlers[capsName].Path;
}
if (m_capsHandlers.TryGetValue(capsName, out IRequestHandler chdr))
{
caps[capsName] = baseUrl + chdr.Path;
}
}
}

View File

@ -1,116 +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 System.Collections.Specialized;
using System.IO;
using System.Reflection;
using System.Web;
using log4net;
using Nini.Config;
using OpenMetaverse;
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 AvatarPickerSearchHandler : BaseStreamHandler
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IPeople m_PeopleService;
public AvatarPickerSearchHandler(string path, IPeople peopleService, string name, string description)
: base("GET", path, name, description)
{
m_PeopleService = peopleService;
}
protected override byte[] ProcessRequest(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);
string names = query.GetOne("names");
string psize = query.GetOne("page_size");
string pnumber = query.GetOne("page");
if (m_PeopleService == null)
return FailureResponse(names, (int)System.Net.HttpStatusCode.InternalServerError, httpResponse);
if (string.IsNullOrEmpty(names) || names.Length < 3)
return FailureResponse(names, (int)System.Net.HttpStatusCode.BadRequest, httpResponse);
m_log.DebugFormat("[AVATAR PICKER SEARCH]: search for {0}", names);
int page_size = (string.IsNullOrEmpty(psize) ? 500 : Int32.Parse(psize));
int page_number = (string.IsNullOrEmpty(pnumber) ? 1 : Int32.Parse(pnumber));
// Full content request
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.OK;
//httpResponse.ContentLength = ??;
httpResponse.ContentType = "application/llsd+xml";
List<UserData> users = m_PeopleService.GetUserData(names, page_size, page_number);
LLSDAvatarPicker osdReply = new LLSDAvatarPicker();
osdReply.next_page_url = httpRequest.RawUrl;
foreach (UserData u in users)
osdReply.agents.Array.Add(ConvertUserData(u));
string reply = LLSDHelpers.SerialiseLLSDReply(osdReply);
return System.Text.Encoding.UTF8.GetBytes(reply);
}
private LLSDPerson ConvertUserData(UserData user)
{
LLSDPerson p = new LLSDPerson();
p.legacy_first_name = user.FirstName;
p.legacy_last_name = user.LastName;
p.display_name = user.FirstName + " " + user.LastName;
if (user.LastName.StartsWith("@"))
p.username = user.FirstName.ToLower() + user.LastName.ToLower();
else
p.username = user.FirstName.ToLower() + "." + user.LastName.ToLower();
p.id = user.Id;
p.is_display_name_default = false;
return p;
}
private byte[] FailureResponse(string names, int statuscode, IOSHttpResponse httpResponse)
{
m_log.Error("[AVATAR PICKER SEARCH]: Error searching for " + names);
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
return System.Text.Encoding.UTF8.GetBytes(string.Empty);
}
}
}

View File

@ -29,9 +29,12 @@ using System;
using Nini.Config;
using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Server.Handlers.Base;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Capabilities.Handlers
{
@ -67,16 +70,16 @@ namespace OpenSim.Capabilities.Handlers
m_LibraryService =
ServerUtils.LoadPlugin<ILibraryService>(libService, args);
FetchInvDescHandler webFetchHandler = new FetchInvDescHandler(m_InventoryService, m_LibraryService, null);
IRequestHandler reqHandler
= new RestStreamHandler(
"POST",
"/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/,
webFetchHandler.FetchInventoryDescendentsRequest,
"FetchInvDescendents",
null);
server.AddStreamHandler(reqHandler);
}
ExpiringKey<UUID> m_badRequests = new ExpiringKey<UUID>(30000);
FetchInvDescHandler webFetchHandler = new FetchInvDescHandler(m_InventoryService, m_LibraryService, null);
ISimpleStreamHandler reqHandler
= new SimpleStreamHandler("/CAPS/WebFetchInvDesc/", delegate(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
webFetchHandler.FetchInventoryDescendentsRequest(httpRequest, httpResponse, m_badRequests);
});
server.AddSimpleStreamHandler(reqHandler);
}
}
}

View File

@ -25,11 +25,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Net;
using System.Reflection;
using System.Text;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
@ -59,9 +60,6 @@ namespace OpenSim.Capabilities.Handlers
OSDMap requestmap = (OSDMap)OSDParser.DeserializeLLSDXml(Utils.StringToBytes(request));
OSDArray itemsRequested = (OSDArray)requestmap["items"];
string reply;
LLSDFetchInventory llsdReply = new LLSDFetchInventory();
UUID[] itemIDs = new UUID[itemsRequested.Count];
int i = 0;
@ -75,15 +73,6 @@ namespace OpenSim.Capabilities.Handlers
if (m_agentID != UUID.Zero)
{
items = m_inventoryService.GetMultipleItems(m_agentID, itemIDs);
if (items == null)
{
// OMG!!! One by one!!! This is fallback code, in case the backend isn't updated
m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one.");
items = new InventoryItemBase[itemsRequested.Count];
foreach (UUID id in itemIDs)
items[i++] = m_inventoryService.GetItem(m_agentID, id);
}
}
else
{
@ -92,55 +81,86 @@ namespace OpenSim.Capabilities.Handlers
items[i++] = m_inventoryService.GetItem(UUID.Zero, id);
}
foreach (InventoryItemBase item in items)
StringBuilder lsl = LLSDxmlEncode.Start(4096);
LLSDxmlEncode.AddMap(lsl);
if(m_agentID == UUID.Zero && items.Length > 0)
LLSDxmlEncode.AddElem("agent_id", items[0].Owner, lsl);
else
LLSDxmlEncode.AddElem("agent_id", m_agentID, lsl);
if(items == null || items.Length == 0)
{
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));
}
LLSDxmlEncode.AddEmptyArray("items", lsl);
}
else
{
LLSDxmlEncode.AddArray("items", lsl);
foreach (InventoryItemBase item in items)
{
if (item != null)
item.ToLLSDxml(lsl, 0xff);
}
LLSDxmlEncode.AddEndArray(lsl);
}
reply = LLSDHelpers.SerialiseLLSDReply(llsdReply);
return reply;
LLSDxmlEncode.AddEndMap(lsl);
return LLSDxmlEncode.End(lsl);
}
/// <summary>
/// Convert an internal inventory item object into an LLSD object.
/// </summary>
/// <param name="invItem"></param>
/// <returns></returns>
private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
public void FetchInventorySimpleRequest(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, OSDMap requestmap, ExpiringKey<UUID> BadRequests)
{
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
llsdItem.asset_id = invItem.AssetID;
llsdItem.created_at = invItem.CreationDate;
llsdItem.desc = invItem.Description;
llsdItem.flags = ((int)invItem.Flags) & 0xff;
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
llsdItem.type = invItem.AssetType;
llsdItem.inv_type = invItem.InvType;
//m_log.DebugFormat("[FETCH INVENTORY HANDLER]: Received FetchInventory capability request {0}", request);
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;
llsdItem.sale_info.sale_type = invItem.SaleType;
if(BadRequests == null)
{
httpResponse.StatusCode = (int)HttpStatusCode.NotFound;
return;
}
return llsdItem;
OSDArray itemsRequested = (OSDArray)requestmap["items"];
UUID[] itemIDs = new UUID[itemsRequested.Count];
int i = 0;
foreach (OSDMap osdItemId in itemsRequested)
{
UUID id = osdItemId["item_id"].AsUUID();
if(!BadRequests.ContainsKey(id))
itemIDs[i++] = id;
}
InventoryItemBase[] items = null;
try
{
// badrequests still not filled
items = m_inventoryService.GetMultipleItems(m_agentID, itemIDs);
}
catch{ }
StringBuilder lsl = LLSDxmlEncode.Start(4096);
LLSDxmlEncode.AddMap(lsl);
LLSDxmlEncode.AddElem("agent_id", m_agentID, lsl);
if (items == null || items.Length == 0)
{
LLSDxmlEncode.AddEmptyArray("items", lsl);
}
else
{
LLSDxmlEncode.AddArray("items", lsl);
foreach (InventoryItemBase item in items)
{
if (item != null)
item.ToLLSDxml(lsl, 0xff);
}
LLSDxmlEncode.AddEndArray(lsl);
}
LLSDxmlEncode.AddEndMap(lsl);
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDxmlEncode.End(lsl));
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
}
}

View File

@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using log4net;
using log4net.Config;
@ -46,7 +46,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
[TestFixture]
public class FetchInventoryDescendents2HandlerTests : OpenSimTestCase
{
private UUID m_userID = UUID.Zero;
private UUID m_userID = new UUID("00000000-0000-0000-0000-000000000001");
private Scene m_scene;
private UUID m_rootFolderID;
private int m_rootDescendents;
@ -103,6 +103,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
// Add a folder
InventoryFolderBase folder = new InventoryFolderBase(new UUID("f0000000-0000-0000-0000-00000000000f"), "Test Folder", m_userID, m_rootFolderID);
folder.Type = (short)FolderType.None;
m_scene.InventoryService.AddFolder(folder);
// Add a link to notecard 2 in Test Folder
@ -126,6 +127,19 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
Console.WriteLine("Number of descendents: " + m_rootDescendents);
}
private string dorequest(FetchInvDescHandler handler, string request)
{
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
using(ExpiringKey<UUID> bad = new ExpiringKey<UUID>(5000)) // bad but this is test
using (MemoryStream ms = new MemoryStream(Utils.StringToBytes(request), false))
{
req.InputStream = ms;
handler.FetchInventoryDescendentsRequest(req, resp, bad);
}
return Util.UTF8.GetString(resp.RawBuffer);
}
[Test]
public void Test_001_SimpleFolder()
{
@ -134,18 +148,18 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
Init();
FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
request += m_rootFolderID;
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
request += "</uuid><key>owner_id</key><uuid>";
request += m_userID.ToString();
request += "</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
string llsdresponse = dorequest(handler, request);
Assert.That(llsdresponse != null, Is.True, "Incorrect null response");
Assert.That(llsdresponse != string.Empty, Is.True, "Incorrect empty response");
Assert.That(llsdresponse.Contains("00000000-0000-0000-0000-000000000000"), Is.True, "Response should contain userID");
Assert.That(llsdresponse.Contains(m_userID.ToString()), Is.True, "Response should contain userID");
string descendents = "descendents</key><integer>" + m_rootDescendents + "</integer>";
Assert.That(llsdresponse.Contains(descendents), Is.True, "Incorrect number of descendents");
@ -158,19 +172,17 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
TestHelpers.InMethod();
FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
string request = "<llsd><map><key>folders</key><array>";
request += "<map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
request += m_rootFolderID;
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map>";
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000001</uuid><key>sort_order</key><integer>1</integer></map>";
request += "<map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
request += m_notecardsFolder;
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map>";
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000001</uuid><key>sort_order</key><integer>1</integer></map>";
request += "</array></map></llsd>";
string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
string llsdresponse = dorequest(handler, request);
Console.WriteLine(llsdresponse);
string descendents = "descendents</key><integer>" + m_rootDescendents + "</integer>";
@ -188,14 +200,12 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
TestHelpers.InMethod();
FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
request += "f0000000-0000-0000-0000-00000000000f";
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000001</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
string llsdresponse = dorequest(handler, request);
Console.WriteLine(llsdresponse);
string descendents = "descendents</key><integer>2</integer>";
@ -232,8 +242,6 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
TestHelpers.InMethod();
FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
string request = "<llsd><map><key>folders</key><array>";
request += "<map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
@ -250,7 +258,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map>";
request += "</array></map></llsd>";
string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
string llsdresponse = dorequest(handler, request);
Console.WriteLine(llsdresponse);
string root_folder = "<key>folder_id</key><uuid>" + m_rootFolderID + "</uuid>";
@ -267,27 +275,26 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
[Test]
public void Test_005_FolderZero()
{
TestHelpers.InMethod();
Init();
FetchInvDescHandler handler = new FetchInvDescHandler(m_scene.InventoryService, null, m_scene);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
request += UUID.Zero;
request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
string llsdresponse = dorequest(handler, request);
Assert.That(llsdresponse != null, Is.True, "Incorrect null response");
Assert.That(llsdresponse != string.Empty, Is.True, "Incorrect empty response");
Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder");
// we do return a answer now
//Assert.That(llsdresponse.Contains("bad_folders</key><array><uuid>00000000-0000-0000-0000-000000000000"), Is.True, "Folder Zero should be a bad folder");
Console.WriteLine(llsdresponse);
}
}
}

View File

@ -0,0 +1,190 @@
/*
* 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.Net;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers
{
public class GetAssetsHandler
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly Dictionary<string, AssetType> queryTypes = new Dictionary<string, AssetType>()
{
{"texture_id", AssetType.Texture},
{"sound_id", AssetType.Sound},
{"callcard_id", AssetType.CallingCard},
{"landmark_id", AssetType.Landmark},
{"script_id", AssetType.LSLText},
{"clothing_id", AssetType.Clothing},
{"object_id", AssetType.Object},
{"notecard_id", AssetType.Notecard},
{"lsltext_id", AssetType.LSLText},
{"lslbyte_id", AssetType.LSLBytecode},
{"txtr_tga_id", AssetType.TextureTGA},
{"bodypart_id", AssetType.Bodypart},
{"snd_wav_id", AssetType.SoundWAV},
{"img_tga_id", AssetType.ImageTGA},
{"jpeg_id", AssetType.ImageJPEG},
{"animatn_id", AssetType.Animation},
{"gesture_id", AssetType.Gesture},
{"mesh_id", AssetType.Mesh},
{"settings_id", AssetType.Settings}
};
private IAssetService m_assetService;
public GetAssetsHandler(IAssetService assService)
{
m_assetService = assService;
}
public void Handle(OSHttpRequest req, OSHttpResponse response)
{
response.ContentType = "text/plain";
if (m_assetService == null)
{
response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
response.KeepAlive = false;
return;
}
response.StatusCode = (int)HttpStatusCode.BadRequest;
var queries = req.QueryAsDictionary;
if(queries.Count == 0)
return;
AssetType type = AssetType.Unknown;
string assetStr = string.Empty;
foreach (KeyValuePair<string,string> kvp in queries)
{
if (queryTypes.ContainsKey(kvp.Key))
{
type = queryTypes[kvp.Key];
assetStr = kvp.Value;
break;
}
}
if(type == AssetType.Unknown)
{
//m_log.Warn("[GETASSET]: Unknown type: " + query);
m_log.Warn("[GETASSET]: Unknown type");
response.StatusCode = (int)HttpStatusCode.NotFound;
return;
}
if (String.IsNullOrEmpty(assetStr))
return;
UUID assetID = UUID.Zero;
if(!UUID.TryParse(assetStr, out assetID))
return;
AssetBase asset = m_assetService.Get(assetID.ToString());
if(asset == null)
{
// m_log.Warn("[GETASSET]: not found: " + query + " " + assetStr);
response.StatusCode = (int)HttpStatusCode.NotFound;
return;
}
if (asset.Type != (sbyte)type)
return;
int len = asset.Data.Length;
string range = null;
if (req.Headers["Range"] != null)
range = req.Headers["Range"];
else if (req.Headers["range"] != null)
range = req.Headers["range"];
// range request
int start, end;
if (Util.TryParseHttpRange(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 >= asset.Data.Length)
{
response.StatusCode = (int)HttpStatusCode.RequestedRangeNotSatisfiable;
return;
}
if (end == -1)
end = asset.Data.Length - 1;
else
end = Utils.Clamp(end, 0, asset.Data.Length - 1);
start = Utils.Clamp(start, 0, end);
len = end - start + 1;
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, asset.Data.Length));
response.StatusCode = (int)HttpStatusCode.PartialContent;
response.RawBufferStart = start;
}
else
response.StatusCode = (int)HttpStatusCode.OK;
response.ContentType = asset.Metadata.ContentType;
response.RawBuffer = asset.Data;
response.RawBufferLen = len;
if (type == AssetType.Mesh || type == AssetType.Texture)
{
if(len > 8196)
{
//if(type == AssetType.Texture && ((asset.Flags & AssetFlags.AvatarBake)!= 0))
// responsedata["prio"] = 1;
//else
response.Priority = 2;
}
else
response.Priority = 1;
}
else
response.Priority = -1;
}
}
}

View File

@ -1,117 +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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Reflection;
using System.IO;
using System.Web;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
namespace OpenSim.Capabilities.Handlers
{
public class GetDisplayNamesHandler : BaseStreamHandler
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected IUserManagement m_UserManagement;
public GetDisplayNamesHandler(string path, IUserManagement umService, string name, string description)
: base("GET", path, name, description)
{
m_UserManagement = umService;
}
protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// m_log.DebugFormat("[GET_DISPLAY_NAMES]: called {0}", httpRequest.Url.Query);
NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
string[] ids = query.GetValues("ids");
if (m_UserManagement == null)
{
m_log.Error("[GET_DISPLAY_NAMES]: Cannot fetch display names without a user management component");
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError;
return new byte[0];
}
Dictionary<UUID,string> names = m_UserManagement.GetUsersNames(ids);
OSDMap osdReply = new OSDMap();
OSDArray agents = new OSDArray();
osdReply["agents"] = agents;
foreach (KeyValuePair<UUID,string> kvp in names)
{
if (string.IsNullOrEmpty(kvp.Value))
continue;
if(kvp.Key == UUID.Zero)
continue;
string[] parts = kvp.Value.Split(new char[] {' '});
OSDMap osdname = new OSDMap();
if(parts[0] == "Unknown")
{
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
}
else
{
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
}
osdname["display_name"] = OSD.FromString(kvp.Value);
osdname["legacy_first_name"] = parts[0];
osdname["legacy_last_name"] = parts[1];
osdname["username"] = OSD.FromString(kvp.Value);
osdname["id"] = OSD.FromUUID(kvp.Key);
osdname["is_display_name_default"] = OSD.FromBoolean(true);
agents.Add(osdname);
}
// Full content request
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.OK;
//httpResponse.ContentLength = ??;
httpResponse.ContentType = "application/llsd+xml";
string reply = OSDParser.SerializeLLSDXmlString(osdReply);
return System.Text.Encoding.UTF8.GetBytes(reply);
}
}
}

View File

@ -1,69 +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 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 GetDisplayNamesServerConnector : ServiceConnector
{
private IUserManagement m_UserManagement;
private string m_ConfigName = "CapsService";
public GetDisplayNamesServerConnector(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 umService = serverConfig.GetString("AssetService", String.Empty);
if (umService == String.Empty)
throw new Exception("No AssetService in config file");
Object[] args = new Object[] { config };
m_UserManagement =
ServerUtils.LoadPlugin<IUserManagement>(umService, args);
if (m_UserManagement == null)
throw new Exception(String.Format("Failed to load UserManagement from {0}; config is {1}", umService, m_ConfigName));
server.AddStreamHandler(
new GetDisplayNamesHandler("/CAPS/agents/", m_UserManagement, "GetDisplayNames", null));
}
}
}

View File

@ -41,9 +41,6 @@ using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers
{
public class GetMeshHandler
@ -61,211 +58,98 @@ namespace OpenSim.Capabilities.Handlers
}
public Hashtable Handle(Hashtable request)
{
Hashtable ret = new Hashtable();
ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
ret["content_type"] = "text/plain";
ret["keepalive"] = false;
ret["reusecontext"] = false;
ret["int_bytes"] = 0;
ret["int_lod"] = 0;
string MeshStr = (string)request["mesh_id"];
//m_log.DebugFormat("[GETMESH]: called {0}", MeshStr);
if (m_assetService == null)
{
m_log.Error("[GETMESH]: Cannot fetch mesh " + MeshStr + " without an asset service");
}
UUID meshID;
if (!String.IsNullOrEmpty(MeshStr) && UUID.TryParse(MeshStr, out meshID))
{
// m_log.DebugFormat("[GETMESH]: Received request for mesh id {0}", meshID);
ret = ProcessGetMesh(request, UUID.Zero, null);
}
else
{
m_log.Warn("[GETMESH]: Failed to parse a mesh_id from GetMesh request: " + (string)request["uri"]);
}
return ret;
return ProcessGetMesh(request, UUID.Zero, null); ;
}
public Hashtable ProcessGetMesh(Hashtable request, UUID AgentId, Caps cap)
{
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 400; //501; //410; //404;
if (m_assetService == null)
{
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.ServiceUnavailable;
responsedata["str_response_string"] = "The asset service is unavailable";
responsedata["keepalive"] = false;
return responsedata;
}
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.BadRequest;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Request wasn't what was expected";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
responsedata["int_bytes"] = 0;
string meshStr = string.Empty;
if (request.ContainsKey("mesh_id"))
meshStr = request["mesh_id"].ToString();
if (String.IsNullOrEmpty(meshStr))
return responsedata;
UUID meshID = UUID.Zero;
if (!String.IsNullOrEmpty(meshStr) && UUID.TryParse(meshStr, out meshID))
if(!UUID.TryParse(meshStr, out meshID))
return responsedata;
AssetBase mesh = m_assetService.Get(meshID.ToString());
if(mesh == null)
{
if (m_assetService == null)
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "The asset service is unavailable. So is your mesh.";
responsedata["reusecontext"] = false;
return responsedata;
}
AssetBase mesh = m_assetService.Get(meshID.ToString());
if (mesh != null)
{
if (mesh.Type == (SByte)AssetType.Mesh)
{
Hashtable headers = new Hashtable();
responsedata["headers"] = headers;
string range = String.Empty;
if (((Hashtable)request["headers"])["range"] != null)
range = (string)((Hashtable)request["headers"])["range"];
else if (((Hashtable)request["headers"])["Range"] != null)
range = (string)((Hashtable)request["headers"])["Range"];
if (!String.IsNullOrEmpty(range)) // Mesh Asset LOD // Physics
{
// 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 >= mesh.Data.Length)
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "This range doesnt exist.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
return responsedata;
}
else
{
end = Utils.Clamp(end, 0, mesh.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);
if (start > 20000)
{
responsedata["int_lod"] = 3;
}
else if (start < 4097)
{
responsedata["int_lod"] = 1;
}
else
{
responsedata["int_lod"] = 2;
}
if (start == 0 && len == mesh.Data.Length) // well redudante maybe
{
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
responsedata["bin_response_data"] = mesh.Data;
responsedata["int_bytes"] = mesh.Data.Length;
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
}
else
{
responsedata["int_response_code"] =
(int)System.Net.HttpStatusCode.PartialContent;
headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end,
mesh.Data.Length);
byte[] d = new byte[len];
Array.Copy(mesh.Data, start, d, 0, len);
responsedata["bin_response_data"] = d;
responsedata["int_bytes"] = len;
responsedata["reusecontext"] = false;
}
}
}
else
{
m_log.Warn("[GETMESH]: Failed to parse a range from GetMesh request, sending full asset: " + (string)request["uri"]);
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
}
}
else
{
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 3;
}
}
// Optionally add additional mesh types here
else
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 1;
return responsedata;
}
}
else
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
responsedata["reusecontext"] = false;
responsedata["int_lod"] = 0;
return responsedata;
}
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
responsedata["str_response_string"] = "Mesh not found.";
return responsedata;
}
if (mesh.Type != (SByte)AssetType.Mesh)
{
responsedata["str_response_string"] = "Asset isn't a mesh.";
return responsedata;
}
string range = String.Empty;
if (((Hashtable)request["headers"])["range"] != null)
range = (string)((Hashtable)request["headers"])["range"];
else if (((Hashtable)request["headers"])["Range"] != null)
range = (string)((Hashtable)request["headers"])["Range"];
responsedata["content_type"] = "application/vnd.ll.mesh";
if (String.IsNullOrEmpty(range))
{
// full mesh
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
return responsedata;
}
// range request
int start, end;
if (Util.TryParseHttpRange(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 >= mesh.Data.Length)
{
responsedata["str_response_string"] = "This range doesnt exist.";
return responsedata;
}
end = Utils.Clamp(end, 0, mesh.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);
Hashtable headers = new Hashtable();
headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, mesh.Data.Length);
responsedata["headers"] = headers;
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
byte[] d = new byte[len];
Array.Copy(mesh.Data, start, d, 0, len);
responsedata["bin_response_data"] = d;
responsedata["int_bytes"] = len;
return responsedata;
}
m_log.Warn("[GETMESH]: Failed to parse a range from GetMesh request, sending full asset: " + (string)request["uri"]);
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
return responsedata;
}
private bool TryParseRange(string header, out int start, out int end)
{
if (header.StartsWith("bytes="))
{
string[] rangeValues = header.Substring(6).Split('-');
if (rangeValues.Length == 2)
{
if (Int32.TryParse(rangeValues[0], out start) && Int32.TryParse(rangeValues[1], out end))
return true;
}
}
start = end = 0;
return false;
}
}
}

View File

@ -68,7 +68,7 @@ namespace OpenSim.Capabilities.Handlers
IRequestHandler reqHandler
= new RestHTTPHandler(
"GET",
"/CAPS/" + UUID.Random(),
"/" + UUID.Random(),
httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null),
"GetMesh",
null);

View File

@ -66,8 +66,6 @@ namespace OpenSim.Capabilities.Handlers
Hashtable ret = new Hashtable();
ret["int_response_code"] = (int)System.Net.HttpStatusCode.NotFound;
ret["content_type"] = "text/plain";
ret["keepalive"] = false;
ret["reusecontext"] = false;
ret["int_bytes"] = 0;
string textureStr = (string)request["texture_id"];
string format = (string)request["format"];
@ -112,8 +110,6 @@ namespace OpenSim.Capabilities.Handlers
ret["error_status_text"] = "not found";
ret["str_response_string"] = "not found";
ret["content_type"] = "text/plain";
ret["keepalive"] = false;
ret["reusecontext"] = false;
ret["int_bytes"] = 0;
}
}
@ -214,7 +210,7 @@ namespace OpenSim.Capabilities.Handlers
{
// Range request
int start, end;
if (TryParseRange(range, out start, out end))
if (Util.TryParseHttpRange(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
@ -253,24 +249,13 @@ namespace OpenSim.Capabilities.Handlers
// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
response["content-type"] = texture.Metadata.ContentType;
response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length);
if (start == 0 && len == texture.Data.Length) // well redudante maybe
{
response["int_response_code"] = (int)System.Net.HttpStatusCode.OK;
response["bin_response_data"] = texture.Data;
response["int_bytes"] = texture.Data.Length;
}
else
{
response["int_response_code"] = (int)System.Net.HttpStatusCode.PartialContent;
headers["Content-Range"] = String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length);
byte[] d = new byte[len];
Array.Copy(texture.Data, start, d, 0, len);
response["bin_response_data"] = d;
response["int_bytes"] = len;
}
// response.Body.Write(texture.Data, start, len);
byte[] d = new byte[len];
Array.Copy(texture.Data, start, d, 0, len);
response["bin_response_data"] = d;
response["int_bytes"] = len;
}
}
else
@ -304,50 +289,6 @@ namespace OpenSim.Capabilities.Handlers
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
}
/// <summary>
/// Parse a range header.
/// </summary>
/// <remarks>
/// As per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,
/// this obeys range headers with two values (e.g. 533-4165) and no second value (e.g. 533-).
/// Where there is no value, -1 is returned.
/// FIXME: Need to cover the case where only a second value is specified (e.g. -4165), probably by returning -1
/// for start.</remarks>
/// <returns></returns>
/// <param name='header'></param>
/// <param name='start'>Start of the range. Undefined if this was not a number.</param>
/// <param name='end'>End of the range. Will be -1 if no end specified. Undefined if there was a raw string but this was not a number.</param>
private bool TryParseRange(string header, out int start, out int end)
{
start = end = 0;
if (header.StartsWith("bytes="))
{
string[] rangeValues = header.Substring(6).Split('-');
if (rangeValues.Length == 2)
{
if (!Int32.TryParse(rangeValues[0], out start))
return false;
string rawEnd = rangeValues[1];
if (rawEnd == "")
{
end = -1;
return true;
}
else if (Int32.TryParse(rawEnd, out end))
{
return true;
}
}
}
start = end = 0;
return false;
}
private byte[] ConvertTextureData(AssetBase texture, string format)
{
m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format);

View File

@ -32,6 +32,7 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Reflection;
using System.IO;
using System.Net;
using System.Web;
using log4net;
using Nini.Config;
@ -131,50 +132,46 @@ namespace OpenSim.Capabilities.Handlers
/// <returns>False for "caller try another codec"; true otherwise</returns>
private bool FetchTexture(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID textureID, string format)
{
// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
AssetBase texture;
// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
if(!String.IsNullOrEmpty(m_RedirectURL))
{
string textureUrl = m_RedirectURL + "?texture_id=" + textureID.ToString();
m_log.Debug("[GETTEXTURE]: Redirecting texture request to " + textureUrl);
httpResponse.StatusCode = (int)OSHttpStatusCode.RedirectMovedPermanently;
httpResponse.RedirectLocation = textureUrl;
httpResponse.StatusCode = (int)HttpStatusCode.Moved;
httpResponse.AddHeader("Location:", textureUrl);
return true;
}
else // no redirect
{
texture = m_assetService.Get(textureID.ToString());
if(texture != null)
{
if(texture.Type != (sbyte)AssetType.Texture)
{
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
return true;
}
if(format == DefaultFormat)
{
WriteTextureData(httpRequest, httpResponse, texture, format);
return true;
}
else
{
AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID);
newTexture.Data = ConvertTextureData(texture, format);
if(newTexture.Data.Length == 0)
return false; // !!! Caller try another codec, please!
newTexture.Flags = AssetFlags.Collectable;
newTexture.Temporary = true;
newTexture.Local = true;
WriteTextureData(httpRequest, httpResponse, newTexture, format);
return true;
}
// Fetch, Misses or invalid return a 404
AssetBase texture = m_assetService.Get(textureID.ToString());
if (texture != null)
{
if (texture.Type != (sbyte)AssetType.Texture)
{
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
return true;
}
if (format == DefaultFormat)
{
WriteTextureData(httpRequest, httpResponse, texture, format);
return true;
}
// need to convert format
AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID);
newTexture.Data = ConvertTextureData(texture, format);
if (newTexture.Data.Length == 0)
return false; // !!! Caller try another codec, please!
newTexture.Flags = AssetFlags.Collectable;
newTexture.Temporary = true;
newTexture.Local = true;
WriteTextureData(httpRequest, httpResponse, newTexture, format);
return true;
}
// not found
// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
return true;
}
@ -242,8 +239,9 @@ namespace OpenSim.Capabilities.Handlers
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.RawBuffer = texture.Data;
response.RawBufferStart = start;
response.RawBufferLen = len;
}
}
else
@ -261,17 +259,19 @@ namespace OpenSim.Capabilities.Handlers
response.ContentType = texture.Metadata.ContentType;
else
response.ContentType = "image/" + format;
response.Body.Write(texture.Data, 0, texture.Data.Length);
response.RawBuffer = texture.Data;
response.RawBufferStart = 0;
response.RawBufferLen = 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);
// 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);
}
/// <summary>

View File

@ -66,7 +66,7 @@ namespace OpenSim.Capabilities.Handlers
string rurl = serverConfig.GetString("GetTextureRedirectURL");
;
server.AddStreamHandler(
new GetTextureRobustHandler("/CAPS/GetTexture/", m_AssetService, "GetTexture", null, rurl));
new GetTextureRobustHandler("/CAPS/GetTexture", m_AssetService, "GetTexture", null, rurl));
}
}
}

View File

@ -1,171 +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.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers.HttpServer;
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;
public UploadBakedTextureHandler(Caps caps, IAssetService assetService)
{
m_HostCapsObj = caps;
m_assetService = assetService;
}
/// <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, m_HostCapsObj.AgentID);
uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler(
"POST", capsBase + uploaderPath, uploader.uploaderCaps, "UploadBakedTexture", null));
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 = true;
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;
private UUID AgentId = UUID.Zero;
public BakedTextureUploader(string path, IHttpServer httpServer, UUID uUID)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
AgentId = uUID;
// 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;
}
}
}

View File

@ -1,76 +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 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 UploadBakedTextureServerConnector : ServiceConnector
{
private IAssetService m_AssetService;
private string m_ConfigName = "CapsService";
public UploadBakedTextureServerConnector(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 assetService = serverConfig.GetString("AssetService", String.Empty);
if (assetService == String.Empty)
throw new Exception("No AssetService in config file");
Object[] args = new Object[] { config };
m_AssetService =
ServerUtils.LoadPlugin<IAssetService>(assetService, args);
if (m_AssetService == null)
throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName));
// NEED TO FIX THIS
OpenSim.Framework.Capabilities.Caps caps = new OpenSim.Framework.Capabilities.Caps(server, "", server.Port, "", UUID.Zero, "");
server.AddStreamHandler(new RestStreamHandler(
"POST",
"/CAPS/UploadBakedTexture/",
new UploadBakedTextureHandler(caps, m_AssetService).UploadBakedTexture,
"UploadBakedTexture",
"Upload Baked Texture Capability"));
}
}
}

View File

@ -83,8 +83,6 @@ namespace OpenSim.Framework.Capabilities
{
using (XmlTextReader reader = new XmlTextReader(st))
{
reader.ProhibitDtd = true;
reader.Read();
SkipWS(reader);
@ -109,17 +107,17 @@ namespace OpenSim.Framework.Capabilities
/// <returns></returns>
public static byte[] LLSDSerialize(object obj)
{
StringWriter sw = new StringWriter();
XmlTextWriter writer = new XmlTextWriter(sw);
writer.Formatting = Formatting.None;
using(StringWriter sw = new StringWriter())
using(XmlTextWriter writer = new XmlTextWriter(sw))
{
writer.Formatting = Formatting.None;
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
LLSDWriteOne(writer, obj);
writer.WriteEndElement();
writer.Close();
return Util.UTF8.GetBytes(sw.ToString());
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
LLSDWriteOne(writer, obj);
writer.WriteEndElement();
writer.Flush();
return Util.UTF8.GetBytes(sw.ToString());
}
}
/// <summary>

View File

@ -1,68 +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.Capabilities
{
[OSDMap]
public class LLSDEnvironmentRequest
{
public UUID messageID;
public UUID regionID;
}
[OSDMap]
public class LLSDEnvironmentSetResponse
{
public UUID regionID;
public UUID messageID;
public Boolean success;
public String fail_reason;
}
public class EnvironmentSettings
{
/// <summary>
/// generates a empty llsd settings response for viewer
/// </summary>
/// <param name="messageID">the message UUID</param>
/// <param name="regionID">the region UUID</param>
public static string EmptySettings(UUID messageID, UUID regionID)
{
OSDArray arr = new OSDArray();
LLSDEnvironmentRequest msg = new LLSDEnvironmentRequest();
msg.messageID = messageID;
msg.regionID = regionID;
arr.Array.Add(msg);
return LLSDHelpers.SerialiseLLSDReply(arr);
}
}
}

View File

@ -30,6 +30,7 @@ using System.Collections;
using System.IO;
using System.Reflection;
using System.Xml;
using OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
@ -40,17 +41,32 @@ namespace OpenSim.Framework.Capabilities
public static string SerialiseLLSDReply(object obj)
{
StringWriter sw = new StringWriter();
XmlTextWriter writer = new XmlTextWriter(sw);
writer.Formatting = Formatting.None;
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
SerializeOSDType(writer, obj);
writer.WriteEndElement();
writer.Close();
using(StringWriter sw = new StringWriter())
using(XmlTextWriter writer = new XmlTextWriter(sw))
{
writer.Formatting = Formatting.None;
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
SerializeOSDType(writer, obj);
writer.WriteEndElement();
writer.Flush();
//m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString());
return sw.ToString();
return sw.ToString();
}
}
public static string SerialiseLLSDReplyNoHeader(object obj)
{
using(StringWriter sw = new StringWriter())
using(XmlTextWriter writer = new XmlTextWriter(sw))
{
writer.Formatting = Formatting.None;
SerializeOSDType(writer, obj);
writer.Flush();
//m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString());
return sw.ToString();
}
}
private static void SerializeOSDType(XmlTextWriter writer, object obj)
@ -160,7 +176,18 @@ namespace OpenSim.Framework.Capabilities
else if(enumerator.Value is Boolean && field.FieldType == typeof(int) )
{
int i = (bool)enumerator.Value ? 1 : 0;
field.SetValue(obj, (object)i);
field.SetValue(obj, i);
}
else if(field.FieldType == typeof(bool) && enumerator.Value is int)
{
bool b = (int)enumerator.Value != 0;
field.SetValue(obj, b);
}
else if(field.FieldType == typeof(UUID) && enumerator.Value is string)
{
UUID u;
UUID.TryParse((string)enumerator.Value, out u);
field.SetValue(obj, u);
}
else
{

View File

@ -37,5 +37,6 @@ namespace OpenSim.Framework.Capabilities
public string name;
public int type;
public int preferred_type;
public int version;
}
}

View File

@ -1,41 +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 OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
public class LLSDItemUpdate
{
public UUID item_id;
public LLSDItemUpdate()
{
}
}
}

View File

@ -1,51 +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.Collections;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
public class LLSDParcelVoiceInfoResponse
{
public int parcel_local_id;
public string region_name;
public Hashtable voice_credentials;
public LLSDParcelVoiceInfoResponse()
{
}
public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
{
region_name = region;
parcel_local_id = localID;
voice_credentials = creds;
}
}
}

View File

@ -1,42 +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 OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
[LLSDType("MAP")]
public class LLSDRemoteParcelResponse
{
public UUID parcel_id;
public LLSDRemoteParcelResponse()
{
}
}
}

View File

@ -1,50 +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 OpenMetaverse;
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
public class LLSDTaskScriptUpdate
{
/// <summary>
/// The item containing the script to update
/// </summary>
public UUID item_id;
/// <summary>
/// The task containing the script
/// </summary>
public UUID task_id;
/// <summary>
/// Signals whether the script is currently active
/// </summary>
public int is_script_running;
}
}

View File

@ -1,57 +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.
*
*/
namespace OpenSim.Framework.Capabilities
{
[OSDMap]
public class LLSDVoiceAccountResponse
{
public string username;
public string password;
public string voice_sip_uri_hostname;
public string voice_account_server_name;
public LLSDVoiceAccountResponse()
{
}
public LLSDVoiceAccountResponse(string user, string pass)
{
username = user;
password = pass;
}
public LLSDVoiceAccountResponse(string user, string pass, string sipUriHost, string accountServer)
{
username = user;
password = pass;
voice_sip_uri_hostname = sipUriHost;
voice_account_server_name = accountServer;
}
}
}

View File

@ -80,7 +80,7 @@ namespace OpenSim.ConsoleClient
while (m_Server.Running)
{
System.Threading.Thread.Sleep(500);
// MainConsole.Instance.Prompt();
MainConsole.Instance.Prompt();
}
if (pidFile != String.Empty)
@ -110,7 +110,6 @@ namespace OpenSim.ConsoleClient
public static void LoginReply(string requestUrl, string requestData, string replyData)
{
XmlDocument doc = new XmlDocument();
doc.XmlResolver=null;
doc.LoadXml(replyData);
@ -170,7 +169,6 @@ namespace OpenSim.ConsoleClient
public static void ReadResponses(string requestUrl, string requestData, string replyData)
{
XmlDocument doc = new XmlDocument();
doc.XmlResolver=null;
doc.LoadXml(replyData);

View File

@ -47,24 +47,25 @@ namespace OpenSim.Data
if ((id == null) || (id == DBNull.Value))
return UUID.Zero;
if (id.GetType() == typeof(Guid))
Type idtype = id.GetType();
if (idtype == typeof(Guid))
return new UUID((Guid)id);
if (id.GetType() == typeof(byte[]))
if (id.GetType() == typeof(string))
{
if (((byte[])id).Length == 0)
return UUID.Zero;
else if (((byte[])id).Length == 16)
return new UUID((byte[])id, 0);
}
else if (id.GetType() == typeof(string))
{
if (((string)id).Length == 0)
return UUID.Zero;
else if (((string)id).Length == 36)
return new UUID((string)id);
Guid gg;
if (Guid.TryParse((string)id, out gg))
return new UUID(gg);
return UUID.Zero;
}
if (idtype == typeof(byte[]))
{
if (((byte[])id).Length < 16)
return UUID.Zero;
return new UUID((byte[])id, 0);
}
throw new Exception("Failed to convert db value to UUID: " + id.ToString());
}
}

View File

@ -71,6 +71,8 @@ namespace OpenSim.Data
{
RegionData Get(UUID regionID, UUID ScopeID);
List<RegionData> Get(string regionName, UUID ScopeID);
RegionData GetSpecific(string regionName, UUID ScopeID);
RegionData Get(int x, int y, UUID ScopeID);
List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID);

View File

@ -285,7 +285,7 @@ namespace OpenSim.Data.MySQL
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID";
cmd.CommandText = "select * from estateban where EstateID = ?EstateID";
cmd.Parameters.AddWithValue("?EstateID", es.EstateID);
using (IDataReader r = cmd.ExecuteReader())
@ -293,13 +293,11 @@ namespace OpenSim.Data.MySQL
while (r.Read())
{
EstateBan eb = new EstateBan();
UUID uuid = new UUID();
UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
eb.BannedUserID = uuid;
eb.BannedUserID = DBGuid.FromDB(r["bannedUUID"]); ;
eb.BannedHostAddress = "0.0.0.0";
eb.BannedHostIPMask = "0.0.0.0";
eb.BanningUserID = DBGuid.FromDB(r["banningUUID"]);
eb.BanTime = Convert.ToInt32(r["banTime"]);
es.AddBan(eb);
}
}
@ -323,12 +321,14 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.Clear();
cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( ?EstateID, ?bannedUUID, '', '', '' )";
cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask, banningUUID, banTime) values ( ?EstateID, ?bannedUUID, '', '', '', ?banningUUID, ?banTime)";
foreach (EstateBan b in es.EstateBans)
{
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue("?bannedUUID", b.BannedUserID.ToString());
cmd.Parameters.AddWithValue("?banningUUID", b.BanningUserID.ToString());
cmd.Parameters.AddWithValue("?banTime", b.BanTime);
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();

View File

@ -29,11 +29,9 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using System.Text;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Data.MySQL
{
@ -118,8 +116,40 @@ namespace OpenSim.Data.MySQL
}
public virtual T[] Get(string field, string key)
{
using (MySqlCommand cmd = new MySqlCommand())
{
cmd.Parameters.AddWithValue(field, key);
cmd.CommandText = string.Format("select * from {0} where `{1}` = ?{1}", m_Realm, field);
return DoQuery(cmd);
}
}
public virtual T[] Get(string field, string[] keys)
{
return Get(new string[] { field }, new string[] { key });
int flen = keys.Length;
if(flen == 0)
return new T[0];
int flast = flen - 1;
StringBuilder sb = new StringBuilder(1024);
sb.AppendFormat("select * from {0} where {1} IN (?", m_Realm, field);
using (MySqlCommand cmd = new MySqlCommand())
{
for (int i = 0 ; i < flen ; i++)
{
string fname = field + i.ToString();
cmd.Parameters.AddWithValue(fname, keys[i]);
sb.Append(fname);
if(i < flast)
sb.Append(",?");
else
sb.Append(")");
}
cmd.CommandText = sb.ToString();
return DoQuery(cmd);
}
}
public virtual T[] Get(string[] fields, string[] keys)
@ -129,25 +159,27 @@ namespace OpenSim.Data.MySQL
public virtual T[] Get(string[] fields, string[] keys, string options)
{
if (fields.Length != keys.Length)
int flen = fields.Length;
if (flen == 0 || flen != keys.Length)
return new T[0];
List<string> terms = new List<string>();
int flast = flen - 1;
StringBuilder sb = new StringBuilder(1024);
sb.AppendFormat("select * from {0} where ", m_Realm);
using (MySqlCommand cmd = new MySqlCommand())
{
for (int i = 0 ; i < fields.Length ; i++)
for (int i = 0 ; i < flen ; i++)
{
cmd.Parameters.AddWithValue(fields[i], keys[i]);
terms.Add("`" + fields[i] + "` = ?" + fields[i]);
if(i < flast)
sb.AppendFormat("`{0}` = ?{0} and ", fields[i]);
else
sb.AppendFormat("`{0}` = ?{0} ", fields[i]);
}
string where = String.Join(" and ", terms.ToArray());
string query = String.Format("select * from {0} where {1} {2}",
m_Realm, where, options);
cmd.CommandText = query;
sb.Append(options);
cmd.CommandText = sb.ToString();
return DoQuery(cmd);
}
@ -204,7 +236,7 @@ namespace OpenSim.Data.MySQL
if (m_Fields[name].FieldType == typeof(bool))
{
int v = Convert.ToInt32(reader[name]);
m_Fields[name].SetValue(row, v != 0 ? true : false);
m_Fields[name].SetValue(row, v != 0);
}
else if (m_Fields[name].FieldType == typeof(UUID))
{
@ -323,25 +355,26 @@ namespace OpenSim.Data.MySQL
// "[MYSQL GENERIC TABLE HANDLER]: Delete(string[] fields, string[] keys) invoked with {0}:{1}",
// string.Join(",", fields), string.Join(",", keys));
if (fields.Length != keys.Length)
int flen = fields.Length;
if (flen == 0 || flen != keys.Length)
return false;
List<string> terms = new List<string>();
int flast = flen - 1;
StringBuilder sb = new StringBuilder(1024);
sb.AppendFormat("delete from {0} where ", m_Realm);
using (MySqlCommand cmd = new MySqlCommand())
{
for (int i = 0 ; i < fields.Length ; i++)
for (int i = 0 ; i < flen ; i++)
{
cmd.Parameters.AddWithValue(fields[i], keys[i]);
terms.Add("`" + fields[i] + "` = ?" + fields[i]);
if(i < flast)
sb.AppendFormat("`{0}` = ?{0} and ", fields[i]);
else
sb.AppendFormat("`{0}` = ?{0}", fields[i]);
}
string where = String.Join(" and ", terms.ToArray());
string query = String.Format("delete from {0} where {1}", m_Realm, where);
cmd.CommandText = query;
cmd.CommandText = sb.ToString();
return ExecuteNonQuery(cmd) > 0;
}
}
@ -353,27 +386,27 @@ namespace OpenSim.Data.MySQL
public long GetCount(string[] fields, string[] keys)
{
if (fields.Length != keys.Length)
int flen = fields.Length;
if (flen == 0 || flen != keys.Length)
return 0;
List<string> terms = new List<string>();
int flast = flen - 1;
StringBuilder sb = new StringBuilder(1024);
sb.AppendFormat("select count(*) from {0} where ", m_Realm);
using (MySqlCommand cmd = new MySqlCommand())
{
for (int i = 0; i < fields.Length; i++)
for (int i = 0 ; i < flen ; i++)
{
cmd.Parameters.AddWithValue(fields[i], keys[i]);
terms.Add("`" + fields[i] + "` = ?" + fields[i]);
if(i < flast)
sb.AppendFormat("`{0}` = ?{0} and ", fields[i]);
else
sb.AppendFormat("`{0}` = ?{0}", fields[i]);
}
string where = String.Join(" and ", terms.ToArray());
string query = String.Format("select count(*) from {0} where {1}",
m_Realm, where);
cmd.CommandText = query;
Object result = DoQueryScalar(cmd);
cmd.CommandText = sb.ToString();
object result = DoQueryScalar(cmd);
return Convert.ToInt64(result);
}
@ -403,7 +436,7 @@ namespace OpenSim.Data.MySQL
dbcon.Open();
cmd.Connection = dbcon;
Object ret = cmd.ExecuteScalar();
object ret = cmd.ExecuteScalar();
cmd.Connection = null;
dbcon.Close();
return ret;

View File

@ -90,7 +90,7 @@ namespace OpenSim.Data.MySQL
else
pattern = string.Format("Name LIKE '%{0}%'", MySqlHelper.EscapeString(pattern));
return m_Groups.Get(string.Format("ShowInList=1 AND ({0}) ORDER BY Name LIMIT 100", pattern));
return m_Groups.Get(string.Format("ShowInList=1 AND ({0})", pattern));
}
public bool DeleteGroup(UUID groupID)

View File

@ -81,17 +81,15 @@ namespace OpenSim.Data.MySQL
}
}
public RegionData Get(int posX, int posY, UUID scopeID)
public RegionData GetSpecific(string regionName, UUID scopeID)
{
/* fixed size regions
string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";
string command = "select * from `" + m_Realm + "` where regionName = ?regionName";
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Parameters.AddWithValue("?posX", posX.ToString());
cmd.Parameters.AddWithValue("?posY", posY.ToString());
cmd.Parameters.AddWithValue("?regionName", regionName);
cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
List<RegionData> ret = RunCommand(cmd);
@ -100,8 +98,11 @@ namespace OpenSim.Data.MySQL
return ret[0];
}
*/
// extend database search for maximum region size area
}
public RegionData Get(int posX, int posY, UUID scopeID)
{
string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY";
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";

View File

@ -29,16 +29,13 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Data;
namespace OpenSim.Data.MySQL
{
@ -130,10 +127,6 @@ namespace OpenSim.Data.MySQL
// Eligibility check
//
// PrimFlags.Temporary is not used in OpenSim code and cannot
// be guaranteed to always be clear. Don't check it.
// if ((flags & (uint)PrimFlags.Temporary) != 0)
// return;
if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0)
return;
@ -154,16 +147,15 @@ namespace OpenSim.Data.MySQL
"Name, Text, Description, " +
"SitName, TouchName, ObjectFlags, " +
"OwnerMask, NextOwnerMask, GroupMask, " +
"EveryoneMask, BaseMask, PositionX, " +
"PositionY, PositionZ, GroupPositionX, " +
"GroupPositionY, GroupPositionZ, VelocityX, " +
"VelocityY, VelocityZ, AngularVelocityX, " +
"AngularVelocityY, AngularVelocityZ, " +
"AccelerationX, AccelerationY, " +
"AccelerationZ, RotationX, " +
"RotationY, RotationZ, " +
"RotationW, SitTargetOffsetX, " +
"SitTargetOffsetY, SitTargetOffsetZ, " +
"EveryoneMask, BaseMask, " +
"PositionX, PositionY, PositionZ, " +
"GroupPositionX, GroupPositionY, GroupPositionZ, " +
"VelocityX, VelocityY, VelocityZ, " +
"AngularVelocityX, AngularVelocityY, AngularVelocityZ, " +
"AccelerationX, AccelerationY, AccelerationZ, " +
"standtargetx, standtargety, standtargetz, " +
"RotationX, RotationY, RotationZ, RotationW, " +
"SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, " +
"SitTargetOrientW, SitTargetOrientX, " +
"SitTargetOrientY, SitTargetOrientZ, " +
"RegionUUID, CreatorID, " +
@ -189,20 +181,19 @@ namespace OpenSim.Data.MySQL
"AttachedPosY, AttachedPosZ, " +
"PhysicsShapeType, Density, GravityModifier, " +
"Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " +
"RotationAxisLocks" +
"RotationAxisLocks, sopanims, sitactrange, pseudocrc" +
") values (" + "?UUID, " +
"?CreationDate, ?Name, ?Text, " +
"?Description, ?SitName, ?TouchName, " +
"?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
"?GroupMask, ?EveryoneMask, ?BaseMask, " +
"?PositionX, ?PositionY, ?PositionZ, " +
"?GroupPositionX, ?GroupPositionY, " +
"?GroupPositionZ, ?VelocityX, " +
"?VelocityY, ?VelocityZ, ?AngularVelocityX, " +
"?AngularVelocityY, ?AngularVelocityZ, " +
"?AccelerationX, ?AccelerationY, " +
"?AccelerationZ, ?RotationX, " +
"?RotationY, ?RotationZ, " +
"?GroupPositionX, ?GroupPositionY, ?GroupPositionZ, " +
"?VelocityX, ?VelocityY, ?VelocityZ, "+
"?AngularVelocityX, ?AngularVelocityY, ?AngularVelocityZ, " +
"?AccelerationX, ?AccelerationY, ?AccelerationZ, " +
"?standtargetx, ?standtargety, ?standtargetz, " +
"?RotationX, ?RotationY, ?RotationZ, " +
"?RotationW, ?SitTargetOffsetX, " +
"?SitTargetOffsetY, ?SitTargetOffsetZ, " +
"?SitTargetOrientW, ?SitTargetOrientX, " +
@ -226,7 +217,7 @@ namespace OpenSim.Data.MySQL
"?AttachedPosY, ?AttachedPosZ, " +
"?PhysicsShapeType, ?Density, ?GravityModifier, " +
"?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," +
"?RotationAxisLocks)";
"?RotationAxisLocks, ?sopanims, ?sitactrange, ?pseudocrc)";
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
@ -598,7 +589,7 @@ namespace OpenSim.Data.MySQL
// Legacy entry point for when terrain was always a 256x256 hieghtmap
public void StoreTerrain(double[,] ter, UUID regionID)
{
StoreTerrain(new HeightmapTerrainData(ter), regionID);
StoreTerrain(new TerrainData(ter), regionID);
}
public void StoreTerrain(TerrainData terrData, UUID regionID)
@ -830,7 +821,7 @@ namespace OpenSim.Data.MySQL
"UserLookAtX, UserLookAtY, UserLookAtZ, " +
"AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " +
"SeeAVs, AnyAVSounds, GroupAVSounds) values (" +
"SeeAVs, AnyAVSounds, GroupAVSounds, environment) values (" +
"?UUID, ?RegionUUID, " +
"?LocalLandID, ?Bitmap, ?Name, ?Description, " +
"?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@ -842,7 +833,7 @@ namespace OpenSim.Data.MySQL
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?Dwell, ?MediaType, ?MediaDescription, "+
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia, " +
"?SeeAVs, ?AnyAVSounds, ?GroupAVSounds)";
"?SeeAVs, ?AnyAVSounds, ?GroupAVSounds, ?environment)";
FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
@ -869,107 +860,6 @@ namespace OpenSim.Data.MySQL
}
}
public virtual RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
{
RegionLightShareData nWP = new RegionLightShareData();
nWP.OnSave += StoreRegionWindlightSettings;
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
string command = "select * from `regionwindlight` where region_id = ?regionID";
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Connection = dbcon;
cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
using(IDataReader result = ExecuteReader(cmd))
{
if(!result.Read())
{
//No result, so store our default windlight profile and return it
nWP.regionID = regionUUID;
// StoreRegionWindlightSettings(nWP);
return nWP;
}
else
{
nWP.regionID = DBGuid.FromDB(result["region_id"]);
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
UUID.TryParse(result["normal_map_texture"].ToString(),out nWP.normalMapTexture);
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
nWP.valid = true;
}
}
}
dbcon.Close();
}
return nWP;
}
public virtual RegionSettings LoadRegionSettings(UUID regionUUID)
{
RegionSettings rs = null;
@ -1015,127 +905,6 @@ namespace OpenSim.Data.MySQL
return rs;
}
public virtual void StoreRegionWindlightSettings(RegionLightShareData wl)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "REPLACE INTO `regionwindlight` (`region_id`, `water_color_r`, `water_color_g`, "
+ "`water_color_b`, `water_fog_density_exponent`, `underwater_fog_modifier`, "
+ "`reflection_wavelet_scale_1`, `reflection_wavelet_scale_2`, `reflection_wavelet_scale_3`, "
+ "`fresnel_scale`, `fresnel_offset`, `refract_scale_above`, `refract_scale_below`, "
+ "`blur_multiplier`, `big_wave_direction_x`, `big_wave_direction_y`, `little_wave_direction_x`, "
+ "`little_wave_direction_y`, `normal_map_texture`, `horizon_r`, `horizon_g`, `horizon_b`, "
+ "`horizon_i`, `haze_horizon`, `blue_density_r`, `blue_density_g`, `blue_density_b`, "
+ "`blue_density_i`, `haze_density`, `density_multiplier`, `distance_multiplier`, `max_altitude`, "
+ "`sun_moon_color_r`, `sun_moon_color_g`, `sun_moon_color_b`, `sun_moon_color_i`, `sun_moon_position`, "
+ "`ambient_r`, `ambient_g`, `ambient_b`, `ambient_i`, `east_angle`, `sun_glow_focus`, `sun_glow_size`, "
+ "`scene_gamma`, `star_brightness`, `cloud_color_r`, `cloud_color_g`, `cloud_color_b`, `cloud_color_i`, "
+ "`cloud_x`, `cloud_y`, `cloud_density`, `cloud_coverage`, `cloud_scale`, `cloud_detail_x`, "
+ "`cloud_detail_y`, `cloud_detail_density`, `cloud_scroll_x`, `cloud_scroll_x_lock`, `cloud_scroll_y`, "
+ "`cloud_scroll_y_lock`, `draw_classic_clouds`) VALUES (?region_id, ?water_color_r, "
+ "?water_color_g, ?water_color_b, ?water_fog_density_exponent, ?underwater_fog_modifier, ?reflection_wavelet_scale_1, "
+ "?reflection_wavelet_scale_2, ?reflection_wavelet_scale_3, ?fresnel_scale, ?fresnel_offset, ?refract_scale_above, "
+ "?refract_scale_below, ?blur_multiplier, ?big_wave_direction_x, ?big_wave_direction_y, ?little_wave_direction_x, "
+ "?little_wave_direction_y, ?normal_map_texture, ?horizon_r, ?horizon_g, ?horizon_b, ?horizon_i, ?haze_horizon, "
+ "?blue_density_r, ?blue_density_g, ?blue_density_b, ?blue_density_i, ?haze_density, ?density_multiplier, "
+ "?distance_multiplier, ?max_altitude, ?sun_moon_color_r, ?sun_moon_color_g, ?sun_moon_color_b, "
+ "?sun_moon_color_i, ?sun_moon_position, ?ambient_r, ?ambient_g, ?ambient_b, ?ambient_i, ?east_angle, "
+ "?sun_glow_focus, ?sun_glow_size, ?scene_gamma, ?star_brightness, ?cloud_color_r, ?cloud_color_g, "
+ "?cloud_color_b, ?cloud_color_i, ?cloud_x, ?cloud_y, ?cloud_density, ?cloud_coverage, ?cloud_scale, "
+ "?cloud_detail_x, ?cloud_detail_y, ?cloud_detail_density, ?cloud_scroll_x, ?cloud_scroll_x_lock, "
+ "?cloud_scroll_y, ?cloud_scroll_y_lock, ?draw_classic_clouds)"
;
cmd.Parameters.AddWithValue("region_id", wl.regionID);
cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
ExecuteNonQuery(cmd);
}
dbcon.Close();
}
}
public virtual void RemoveRegionWindlightSettings(UUID regionID)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
ExecuteNonQuery(cmd);
}
dbcon.Close();
}
}
#region RegionEnvironmentSettings
public string LoadRegionEnvironmentSettings(UUID regionUUID)
{
@ -1231,7 +1000,7 @@ namespace OpenSim.Data.MySQL
"covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
"sunvectorz, loaded_creation_datetime, " +
"loaded_creation_id, map_tile_ID, block_search, casino, " +
"TelehubObject, parcel_tile_ID) " +
"TelehubObject, parcel_tile_ID, cacheID) " +
"values (?RegionUUID, ?BlockTerraform, " +
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
"?AllowLandResell, ?AllowLandJoinDivide, " +
@ -1248,7 +1017,7 @@ namespace OpenSim.Data.MySQL
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
"?LoadedCreationDateTime, ?LoadedCreationID, " +
"?TerrainImageID, ?block_search, ?casino, " +
"?TelehubObject, ?ParcelImageID)";
"?TelehubObject, ?ParcelImageID, ?cacheID)";
FillRegionSettingsCommand(cmd, rs);
ExecuteNonQuery(cmd);
@ -1352,49 +1121,57 @@ namespace OpenSim.Data.MySQL
// Vectors
prim.OffsetPosition = new Vector3(
(float)(double)row["PositionX"],
(float)(double)row["PositionY"],
(float)(double)row["PositionZ"]
(float)row["PositionX"],
(float)row["PositionY"],
(float)row["PositionZ"]
);
prim.GroupPosition = new Vector3(
(float)(double)row["GroupPositionX"],
(float)(double)row["GroupPositionY"],
(float)(double)row["GroupPositionZ"]
(float)row["GroupPositionX"],
(float)row["GroupPositionY"],
(float)row["GroupPositionZ"]
);
prim.Velocity = new Vector3(
(float)(double)row["VelocityX"],
(float)(double)row["VelocityY"],
(float)(double)row["VelocityZ"]
(float)row["VelocityX"],
(float)row["VelocityY"],
(float)row["VelocityZ"]
);
prim.AngularVelocity = new Vector3(
(float)(double)row["AngularVelocityX"],
(float)(double)row["AngularVelocityY"],
(float)(double)row["AngularVelocityZ"]
(float)row["AngularVelocityX"],
(float)row["AngularVelocityY"],
(float)row["AngularVelocityZ"]
);
prim.Acceleration = new Vector3(
(float)(double)row["AccelerationX"],
(float)(double)row["AccelerationY"],
(float)(double)row["AccelerationZ"]
(float)row["AccelerationX"],
(float)row["AccelerationY"],
(float)row["AccelerationZ"]
);
// quaternions
prim.RotationOffset = new Quaternion(
(float)(double)row["RotationX"],
(float)(double)row["RotationY"],
(float)(double)row["RotationZ"],
(float)(double)row["RotationW"]
(float)row["RotationX"],
(float)row["RotationY"],
(float)row["RotationZ"],
(float)row["RotationW"]
);
prim.SitTargetPositionLL = new Vector3(
(float)(double)row["SitTargetOffsetX"],
(float)(double)row["SitTargetOffsetY"],
(float)(double)row["SitTargetOffsetZ"]
(float)row["SitTargetOffsetX"],
(float)row["SitTargetOffsetY"],
(float)row["SitTargetOffsetZ"]
);
prim.SitTargetOrientationLL = new Quaternion(
(float)(double)row["SitTargetOrientX"],
(float)(double)row["SitTargetOrientY"],
(float)(double)row["SitTargetOrientZ"],
(float)(double)row["SitTargetOrientW"]
(float)row["SitTargetOrientX"],
(float)row["SitTargetOrientY"],
(float)row["SitTargetOrientZ"],
(float)row["SitTargetOrientW"]
);
prim.StandOffset = new Vector3(
(float)row["standtargetx"],
(float)row["standtargety"],
(float)row["standtargetz"]
);
prim.SitActiveRange = (float)row["sitactrange"];
prim.PayPrice[0] = (int)row["PayPrice"];
prim.PayPrice[1] = (int)row["PayButton1"];
prim.PayPrice[2] = (int)row["PayButton2"];
@ -1402,8 +1179,11 @@ namespace OpenSim.Data.MySQL
prim.PayPrice[4] = (int)row["PayButton4"];
prim.Sound = DBGuid.FromDB(row["LoopedSound"].ToString());
prim.SoundGain = (float)(double)row["LoopedSoundGain"];
prim.SoundFlags = 1; // If it's persisted at all, it's looped
prim.SoundGain = (float)row["LoopedSoundGain"];
if (prim.Sound != UUID.Zero)
prim.SoundFlags = 1; // If it's persisted at all, it's looped
else
prim.SoundFlags = 0;
if (!(row["TextureAnimation"] is DBNull))
prim.TextureAnimation = (byte[])row["TextureAnimation"];
@ -1411,21 +1191,21 @@ namespace OpenSim.Data.MySQL
prim.ParticleSystem = (byte[])row["ParticleSystem"];
prim.AngularVelocity = new Vector3(
(float)(double)row["OmegaX"],
(float)(double)row["OmegaY"],
(float)(double)row["OmegaZ"]
(float)row["OmegaX"],
(float)row["OmegaY"],
(float)row["OmegaZ"]
);
prim.SetCameraEyeOffset(new Vector3(
(float)(double)row["CameraEyeOffsetX"],
(float)(double)row["CameraEyeOffsetY"],
(float)(double)row["CameraEyeOffsetZ"]
(float)row["CameraEyeOffsetX"],
(float)row["CameraEyeOffsetY"],
(float)row["CameraEyeOffsetZ"]
));
prim.SetCameraAtOffset(new Vector3(
(float)(double)row["CameraAtOffsetX"],
(float)(double)row["CameraAtOffsetY"],
(float)(double)row["CameraAtOffsetZ"]
(float)row["CameraAtOffsetX"],
(float)row["CameraAtOffsetY"],
(float)row["CameraAtOffsetZ"]
));
prim.SetForceMouselook((sbyte)row["ForceMouselook"] != 0);
@ -1454,16 +1234,16 @@ namespace OpenSim.Data.MySQL
if (!(row["AttachedPosX"] is System.DBNull))
{
prim.AttachedPos = new Vector3(
(float)(double)row["AttachedPosX"],
(float)(double)row["AttachedPosY"],
(float)(double)row["AttachedPosZ"]
(float)row["AttachedPosX"],
(float)row["AttachedPosY"],
(float)row["AttachedPosZ"]
);
}
if (!(row["DynAttrs"] is System.DBNull))
prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
else
prim.DynAttrs = new DAMap();
prim.DynAttrs = null;
if (!(row["KeyframeMotion"] is DBNull))
{
@ -1479,10 +1259,10 @@ namespace OpenSim.Data.MySQL
}
prim.PhysicsShapeType = (byte)Convert.ToInt32(row["PhysicsShapeType"].ToString());
prim.Density = (float)(double)row["Density"];
prim.GravityModifier = (float)(double)row["GravityModifier"];
prim.Friction = (float)(double)row["Friction"];
prim.Restitution = (float)(double)row["Restitution"];
prim.Density = (float)row["Density"];
prim.GravityModifier = (float)row["GravityModifier"];
prim.Friction = (float)row["Friction"];
prim.Restitution = (float)row["Restitution"];
prim.RotationAxisLocks = (byte)Convert.ToInt32(row["RotationAxisLocks"].ToString());
SOPVehicle vehicle = null;
@ -1499,6 +1279,25 @@ namespace OpenSim.Data.MySQL
pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString());
prim.PhysicsInertia = pdata;
if (!(row["sopanims"] is DBNull))
{
Byte[] data = (byte[])row["sopanims"];
if (data.Length > 0)
prim.DeSerializeAnimations(data);
else
prim.Animations = null;
}
else
{
prim.Animations = null;
}
prim.SitActiveRange = (float)row["sitactrange"];
int pseudocrc = (int)row["pseudocrc"];
if(pseudocrc != 0)
prim.PseudoCRC = pseudocrc;
return prim;
}
@ -1603,6 +1402,10 @@ namespace OpenSim.Data.MySQL
newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
newSettings.Casino = Convert.ToBoolean(row["casino"]);
if (!(row["cacheID"] is DBNull))
newSettings.CacheID = DBGuid.FromDB(row["cacheID"]);
return newSettings;
}
@ -1686,6 +1489,34 @@ namespace OpenSim.Data.MySQL
if (!(row["GroupAVSounds"] is System.DBNull))
newData.GroupAVSounds = Convert.ToInt32(row["GroupAVSounds"]) != 0 ? true : false;
if (row["environment"] is DBNull)
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
string env = (string)row["environment"];
if(string.IsNullOrEmpty(env))
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
try
{
ViewerEnvironment VEnv = ViewerEnvironment.FromOSDString(env);
newData.Environment = VEnv;
newData.EnvironmentVersion = VEnv.version;
}
catch
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
}
}
return newData;
}
@ -1740,38 +1571,43 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("EveryoneMask", prim.EveryoneMask);
cmd.Parameters.AddWithValue("BaseMask", prim.BaseMask);
// vectors
cmd.Parameters.AddWithValue("PositionX", (double)prim.OffsetPosition.X);
cmd.Parameters.AddWithValue("PositionY", (double)prim.OffsetPosition.Y);
cmd.Parameters.AddWithValue("PositionZ", (double)prim.OffsetPosition.Z);
cmd.Parameters.AddWithValue("GroupPositionX", (double)prim.GroupPosition.X);
cmd.Parameters.AddWithValue("GroupPositionY", (double)prim.GroupPosition.Y);
cmd.Parameters.AddWithValue("GroupPositionZ", (double)prim.GroupPosition.Z);
cmd.Parameters.AddWithValue("VelocityX", (double)prim.Velocity.X);
cmd.Parameters.AddWithValue("VelocityY", (double)prim.Velocity.Y);
cmd.Parameters.AddWithValue("VelocityZ", (double)prim.Velocity.Z);
cmd.Parameters.AddWithValue("AngularVelocityX", (double)prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("AngularVelocityY", (double)prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("AngularVelocityZ", (double)prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("AccelerationX", (double)prim.Acceleration.X);
cmd.Parameters.AddWithValue("AccelerationY", (double)prim.Acceleration.Y);
cmd.Parameters.AddWithValue("AccelerationZ", (double)prim.Acceleration.Z);
cmd.Parameters.AddWithValue("PositionX", prim.OffsetPosition.X);
cmd.Parameters.AddWithValue("PositionY", prim.OffsetPosition.Y);
cmd.Parameters.AddWithValue("PositionZ", prim.OffsetPosition.Z);
cmd.Parameters.AddWithValue("GroupPositionX", prim.GroupPosition.X);
cmd.Parameters.AddWithValue("GroupPositionY", prim.GroupPosition.Y);
cmd.Parameters.AddWithValue("GroupPositionZ", prim.GroupPosition.Z);
cmd.Parameters.AddWithValue("VelocityX", prim.Velocity.X);
cmd.Parameters.AddWithValue("VelocityY", prim.Velocity.Y);
cmd.Parameters.AddWithValue("VelocityZ", prim.Velocity.Z);
cmd.Parameters.AddWithValue("AngularVelocityX", prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("AngularVelocityY", prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("AngularVelocityZ", prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("AccelerationX", prim.Acceleration.X);
cmd.Parameters.AddWithValue("AccelerationY", prim.Acceleration.Y);
cmd.Parameters.AddWithValue("AccelerationZ", prim.Acceleration.Z);
cmd.Parameters.AddWithValue("standtargetx", prim.StandOffset.X);
cmd.Parameters.AddWithValue("standtargety", prim.StandOffset.Y);
cmd.Parameters.AddWithValue("standtargetz", prim.StandOffset.Z);
// quaternions
cmd.Parameters.AddWithValue("RotationX", (double)prim.RotationOffset.X);
cmd.Parameters.AddWithValue("RotationY", (double)prim.RotationOffset.Y);
cmd.Parameters.AddWithValue("RotationZ", (double)prim.RotationOffset.Z);
cmd.Parameters.AddWithValue("RotationW", (double)prim.RotationOffset.W);
cmd.Parameters.AddWithValue("RotationX", prim.RotationOffset.X);
cmd.Parameters.AddWithValue("RotationY", prim.RotationOffset.Y);
cmd.Parameters.AddWithValue("RotationZ", prim.RotationOffset.Z);
cmd.Parameters.AddWithValue("RotationW", prim.RotationOffset.W);
// Sit target
Vector3 sitTargetPos = prim.SitTargetPositionLL;
cmd.Parameters.AddWithValue("SitTargetOffsetX", (double)sitTargetPos.X);
cmd.Parameters.AddWithValue("SitTargetOffsetY", (double)sitTargetPos.Y);
cmd.Parameters.AddWithValue("SitTargetOffsetZ", (double)sitTargetPos.Z);
cmd.Parameters.AddWithValue("SitTargetOffsetX", sitTargetPos.X);
cmd.Parameters.AddWithValue("SitTargetOffsetY", sitTargetPos.Y);
cmd.Parameters.AddWithValue("SitTargetOffsetZ", sitTargetPos.Z);
Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
cmd.Parameters.AddWithValue("SitTargetOrientW", (double)sitTargetOrient.W);
cmd.Parameters.AddWithValue("SitTargetOrientX", (double)sitTargetOrient.X);
cmd.Parameters.AddWithValue("SitTargetOrientY", (double)sitTargetOrient.Y);
cmd.Parameters.AddWithValue("SitTargetOrientZ", (double)sitTargetOrient.Z);
cmd.Parameters.AddWithValue("SitTargetOrientW", sitTargetOrient.W);
cmd.Parameters.AddWithValue("SitTargetOrientX", sitTargetOrient.X);
cmd.Parameters.AddWithValue("SitTargetOrientY", sitTargetOrient.Y);
cmd.Parameters.AddWithValue("SitTargetOrientZ", sitTargetOrient.Z);
cmd.Parameters.AddWithValue("PayPrice", prim.PayPrice[0]);
cmd.Parameters.AddWithValue("PayButton1", prim.PayPrice[1]);
@ -1782,7 +1618,7 @@ namespace OpenSim.Data.MySQL
if ((prim.SoundFlags & 1) != 0) // Looped
{
cmd.Parameters.AddWithValue("LoopedSound", prim.Sound.ToString());
cmd.Parameters.AddWithValue("LoopedSoundGain", prim.SoundGain);
cmd.Parameters.AddWithValue("LoopedSoundGain", (float)prim.SoundGain);
}
else
{
@ -1793,17 +1629,17 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
cmd.Parameters.AddWithValue("OmegaX", (double)prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("OmegaY", (double)prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("OmegaX", prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("OmegaY", prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("OmegaZ", prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);
cmd.Parameters.AddWithValue("CameraEyeOffsetZ", (double)prim.GetCameraEyeOffset().Z);
cmd.Parameters.AddWithValue("CameraEyeOffsetX", prim.GetCameraEyeOffset().X);
cmd.Parameters.AddWithValue("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y);
cmd.Parameters.AddWithValue("CameraEyeOffsetZ", prim.GetCameraEyeOffset().Z);
cmd.Parameters.AddWithValue("CameraAtOffsetX", (double)prim.GetCameraAtOffset().X);
cmd.Parameters.AddWithValue("CameraAtOffsetY", (double)prim.GetCameraAtOffset().Y);
cmd.Parameters.AddWithValue("CameraAtOffsetZ", (double)prim.GetCameraAtOffset().Z);
cmd.Parameters.AddWithValue("CameraAtOffsetX", prim.GetCameraAtOffset().X);
cmd.Parameters.AddWithValue("CameraAtOffsetY", prim.GetCameraAtOffset().Y);
cmd.Parameters.AddWithValue("CameraAtOffsetZ", prim.GetCameraAtOffset().Z);
if (prim.GetForceMouselook())
cmd.Parameters.AddWithValue("ForceMouselook", 1);
@ -1847,9 +1683,9 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
if (prim.AttachedPos != null)
{
cmd.Parameters.AddWithValue("AttachedPosX", (double)prim.AttachedPos.X);
cmd.Parameters.AddWithValue("AttachedPosY", (double)prim.AttachedPos.Y);
cmd.Parameters.AddWithValue("AttachedPosZ", (double)prim.AttachedPos.Z);
cmd.Parameters.AddWithValue("AttachedPosX", prim.AttachedPos.X);
cmd.Parameters.AddWithValue("AttachedPosY", prim.AttachedPos.Y);
cmd.Parameters.AddWithValue("AttachedPosZ", prim.AttachedPos.Z);
}
if (prim.KeyframeMotion != null)
@ -1867,17 +1703,25 @@ namespace OpenSim.Data.MySQL
else
cmd.Parameters.AddWithValue("Vehicle", String.Empty);
if (prim.DynAttrs.CountNamespaces > 0)
if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0)
cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
else
cmd.Parameters.AddWithValue("DynAttrs", null);
cmd.Parameters.AddWithValue("PhysicsShapeType", prim.PhysicsShapeType);
cmd.Parameters.AddWithValue("Density", (double)prim.Density);
cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
cmd.Parameters.AddWithValue("Density", prim.Density);
cmd.Parameters.AddWithValue("GravityModifier", prim.GravityModifier);
cmd.Parameters.AddWithValue("Friction", prim.Friction);
cmd.Parameters.AddWithValue("Restitution", prim.Restitution);
cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks);
if (prim.Animations!= null)
cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations());
else
cmd.Parameters.AddWithValue("sopanims", null);
cmd.Parameters.AddWithValue("sitactrange", prim.SitActiveRange);
cmd.Parameters.AddWithValue("pseudocrc", prim.PseudoCRC);
}
/// <summary>
@ -1961,6 +1805,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("ParcelImageID", settings.ParcelImageID);
cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject);
cmd.Parameters.AddWithValue("cacheID", settings.CacheID);
}
/// <summary>
@ -2018,7 +1863,19 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("SeeAVs", land.SeeAVs ? 1 : 0);
cmd.Parameters.AddWithValue("AnyAVSounds", land.AnyAVSounds ? 1 : 0);
cmd.Parameters.AddWithValue("GroupAVSounds", land.GroupAVSounds ? 1 : 0);
if (land.Environment == null)
cmd.Parameters.AddWithValue("environment", "");
else
{
try
{
cmd.Parameters.AddWithValue("environment", ViewerEnvironment.ToOSDString(land.Environment));
}
catch
{
cmd.Parameters.AddWithValue("environment", "");
}
}
}
/// <summary>

View File

@ -836,7 +836,7 @@ namespace OpenSim.Data.MySQL
const string queryB = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = ?Id";
using (MySqlCommand cmd = new MySqlCommand(string.Format (queryB,"`userpicks`"), dbcon))
using (MySqlCommand cmd = new MySqlCommand(queryB, dbcon))
{
cmd.Parameters.AddWithValue("?Id", avatarId.ToString());

View File

@ -58,11 +58,6 @@ namespace OpenSim.Data.MySQL
private bool m_enableCompression = false;
private string m_connectionString;
/// <summary>
/// We can reuse this for all hashing since all methods are single-threaded through m_dbBLock
/// </summary>
private HashAlgorithm hasher = new SHA256CryptoServiceProvider();
#region IPlugin Members
public string Version { get { return "1.0.0.0"; } }
@ -250,7 +245,9 @@ namespace OpenSim.Data.MySQL
}
}
byte[] hash = hasher.ComputeHash(asset.Data);
byte[] hash;
using (HashAlgorithm hasher = new SHA256CryptoServiceProvider())
hash = hasher.ComputeHash(asset.Data);
// m_log.DebugFormat(
// "[XASSET DB]: Compressed data size for {0} {1}, hash {2} is {3}",

View File

@ -69,3 +69,15 @@ CREATE TABLE IF NOT EXISTS `estateban` (
COMMIT;
:VERSION 35
BEGIN;
ALTER TABLE `estateban`
ADD COLUMN `banningUUID` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
ADD COLUMN `banTime` int(11) NOT NULL DEFAULT 0;
COMMIT;
:VERSION 36
BEGIN;
ALTER TABLE `estate_settings`
ADD COLUMN `AllowEnviromentOverride` tinyint(4) NOT NULL DEFAULT '0';
COMMIT;

View File

@ -16,3 +16,9 @@ CREATE TABLE `hg_traveling_data` (
COMMIT;
:VERSION 2 # --------------------------
ALTER TABLE `hg_traveling_data` MODIFY `TMStamp` timestamp NOT NULL default CURRENT_TIMESTAMP;
COMMIT;

View File

@ -467,3 +467,86 @@ COMMIT;
BEGIN;
ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL;
COMMIT;
:VERSION 58 #----- Add sop animations
BEGIN;
ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL;
COMMIT;
:VERSION 59 #----- Add standtarget and sit range
BEGIN;
ALTER TABLE `prims`
ADD COLUMN `standtargetx` float DEFAULT '0.0',
ADD COLUMN `standtargety` float DEFAULT '0.0',
ADD COLUMN `standtargetz` float DEFAULT '0.0',
ADD COLUMN `sitactrange` float DEFAULT '0.0';
COMMIT;
:VERSION 60 #----- don't store float on double
BEGIN;
ALTER TABLE `prims`
MODIFY `PositionX` float DEFAULT '0.0',
MODIFY `PositionY` float DEFAULT '0.0',
MODIFY `PositionZ` float DEFAULT '0.0',
MODIFY `GroupPositionX` float DEFAULT '0.0',
MODIFY `GroupPositionY` float DEFAULT '0.0',
MODIFY `GroupPositionZ` float DEFAULT '0.0',
MODIFY `VelocityX` float DEFAULT '0.0',
MODIFY `VelocityY` float DEFAULT '0.0',
MODIFY `VelocityZ` float DEFAULT '0.0',
MODIFY `AngularVelocityX` float DEFAULT '0.0',
MODIFY `AngularVelocityY` float DEFAULT '0.0',
MODIFY `AngularVelocityZ` float DEFAULT '0.0',
MODIFY `AccelerationX` float DEFAULT '0.0',
MODIFY `AccelerationY` float DEFAULT '0.0',
MODIFY `AccelerationZ` float DEFAULT '0.0',
MODIFY `RotationX` float DEFAULT '0.0',
MODIFY `RotationY` float DEFAULT '0.0',
MODIFY `RotationZ` float DEFAULT '0.0',
MODIFY `RotationW` float DEFAULT '0.0',
MODIFY `SitTargetOffsetX` float DEFAULT '0.0',
MODIFY `SitTargetOffsetY` float DEFAULT '0.0',
MODIFY `SitTargetOffsetZ` float DEFAULT '0.0',
MODIFY `SitTargetOrientX` float DEFAULT '0.0',
MODIFY `SitTargetOrientY` float DEFAULT '0.0',
MODIFY `SitTargetOrientZ` float DEFAULT '0.0',
MODIFY `SitTargetOrientW` float DEFAULT '0.0',
MODIFY `OmegaX` float DEFAULT '0.0',
MODIFY `OmegaY` float DEFAULT '0.0',
MODIFY `OmegaZ` float DEFAULT '0.0',
MODIFY `CameraEyeOffsetX` float DEFAULT '0.0',
MODIFY `CameraEyeOffsetY` float DEFAULT '0.0',
MODIFY `CameraEyeOffsetZ` float DEFAULT '0.0',
MODIFY `CameraAtOffsetX` float DEFAULT '0.0',
MODIFY `CameraAtOffsetY` float DEFAULT '0.0',
MODIFY `CameraAtOffsetZ` float DEFAULT '0.0',
MODIFY `Density` float DEFAULT '1000.0',
MODIFY `GravityModifier` float DEFAULT '1.0',
MODIFY `Friction` float DEFAULT '0.6',
MODIFY `Restitution` float DEFAULT '0.5',
MODIFY `AttachedPosX` float DEFAULT '0',
MODIFY `AttachedPosY` float DEFAULT '0',
MODIFY `AttachedPosZ` float DEFAULT '0',
MODIFY `LoopedSoundGain` float DEFAULT '0';
COMMIT;
:VERSION 61 #----- Add pseudo CRC and region cache id
BEGIN;
ALTER TABLE `prims` ADD COLUMN `pseudocrc` int DEFAULT '0';
ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL;
COMMIT;
:VERSION 62 #----- increase size of environment settings
BEGIN;
ALTER TABLE `regionenvironment` MODIFY `llsd_settings` MEDIUMTEXT;
COMMIT;
:VERSION 63 #----- parcel environment store
BEGIN;
ALTER TABLE `land` ADD COLUMN `environment` MEDIUMTEXT default NULL;
COMMIT;

View File

@ -1,16 +0,0 @@
:VERSION 1
BEGIN;
CREATE TABLE `XMute` (
`AgentID` char(36) NOT NULL,
`MuteID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`MuteName` varchar(64) NOT NULL DEFAULT '',
`MuteType` int(11) NOT NULL DEFAULT '1',
`MuteFlags` int(11) NOT NULL DEFAULT '0',
`Stamp` int(11) NOT NULL,
UNIQUE KEY `AgentID_2` (`AgentID`,`MuteID`,`MuteName`),
KEY `AgentID` (`AgentID`)
);
COMMIT;

View File

@ -113,3 +113,11 @@ DROP TABLE `diva_groups_principals`;
DELETE FROM `migrations` WHERE name='diva_im_Store';
COMMIT;
:VERSION 3 # --------------------------
ALTER TABLE `os_groups_invites`
MODIFY `TMStamp` timestamp NOT NULL default CURRENT_TIMESTAMP;
COMMIT;

View File

@ -42,6 +42,47 @@ namespace OpenSim.Data.Null
/// </summary>
public class NullGenericDataHandler
{
protected List<T> Get<T>(string field, string val, List<T> inputEntities)
{
List<T> entities = inputEntities;
entities
= entities.Where(
e =>
{
FieldInfo fi = typeof(T).GetField(field);
if (fi == null)
throw new NotImplementedException(string.Format("No field {0} for val {1}", field, val));
return fi.GetValue(e).ToString() == val;
}
).ToList();
return entities;
}
protected List<T> Get<T>(string field, string[] vals, List<T> inputEntities)
{
List<T> entities = new List<T>();
for (int i = 0; i < vals.Length; i++)
{
entities.AddRange (inputEntities.Where(
e =>
{
FieldInfo fi = typeof(T).GetField(field);
if (fi == null)
throw new NotImplementedException(string.Format("No field {0} for val {1}", field, vals[i]));
return fi.GetValue(e).ToString() == vals[i];
}
).ToList()
);
}
return entities;
}
protected List<T> Get<T>(string[] fields, string[] vals, List<T> inputEntities)
{
List<T> entities = inputEntities;

View File

@ -68,12 +68,34 @@ namespace OpenSim.Data.Null
private delegate bool Matcher(string value);
public RegionData GetSpecific(string regionName, UUID scopeID)
{
if (m_useStaticInstance && Instance != this)
return Instance.GetSpecific(regionName, scopeID);
string cleanName = regionName.ToLower();
Matcher queryMatch;
queryMatch = delegate (string s) { return s.Equals(cleanName); };
lock (m_regionData)
{
foreach (RegionData r in m_regionData.Values)
{
// m_log.DebugFormat("[NULL REGION DATA]: comparing {0} to {1}", cleanName, r.RegionName.ToLower());
if (queryMatch(r.RegionName.ToLower()))
return(r);
}
}
return null;
}
public List<RegionData> Get(string regionName, UUID scopeID)
{
if (m_useStaticInstance && Instance != this)
return Instance.Get(regionName, scopeID);
// m_log.DebugFormat("[NULL REGION DATA]: Getting region {0}, scope {1}", regionName, scopeID);
// m_log.DebugFormat("[NULL REGION DATA]: Getting region {0}, scope {1}", regionName, scopeID);
string cleanName = regionName.ToLower();

View File

@ -151,7 +151,7 @@ namespace OpenSim.Data.Null
// Legacy. Just don't do this.
public void StoreTerrain(double[,] ter, UUID regionID)
{
TerrainData terrData = new HeightmapTerrainData(ter);
TerrainData terrData = new TerrainData(ter);
StoreTerrain(terrData, regionID);
}

View File

@ -286,7 +286,7 @@ namespace OpenSim.Data.PGSQL
{
es.ClearBans();
string sql = "select \"bannedUUID\" from estateban where \"EstateID\" = :EstateID";
string sql = "select * from estateban where \"EstateID\" = :EstateID";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
@ -302,6 +302,8 @@ namespace OpenSim.Data.PGSQL
EstateBan eb = new EstateBan();
eb.BannedUserID = new UUID((Guid)reader["bannedUUID"]); //uuid;
eb.BanningUserID = new UUID((Guid)reader["banningUUID"]); //uuid;
eb.BanTime = Convert.ToInt32(reader["banTime"]);
eb.BannedHostAddress = "0.0.0.0";
eb.BannedHostIPMask = "0.0.0.0";
es.AddBan(eb);
@ -346,11 +348,15 @@ namespace OpenSim.Data.PGSQL
cmd.ExecuteNonQuery();
//Insert after
cmd.CommandText = "insert into estateban (\"EstateID\", \"bannedUUID\",\"bannedIp\", \"bannedIpHostMask\", \"bannedNameMask\") values ( :EstateID, :bannedUUID, '','','' )";
cmd.CommandText = "insert into estateban (\"EstateID\", \"bannedUUID\",\"bannedIp\", \"bannedIpHostMask\", \"bannedNameMask\", \"banningUUID\",\"banTime\" ) values ( :EstateID, :bannedUUID, '','','', :banningUUID, :banTime )";
cmd.Parameters.AddWithValue("bannedUUID", Guid.Empty);
foreach (EstateBan b in es.EstateBans)
{
cmd.Parameters["EstateID"].Value = b.EstateID;
cmd.Parameters["bannedUUID"].Value = b.BannedUserID.Guid;
cmd.Parameters["banningUUID"].Value = b.BanningUserID.Guid;
cmd.Parameters["banTime"].Value = b.BanTime;
cmd.ExecuteNonQuery();
}
}

View File

@ -180,7 +180,54 @@ namespace OpenSim.Data.PGSQL
public virtual T[] Get(string field, string key)
{
return Get(new string[] { field }, new string[] { key });
using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand())
{
if ( m_FieldTypes.ContainsKey(field) )
cmd.Parameters.Add(m_database.CreateParameter(field, key, m_FieldTypes[field]));
else
cmd.Parameters.Add(m_database.CreateParameter(field, key));
string query = String.Format("SELECT * FROM {0} WHERE \"{1}\" = :{1}", m_Realm, field, field);
cmd.Connection = conn;
cmd.CommandText = query;
conn.Open();
return DoQuery(cmd);
}
}
public virtual T[] Get(string field, string[] keys)
{
int flen = keys.Length;
if(flen == 0)
return new T[0];
int flast = flen - 1;
StringBuilder sb = new StringBuilder(1024);
sb.AppendFormat("select * from {0} where {1} IN ('", m_Realm, field);
using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand())
{
for (int i = 0 ; i < flen ; i++)
{
sb.Append(keys[i]);
if(i < flast)
sb.Append("','");
else
sb.Append("')");
}
string query = sb.ToString();
cmd.Connection = conn;
cmd.CommandText = query;
conn.Open();
return DoQuery(cmd);
}
}
public virtual T[] Get(string[] fields, string[] keys)

View File

@ -86,13 +86,13 @@ namespace OpenSim.Data.PGSQL
if (string.IsNullOrEmpty(pattern)) // True for where clause
{
pattern = " 1 ORDER BY lower(\"Name\") LIMIT 100";
pattern = "1";
return m_Groups.Get(pattern);
}
else
{
pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%') ORDER BY lower(\"Name\") LIMIT 100";
pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%')";
return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern));
}

View File

@ -114,6 +114,27 @@ namespace OpenSim.Data.PGSQL
}
}
public RegionData GetSpecific(string regionName, UUID scopeID)
{
string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) ";
if (scopeID != UUID.Zero)
sql += " and \"ScopeID\" = :scopeID";
using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName));
if (scopeID != UUID.Zero)
cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
conn.Open();
List<RegionData> ret = RunCommand(cmd);
if (ret.Count == 0)
return null;
return ret[0];
}
}
public RegionData Get(int posX, int posY, UUID scopeID)
{
// extend database search for maximum region size area

View File

@ -353,8 +353,10 @@ namespace OpenSim.Data.PGSQL
""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution,
""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID,
""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches,
""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs,
""PhysInertia"" = :PhysInertia
""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, ""Vehicle"" = :Vehicle,
""PhysInertia"" = :PhysInertia, ""standtargetx"" =:standtargetx, ""standtargety"" =:standtargety, ""standtargetz"" =:standtargetz,
""sitactrange"" =:sitactrange, ""pseudocrc"" = :pseudocrc
WHERE ""UUID"" = :UUID ;
INSERT INTO
@ -368,7 +370,8 @@ namespace OpenSim.Data.PGSQL
""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"",
""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"",
""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"",
""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""PhysInertia""
""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""Vehicle"", ""PhysInertia"",
""standtargetx"", ""standtargety"", ""standtargetz"", ""sitactrange"", ""pseudocrc""
) Select
:UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask,
:EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX,
@ -379,7 +382,8 @@ namespace OpenSim.Data.PGSQL
:OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ,
:ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA,
:ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs,
:PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :PhysInertia
:PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :Vehicle, :PhysInertia,
:standtargetx, :standtargety, :standtargetz,:sitactrange, :pseudocrc
where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID);
";
@ -610,7 +614,7 @@ namespace OpenSim.Data.PGSQL
// Legacy entry point for when terrain was always a 256x256 heightmap
public void StoreTerrain(double[,] terrain, UUID regionID)
{
StoreTerrain(new HeightmapTerrainData(terrain), regionID);
StoreTerrain(new TerrainData(terrain), regionID);
}
/// <summary>
@ -766,13 +770,14 @@ namespace OpenSim.Data.PGSQL
(""UUID"",""RegionUUID"",""LocalLandID"",""Bitmap"",""Name"",""Description"",""OwnerUUID"",""IsGroupOwned"",""Area"",""AuctionID"",""Category"",""ClaimDate"",""ClaimPrice"",
""GroupUUID"",""SalePrice"",""LandStatus"",""LandFlags"",""LandingType"",""MediaAutoScale"",""MediaTextureUUID"",""MediaURL"",""MusicURL"",""PassHours"",""PassPrice"",
""SnapshotUUID"",""UserLocationX"",""UserLocationY"",""UserLocationZ"",""UserLookAtX"",""UserLookAtY"",""UserLookAtZ"",""AuthbuyerID"",""OtherCleanTime"",""Dwell"",
""MediaType"",""MediaDescription"",""MediaSize"",""MediaLoop"",""ObscureMusic"",""ObscureMedia"",""SeeAVs"",""AnyAVSounds"",""GroupAVSounds"")
""MediaType"",""MediaDescription"",""MediaSize"",""MediaLoop"",""ObscureMusic"",""ObscureMedia"",""SeeAVs"",""AnyAVSounds"",""GroupAVSounds"",
""environment"")
VALUES
(:UUID,:RegionUUID,:LocalLandID,:Bitmap,:Name,:Description,:OwnerUUID,:IsGroupOwned,:Area,:AuctionID,:Category,:ClaimDate,:ClaimPrice,
:GroupUUID,:SalePrice,:LandStatus,:LandFlags,:LandingType,:MediaAutoScale,:MediaTextureUUID,:MediaURL,:MusicURL,:PassHours,:PassPrice,
:SnapshotUUID,:UserLocationX,:UserLocationY,:UserLocationZ,:UserLookAtX,:UserLookAtY,:UserLookAtZ,:AuthbuyerID,:OtherCleanTime,:Dwell,
:MediaType,:MediaDescription,:MediaWidth::text || ',' || :MediaHeight::text,:MediaLoop,:ObscureMusic,:ObscureMedia,:SeeAVs::int::smallint,
:AnyAVSounds::int::smallint,:GroupAVSounds::int::smallint)";
:AnyAVSounds::int::smallint,:GroupAVSounds::int::smallint,:environment)";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
@ -821,477 +826,6 @@ namespace OpenSim.Data.PGSQL
cmd.ExecuteNonQuery();
}
}
public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
{
RegionLightShareData nWP = new RegionLightShareData();
nWP.OnSave += StoreRegionWindlightSettings;
string sql = @"select * from regionwindlight where ""region_id"" = :regionID";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("regionID", regionUUID.ToString() ));
conn.Open();
using (NpgsqlDataReader result = cmd.ExecuteReader())
{
if (!result.Read())
{
//No result, so store our default windlight profile and return it
nWP.regionID = regionUUID;
StoreRegionWindlightSettings(nWP);
return nWP;
}
else
{
nWP.regionID = DBGuid.FromDB(result["region_id"]);
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
nWP.valid = true;
}
}
}
return nWP;
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
string sql = @"delete from regionwindlight where ""region_id"" = :region_id";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
conn.Open();
cmd.Parameters.Add(_Database.CreateParameter("region_id", regionID.ToString()));
cmd.ExecuteNonQuery();
}
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
string sql = @"select region_id from regionwindlight where ""region_id"" = :region_id limit 1;";
bool exists = false;
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
{
conn.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() ));
NpgsqlDataReader dr = cmd.ExecuteReader();
exists = dr.Read();
}
}
if (exists)
{
RemoveRegionWindlightSettings(wl.regionID);
}
// sql insert
sql = @"INSERT INTO regionwindlight
(region_id
,water_color_r
,water_color_g
,water_color_b
,water_fog_density_exponent
,underwater_fog_modifier
,reflection_wavelet_scale_1
,reflection_wavelet_scale_2
,reflection_wavelet_scale_3
,fresnel_scale
,fresnel_offset
,refract_scale_above
,refract_scale_below
,blur_multiplier
,big_wave_direction_x
,big_wave_direction_y
,little_wave_direction_x
,little_wave_direction_y
,normal_map_texture
,horizon_r
,horizon_g
,horizon_b
,horizon_i
,haze_horizon
,blue_density_r
,blue_density_g
,blue_density_b
,blue_density_i
,haze_density
,density_multiplier
,distance_multiplier
,max_altitude
,sun_moon_color_r
,sun_moon_color_g
,sun_moon_color_b
,sun_moon_color_i
,sun_moon_position
,ambient_r
,ambient_g
,ambient_b
,ambient_i
,east_angle
,sun_glow_focus
,sun_glow_size
,scene_gamma
,star_brightness
,cloud_color_r
,cloud_color_g
,cloud_color_b
,cloud_color_i
,cloud_x
,cloud_y
,cloud_density
,cloud_coverage
,cloud_scale
,cloud_detail_x
,cloud_detail_y
,cloud_detail_density
,cloud_scroll_x
,cloud_scroll_x_lock
,cloud_scroll_y
,cloud_scroll_y_lock
,draw_classic_clouds)
VALUES
(:region_id
,:water_color_r
,:water_color_g
,:water_color_b
,:water_fog_density_exponent
,:underwater_fog_modifier
,:reflection_wavelet_scale_1
,:reflection_wavelet_scale_2
,:reflection_wavelet_scale_3
,:fresnel_scale
,:fresnel_offset
,:refract_scale_above
,:refract_scale_below
,:blur_multiplier
,:big_wave_direction_x
,:big_wave_direction_y
,:little_wave_direction_x
,:little_wave_direction_y
,:normal_map_texture
,:horizon_r
,:horizon_g
,:horizon_b
,:horizon_i
,:haze_horizon
,:blue_density_r
,:blue_density_g
,:blue_density_b
,:blue_density_i
,:haze_density
,:density_multiplier
,:distance_multiplier
,:max_altitude
,:sun_moon_color_r
,:sun_moon_color_g
,:sun_moon_color_b
,:sun_moon_color_i
,:sun_moon_position
,:ambient_r
,:ambient_g
,:ambient_b
,:ambient_i
,:east_angle
,:sun_glow_focus
,:sun_glow_size
,:scene_gamma
,:star_brightness
,:cloud_color_r
,:cloud_color_g
,:cloud_color_b
,:cloud_color_i
,:cloud_x
,:cloud_y
,:cloud_density
,:cloud_coverage
,:cloud_scale
,:cloud_detail_x
,:cloud_detail_y
,:cloud_detail_density
,:cloud_scroll_x
,:cloud_scroll_x_lock
,:cloud_scroll_y
,:cloud_scroll_y_lock
,:draw_classic_clouds);";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
{
conn.Open();
using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString()));
cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X));
cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("water_fog_density_exponent", wl.waterFogDensityExponent));
cmd.Parameters.Add(_Database.CreateParameter("underwater_fog_modifier", wl.underwaterFogModifier));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z));
cmd.Parameters.Add(_Database.CreateParameter("fresnel_scale", wl.fresnelScale));
cmd.Parameters.Add(_Database.CreateParameter("fresnel_offset", wl.fresnelOffset));
cmd.Parameters.Add(_Database.CreateParameter("refract_scale_above", wl.refractScaleAbove));
cmd.Parameters.Add(_Database.CreateParameter("refract_scale_below", wl.refractScaleBelow));
cmd.Parameters.Add(_Database.CreateParameter("blur_multiplier", wl.blurMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_x", wl.bigWaveDirection.X));
cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y));
cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X));
cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y));
cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture.ToString()));
cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X));
cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y));
cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z));
cmd.Parameters.Add(_Database.CreateParameter("horizon_i", wl.horizon.W));
cmd.Parameters.Add(_Database.CreateParameter("haze_horizon", wl.hazeHorizon));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_r", wl.blueDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_g", wl.blueDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_b", wl.blueDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_i", wl.blueDensity.W));
cmd.Parameters.Add(_Database.CreateParameter("haze_density", wl.hazeDensity));
cmd.Parameters.Add(_Database.CreateParameter("density_multiplier", wl.densityMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("distance_multiplier", wl.distanceMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("max_altitude", wl.maxAltitude));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_r", wl.sunMoonColor.X));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_g", wl.sunMoonColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_b", wl.sunMoonColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_i", wl.sunMoonColor.W));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_position", wl.sunMoonPosition));
cmd.Parameters.Add(_Database.CreateParameter("ambient_r", wl.ambient.X));
cmd.Parameters.Add(_Database.CreateParameter("ambient_g", wl.ambient.Y));
cmd.Parameters.Add(_Database.CreateParameter("ambient_b", wl.ambient.Z));
cmd.Parameters.Add(_Database.CreateParameter("ambient_i", wl.ambient.W));
cmd.Parameters.Add(_Database.CreateParameter("east_angle", wl.eastAngle));
cmd.Parameters.Add(_Database.CreateParameter("sun_glow_focus", wl.sunGlowFocus));
cmd.Parameters.Add(_Database.CreateParameter("sun_glow_size", wl.sunGlowSize));
cmd.Parameters.Add(_Database.CreateParameter("scene_gamma", wl.sceneGamma));
cmd.Parameters.Add(_Database.CreateParameter("star_brightness", wl.starBrightness));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_r", wl.cloudColor.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_g", wl.cloudColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_b", wl.cloudColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_i", wl.cloudColor.W));
cmd.Parameters.Add(_Database.CreateParameter("cloud_x", wl.cloudXYDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_y", wl.cloudXYDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_density", wl.cloudXYDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_coverage", wl.cloudCoverage));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scale", wl.cloudScale));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_x", wl.cloudDetailXYDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_y", wl.cloudDetailXYDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_density", wl.cloudDetailXYDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_x", wl.cloudScrollX));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_x_lock", wl.cloudScrollXLock));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_y", wl.cloudScrollY));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_y_lock", wl.cloudScrollYLock));
cmd.Parameters.Add(_Database.CreateParameter("draw_classic_clouds", wl.drawClassicClouds));
cmd.ExecuteNonQuery();
}
}
#region update
// }
// else
// {
// // sql update
// sql = @"UPDATE [OpenSim].[dbo].[regionwindlight]
// SET [region_id] = @region_id
// ,[water_color_r] = @water_color_r
// ,[water_color_g] = @water_color_g
// ,[water_color_b] = @water_color_b
// ,[water_fog_density_exponent] = @water_fog_density_exponent
// ,[underwater_fog_modifier] = @underwater_fog_modifier
// ,[reflection_wavelet_scale_1] = @reflection_wavelet_scale_1
// ,[reflection_wavelet_scale_2] = @reflection_wavelet_scale_2
// ,[reflection_wavelet_scale_3] = @reflection_wavelet_scale_3
// ,[fresnel_scale] = @fresnel_scale
// ,[fresnel_offset] = @fresnel_offset
// ,[refract_scale_above] = @refract_scale_above
// ,[refract_scale_below] = @refract_scale_below
// ,[blur_multiplier] = @blur_multiplier
// ,[big_wave_direction_x] = @big_wave_direction_x
// ,[big_wave_direction_y] = @big_wave_direction_y
// ,[little_wave_direction_x] = @little_wave_direction_x
// ,[little_wave_direction_y] = @little_wave_direction_y
// ,[normal_map_texture] = @normal_map_texture
// ,[horizon_r] = @horizon_r
// ,[horizon_g] = @horizon_g
// ,[horizon_b] = @horizon_b
// ,[horizon_i] = @horizon_i
// ,[haze_horizon] = @haze_horizon
// ,[blue_density_r] = @blue_density_r
// ,[blue_density_g] = @blue_density_g
// ,[blue_density_b] = @blue_density_b
// ,[blue_density_i] = @blue_density_i
// ,[haze_density] = @haze_density
// ,[density_multiplier] = @density_multiplier
// ,[distance_multiplier] = @distance_multiplier
// ,[max_altitude] = @max_altitude
// ,[sun_moon_color_r] = @sun_moon_color_r
// ,[sun_moon_color_g] = @sun_moon_color_g
// ,[sun_moon_color_b] = @sun_moon_color_b
// ,[sun_moon_color_i] = @sun_moon_color_i
// ,[sun_moon_position] = @sun_moon_position
// ,[ambient_r] = @ambient_r
// ,[ambient_g] = @ambient_g
// ,[ambient_b] = @ambient_b
// ,[ambient_i] = @ambient_i
// ,[east_angle] = @east_angle
// ,[sun_glow_focus] = @sun_glow_focus
// ,[sun_glow_size] = @sun_glow_size
// ,[scene_gamma] = @scene_gamma
// ,[star_brightness] = @star_brightness
// ,[cloud_color_r] = @cloud_color_r
// ,[cloud_color_g] = @cloud_color_g
// ,[cloud_color_b] = @cloud_color_b
// ,[cloud_color_i] = @cloud_color_i
// ,[cloud_x] = @cloud_x
// ,[cloud_y] = @cloud_y
// ,[cloud_density] = @cloud_density
// ,[cloud_coverage] = @cloud_coverage
// ,[cloud_scale] = @cloud_scale
// ,[cloud_detail_x] = @cloud_detail_x
// ,[cloud_detail_y] = @cloud_detail_y
// ,[cloud_detail_density] = @cloud_detail_density
// ,[cloud_scroll_x] = @cloud_scroll_x
// ,[cloud_scroll_x_lock] = @cloud_scroll_x_lock
// ,[cloud_scroll_y] = @cloud_scroll_y
// ,[cloud_scroll_y_lock] = @cloud_scroll_y_lock
// ,[draw_classic_clouds] = @draw_classic_clouds
// WHERE region_id = @region_id";
// using (SqlConnection conn = new SqlConnection(m_connectionString))
// {
// conn.Open();
// using (SqlCommand cmd = new SqlCommand(sql, conn))
// {
// cmd.Parameters.AddWithValue("region_id", wl.regionID);
// cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
// cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
// cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
// cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
// cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
// cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
// cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
// cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
// cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
// cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
// cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
// cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
// cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
// cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
// cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
// cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
// cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
// cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
// cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
// cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
// cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
// cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
// cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
// cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
// cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
// cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
// cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
// cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
// cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
// cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
// cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
// cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
// cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
// cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
// cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
// cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
// cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
// cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
// cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
// cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
// cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
// cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
// cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
// cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
// cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
// cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
// cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
// cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
// cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
// cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
// cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
// cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
// cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
// cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
// cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
// cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
// cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
// cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
// cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
// cmd.ExecuteNonQuery();
// }
// }
// }
#endregion
}
#region Environment Settings
public string LoadRegionEnvironmentSettings(UUID regionUUID)
@ -1432,7 +966,7 @@ namespace OpenSim.Data.PGSQL
,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position
,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, ""map_tile_ID"" = :TerrainImageID,
""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID
""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID, ""cacheID"" = :cacheID
WHERE ""regionUUID"" = :regionUUID";
using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@ -1547,6 +1081,8 @@ namespace OpenSim.Data.PGSQL
newSettings.ParcelImageID = new UUID((Guid)row["parcel_tile_ID"]);
newSettings.TelehubObject = new UUID((Guid)row["TelehubObject"]);
if (!(row["cacheID"] is DBNull))
newSettings.CacheID = new UUID((Guid)row["cacheID"]);
return newSettings;
}
@ -1602,7 +1138,6 @@ namespace OpenSim.Data.PGSQL
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToSingle(row["Dwell"]);
try
{
newData.UserLocation =
@ -1632,6 +1167,35 @@ namespace OpenSim.Data.PGSQL
newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]);
newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]);
if (row["environment"] is DBNull)
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
string env = (string)row["environment"];
if (string.IsNullOrEmpty(env))
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
try
{
ViewerEnvironment VEnv = ViewerEnvironment.FromOSDString(env);
newData.Environment = VEnv;
newData.EnvironmentVersion = VEnv.version;
}
catch
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
}
}
return newData;
}
@ -1692,9 +1256,9 @@ namespace OpenSim.Data.PGSQL
prim.BaseMask = Convert.ToUInt32(primRow["BaseMask"]);
// vectors
prim.OffsetPosition = new Vector3(
Convert.ToSingle(primRow["PositionX"]),
Convert.ToSingle(primRow["PositionY"]),
Convert.ToSingle(primRow["PositionZ"]));
Convert.ToSingle(primRow["PositionX"]),
Convert.ToSingle(primRow["PositionY"]),
Convert.ToSingle(primRow["PositionZ"]));
prim.GroupPosition = new Vector3(
Convert.ToSingle(primRow["GroupPositionX"]),
@ -1707,9 +1271,9 @@ namespace OpenSim.Data.PGSQL
Convert.ToSingle(primRow["VelocityZ"]));
prim.AngularVelocity = new Vector3(
Convert.ToSingle(primRow["AngularVelocityX"]),
Convert.ToSingle(primRow["AngularVelocityY"]),
Convert.ToSingle(primRow["AngularVelocityZ"]));
Convert.ToSingle(primRow["AngularVelocityX"]),
Convert.ToSingle(primRow["AngularVelocityY"]),
Convert.ToSingle(primRow["AngularVelocityZ"]));
prim.Acceleration = new Vector3(
Convert.ToSingle(primRow["AccelerationX"]),
@ -1728,12 +1292,20 @@ namespace OpenSim.Data.PGSQL
Convert.ToSingle(primRow["SitTargetOffsetY"]),
Convert.ToSingle(primRow["SitTargetOffsetZ"]));
prim.SitTargetOrientationLL = new Quaternion(
Convert.ToSingle(primRow["SitTargetOrientX"]),
Convert.ToSingle(primRow["SitTargetOrientY"]),
Convert.ToSingle(primRow["SitTargetOrientZ"]),
Convert.ToSingle(primRow["SitTargetOrientW"]));
prim.StandOffset = new Vector3(
Convert.ToSingle(primRow["standtargetx"]),
Convert.ToSingle(primRow["standtargety"]),
Convert.ToSingle(primRow["standtargetz"]));
prim.SitActiveRange = Convert.ToSingle(primRow["sitactrange"]);
prim.PayPrice[0] = Convert.ToInt32(primRow["PayPrice"]);
prim.PayPrice[1] = Convert.ToInt32(primRow["PayButton1"]);
prim.PayPrice[2] = Convert.ToInt32(primRow["PayButton2"]);
@ -1742,7 +1314,10 @@ namespace OpenSim.Data.PGSQL
prim.Sound = new UUID((Guid)primRow["LoopedSound"]);
prim.SoundGain = Convert.ToSingle(primRow["LoopedSoundGain"]);
prim.SoundFlags = 1; // If it's persisted at all, it's looped
if (prim.Sound != UUID.Zero)
prim.SoundFlags = 1; // If it's persisted at all, it's looped
else
prim.SoundFlags = 0;
if (!(primRow["TextureAnimation"] is DBNull))
prim.TextureAnimation = (Byte[])primRow["TextureAnimation"];
@ -1797,7 +1372,7 @@ namespace OpenSim.Data.PGSQL
if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "")
prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]);
else
prim.DynAttrs = new DAMap();
prim.DynAttrs = null;
prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]);
prim.Density = Convert.ToSingle(primRow["Density"]);
@ -1805,13 +1380,24 @@ namespace OpenSim.Data.PGSQL
prim.Friction = Convert.ToSingle(primRow["Friction"]);
prim.Restitution = Convert.ToSingle(primRow["Restitution"]);
prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]);
SOPVehicle vehicle = null;
if (!(primRow["Vehicle"] is System.DBNull))
{
vehicle = SOPVehicle.FromXml2(primRow["Vehicle"].ToString());
if (vehicle != null)
prim.VehicleParams = vehicle;
}
PhysicsInertiaData pdata = null;
if (!(primRow["PhysInertia"] is System.DBNull))
pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString());
prim.PhysicsInertia = pdata;
int pseudocrc = Convert.ToInt32(primRow["pseudocrc"]);
if(pseudocrc != 0)
prim.PseudoCRC = pseudocrc;
return prim;
}
@ -1998,6 +1584,8 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("ParcelImageID", settings.ParcelImageID));
parameters.Add(_Database.CreateParameter("TelehubObject", settings.TelehubObject));
parameters.Add(_Database.CreateParameter("cacheID", settings.CacheID));
return parameters.ToArray();
}
@ -2059,6 +1647,20 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("AnyAVSounds", land.AnyAVSounds));
parameters.Add(_Database.CreateParameter("GroupAVSounds", land.GroupAVSounds));
if (land.Environment == null)
parameters.Add(_Database.CreateParameter("environment", ""));
else
{
try
{
parameters.Add(_Database.CreateParameter("environment", ViewerEnvironment.ToOSDString(land.Environment)));
}
catch
{
parameters.Add(_Database.CreateParameter("environment", ""));
}
}
return parameters.ToArray();
}
@ -2152,6 +1754,13 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("SitTargetOrientY", sitTargetOrient.Y));
parameters.Add(_Database.CreateParameter("SitTargetOrientZ", sitTargetOrient.Z));
Vector3 standTargetPos = prim.StandOffset;
parameters.Add(_Database.CreateParameter("standtargetx", standTargetPos.X));
parameters.Add(_Database.CreateParameter("standtargety", standTargetPos.Y));
parameters.Add(_Database.CreateParameter("standtargetz", standTargetPos.Z));
parameters.Add(_Database.CreateParameter("sitactrange", prim.SitActiveRange));
parameters.Add(_Database.CreateParameter("PayPrice", prim.PayPrice[0]));
parameters.Add(_Database.CreateParameter("PayButton1", prim.PayPrice[1]));
parameters.Add(_Database.CreateParameter("PayButton2", prim.PayPrice[2]));
@ -2214,8 +1823,7 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches));
parameters.Add(_Database.CreateParameter("PassCollisions", (bool)prim.PassCollisions));
if (prim.PassTouches)
parameters.Add(_Database.CreateParameter("PassTouches", true));
else
@ -2228,14 +1836,18 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
if (prim.VehicleParams != null)
parameters.Add(_Database.CreateParameter("Vehicle", prim.VehicleParams.ToXml2()));
else
parameters.Add(_Database.CreateParameter("Vehicle", String.Empty));
if (prim.PhysicsInertia != null)
parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2()));
else
parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty));
if (prim.DynAttrs.CountNamespaces > 0)
if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0)
parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
else
parameters.Add(_Database.CreateParameter("DynAttrs", null));
@ -2247,6 +1859,8 @@ namespace OpenSim.Data.PGSQL
parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution));
parameters.Add(_Database.CreateParameter("RotationAxisLocks", prim.RotationAxisLocks));
parameters.Add(_Database.CreateParameter("pseudocrc", prim.PseudoCRC));
return parameters.ToArray();
}

View File

@ -845,7 +845,7 @@ namespace OpenSim.Data.PGSQL
query = "SELECT \"profileImage\", \"profileFirstImage\" FROM \"userprofile\" WHERE \"useruuid\" = :Id";
using (NpgsqlCommand cmd = new NpgsqlCommand(string.Format(query, "\"userpicks\""), dbcon))
using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon))
{
cmd.Parameters.Add(m_database.CreateParameter("Id", avatarId));

View File

@ -125,3 +125,17 @@ CREATE SEQUENCE IF NOT EXISTS "public"."estate_settings_id"
CACHE 1;
COMMIT;
:VERSION 14
BEGIN TRANSACTION;
ALTER TABLE "public"."estateban"
ADD COLUMN "banningUUID" uuid NOT NULL,
ADD COLUMN "banTime" int4 NOT NULL DEFAULT 0;
COMMIT;
:VERSION 15
BEGIN TRANSACTION;
ALTER TABLE "public"."estate_settings"
ADD COLUMN "AllowEnviromentOverride" bool NOT NULL;
COMMIT;

View File

@ -1225,3 +1225,33 @@ ALTER TABLE "public"."prims"
ELSE NULL
END;
COMMIT;
:VERSION 48 #---- field Vehicle to table prims
BEGIN TRANSACTION;
ALTER TABLE prims ADD "Vehicle" TEXT;
COMMIT;
:VERSION 49 #----- Add standtarget and sit range
BEGIN;
ALTER TABLE `prims`
ADD COLUMN `standtargetx` real DEFAULT '0.0',
ADD COLUMN `standtargety` real DEFAULT '0.0',
ADD COLUMN `standtargetz` real DEFAULT '0.0',
ADD COLUMN `sitactrange` real DEFAULT '0.0';
COMMIT;
:VERSION 50 #----- Add pseudo CRC and region cache id
BEGIN;
ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0';
ALTER TABLE `regionsettings` ADD COLUMN `cacheID` uuid DEFAULT NULL;
COMMIT;
:VERSION 51 #----- parcel environment store
BEGIN;
ALTER TABLE `land` ADD COLUMN `environment` varchar default NULL;
COMMIT;

View File

@ -63,7 +63,21 @@ CREATE TABLE IF NOT EXISTS estateban (
bannedIpHostMask varchar(16) NOT NULL,
bannedNameMask varchar(64) default NULL
);
CREATE INDEX estate_ban_estate_id on estateban(EstateID);
COMMIT;
:VERSION 11
BEGIN;
ALTER TABLE `estateban` ADD COLUMN `banningUUID` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE `estateban` ADD COLUMN `banTime` integer NOT NULL DEFAULT 0;
COMMIT;
:VERSION 12
BEGIN;
ALTER TABLE `estate_settings`
ADD COLUMN `AllowEnviromentOverride` tinyint not null default 0;
COMMIT;

View File

@ -0,0 +1,16 @@
:VERSION 1
BEGIN TRANSACTION;
CREATE TABLE MuteList (
AgentID char(36) NOT NULL,
MuteID char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
MuteName varchar(64) NOT NULL DEFAULT '',
MuteType int(11) NOT NULL DEFAULT '1',
MuteFlags int(11) NOT NULL DEFAULT '0',
Stamp int(11) NOT NULL,
UNIQUE (AgentID, MuteID, MuteName),
PRIMARY KEY(AgentID)
);
COMMIT;

View File

@ -183,14 +183,14 @@ CREATE TABLE IF NOT EXISTS land(
UserLookAtY float,
UserLookAtZ float,
AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
OtherCleanTime INTEGER NOT NULL default 0,
Dwell INTEGER NOT NULL default 0,
`MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none',
`MediaDescription` VARCHAR(255) NOT NULL DEFAULT '',
`MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0',
`MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE);
OtherCleanTime INTEGER NOT NULL default 0,
Dwell INTEGER NOT NULL default 0,
`MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none',
`MediaDescription` VARCHAR(255) NOT NULL DEFAULT '',
`MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0',
`MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE);
CREATE TABLE IF NOT EXISTS landaccesslist(
LandUUID varchar(255),
@ -377,3 +377,25 @@ COMMIT;
BEGIN;
ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL;
COMMIT;
:VERSION 37 #----- Add standtarget and sit range
BEGIN;
ALTER TABLE `prims` ADD COLUMN `standtargetx` float NOT NULL DEFAULT '0.0';
ALTER TABLE `prims` ADD COLUMN `standtargety` float NOT NULL DEFAULT '0.0';
ALTER TABLE `prims` ADD COLUMN `standtargetz` float NOT NULL DEFAULT '0.0';
ALTER TABLE `prims` ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0';
COMMIT;
:VERSION 38 #----- Add pseudo CRC and region cache id
BEGIN;
ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0';
ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL;
COMMIT;
:VERSION 39 #----- parcel environment store
BEGIN;
ALTER TABLE `land` ADD COLUMN `environment` TEXT default NULL;
COMMIT;

View File

@ -186,13 +186,10 @@ namespace OpenSim.Data.SQLite
private void DoCreate(EstateSettings es)
{
List<string> names = new List<string>(FieldList);
IDataReader r = null;
names.Remove("EstateID");
using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
names.Remove("EstateID");
string sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")";
cmd.CommandText = sql;
@ -217,17 +214,12 @@ namespace OpenSim.Data.SQLite
cmd.CommandText = "select LAST_INSERT_ROWID() as id";
cmd.Parameters.Clear();
r = cmd.ExecuteReader();
using(IDataReader r = cmd.ExecuteReader())
{
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
}
}
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
r.Close();
es.Save();
}
public void StoreEstateSettings(EstateSettings es)
@ -240,11 +232,10 @@ namespace OpenSim.Data.SQLite
foreach (string f in fields)
terms.Add(f+" = :"+f);
string sql = "update estate_settings set "+String.Join(", ", terms.ToArray())+" where EstateID = :EstateID";
using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = sql;
cmd.CommandText = "update estate_settings set " + String.Join(", ", terms.ToArray()) + " where EstateID = :EstateID"; ;
cmd.Parameters.AddWithValue(":EstateID", es.EstateID);
foreach (string name in FieldList)
{
@ -278,7 +269,7 @@ namespace OpenSim.Data.SQLite
using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = "select bannedUUID from estateban where EstateID = :EstateID";
cmd.CommandText = "select * from estateban where EstateID = :EstateID";
cmd.Parameters.AddWithValue(":EstateID", es.EstateID);
r = cmd.ExecuteReader();
@ -288,12 +279,11 @@ namespace OpenSim.Data.SQLite
{
EstateBan eb = new EstateBan();
UUID uuid = new UUID();
UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
eb.BannedUserID = uuid;
eb.BannedUserID = DBGuid.FromDB(r["bannedUUID"]); ;
eb.BannedHostAddress = "0.0.0.0";
eb.BannedHostIPMask = "0.0.0.0";
eb.BanningUserID = DBGuid.FromDB(r["banningUUID"]);
eb.BanTime = Convert.ToInt32(r["banTime"]);
es.AddBan(eb);
}
r.Close();
@ -310,12 +300,14 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Clear();
cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )";
cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask, banningUUID, banTime) values ( :EstateID, :bannedUUID, '', '', '', :banningUUID, :banTime )";
foreach (EstateBan b in es.EstateBans)
{
cmd.Parameters.AddWithValue(":EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue(":bannedUUID", b.BannedUserID.ToString());
cmd.Parameters.AddWithValue(":banningUUID", b.BanningUserID.ToString());
cmd.Parameters.AddWithValue(":banTime", b.BanTime);
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
@ -471,34 +463,35 @@ namespace OpenSim.Data.SQLite
public bool LinkRegion(UUID regionID, int estateID)
{
SqliteTransaction transaction = m_connection.BeginTransaction();
// Delete any existing estate mapping for this region.
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
using(SqliteTransaction transaction = m_connection.BeginTransaction())
{
cmd.CommandText = "delete from estate_map where RegionID = :RegionID";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.ExecuteNonQuery();
}
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
if (cmd.ExecuteNonQuery() == 0)
// Delete any existing estate mapping for this region.
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
transaction.Rollback();
return false;
cmd.CommandText = "delete from estate_map where RegionID = :RegionID";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.ExecuteNonQuery();
}
else
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
transaction.Commit();
return true;
cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
if (cmd.ExecuteNonQuery() == 0)
{
transaction.Rollback();
return false;
}
else
{
transaction.Commit();
return true;
}
}
}
}

View File

@ -26,41 +26,46 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
namespace OpenSim.Data.SQLite
{
class ExtensionHandler : IExtension
public class SQLiteMuteListData : SQLiteGenericTableHandler<MuteData>, IMuteListData
{
private readonly Dictionary<Type, object> m_instances;
public ExtensionHandler(Dictionary<Type, object> instances)
public SQLiteMuteListData(string connectionString)
: base(connectionString, "MuteList", "MuteListStore")
{
m_instances = instances;
}
public T Get<T>()
public MuteData[] Get(UUID agentID)
{
return (T) m_instances[typeof (T)];
MuteData[] data = base.Get("AgentID", agentID.ToString());
return data;
}
public bool TryGet<T>(out T extension)
public bool Delete(UUID agentID, UUID muteID, string muteName)
{
if (!m_instances.ContainsKey(typeof(T)))
using (SqliteCommand cmd = new SqliteCommand())
{
extension = default(T);
cmd.CommandText = "delete from MuteList where `AgentID` = :AgentID and `MuteID` = :MuteID and `MuteName` = :MuteName";
cmd.Parameters.AddWithValue(":AgentID", agentID.ToString());
cmd.Parameters.AddWithValue(":MuteID", muteID.ToString());
cmd.Parameters.AddWithValue(":MuteName", muteName);
if (ExecuteNonQuery(cmd, m_Connection) > 0)
return true;
return false;
}
extension = Get<T>();
return true;
}
public bool Has<T>()
{
return m_instances.ContainsKey(typeof (T));
}
}
}
}

View File

@ -429,75 +429,6 @@ namespace OpenSim.Data.SQLite
}
}
/// <summary>
/// Load windlight settings from region storage
/// </summary>
/// <param name="regionUUID">RegionID</param>
public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
{
RegionLightShareData wl = null;
lock (ds)
{
DataTable windlightTable = ds.Tables["regionwindlight"];
DataRow windlightRow = windlightTable.Rows.Find(regionUUID.ToString());
if (windlightRow == null)
{
wl = new RegionLightShareData();
wl.regionID = regionUUID;
StoreRegionWindlightSettings(wl);
return wl;
}
wl = buildRegionWindlight(windlightRow);
return wl;
}
}
/// <summary>
/// Remove windlight settings from region storage
/// </summary>
/// <param name="regionID">RegionID</param>
public void RemoveRegionWindlightSettings(UUID regionID)
{
lock (ds)
{
DataTable windlightTable = ds.Tables["regionwindlight"];
DataRow windlightRow = windlightTable.Rows.Find(regionID.ToString());
if (windlightRow != null)
{
windlightRow.Delete();
}
}
Commit();
}
/// <summary>
/// Adds an windlight into region storage
/// </summary>
/// <param name="wl">RegionLightShareData</param>
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
lock (ds)
{
DataTable windlightTable = ds.Tables["regionwindlight"];
DataRow windlightRow = windlightTable.Rows.Find(wl.regionID.ToString());
if (windlightRow == null)
{
windlightRow = windlightTable.NewRow();
fillRegionWindlightRow(windlightRow, wl);
windlightTable.Rows.Add(windlightRow);
}
else
{
fillRegionWindlightRow(windlightRow, wl);
}
Commit();
}
}
#region Region Environment Settings
public string LoadRegionEnvironmentSettings(UUID regionUUID)
{
@ -626,10 +557,13 @@ namespace OpenSim.Data.SQLite
// m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
}
primDa.Update(ds, "prims");
shapeDa.Update(ds, "primshapes");
itemsDa.Update(ds, "primitems");
ds.AcceptChanges();
}
Commit();
// m_log.Info("[Dump of prims]: " + ds.GetXml());
// m_log.Info("[Dump of prims]: " + ds.GetXml());
}
/// <summary>
@ -823,7 +757,7 @@ namespace OpenSim.Data.SQLite
// Legacy entry point for when terrain was always a 256x256 hieghtmap
public void StoreTerrain(double[,] ter, UUID regionID)
{
StoreTerrain(new HeightmapTerrainData(ter), regionID);
StoreTerrain(new TerrainData(ter), regionID);
}
/// <summary>
@ -835,8 +769,7 @@ namespace OpenSim.Data.SQLite
{
lock (ds)
{
using (
SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn))
using (SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString()));
cmd.ExecuteNonQuery();
@ -1058,12 +991,9 @@ namespace OpenSim.Data.SQLite
if (rowToCheck["LandUUID"].ToString() == parcel.LandData.GlobalID.ToString())
rowsToDelete.Add(rowToCheck);
}
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
for (int iter = 0; iter < rowsToDelete.Count; ++iter)
rowsToDelete[iter].Delete();
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
rowsToDelete.Clear();
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
{
DataRow newAccessRow = landaccesslist.NewRow();
@ -1313,6 +1243,21 @@ namespace OpenSim.Data.SQLite
createCol(prims, "KeyframeMotion", typeof(Byte[]));
createCol(prims, "PassTouches", typeof(bool));
createCol(prims, "PassCollisions", typeof(bool));
createCol(prims, "Vehicle", typeof(string));
createCol(prims, "RotationAxisLocks", typeof(byte));
createCol(prims, "PhysInertia", typeof(string));
createCol(prims, "standtargetx", typeof(float));
createCol(prims, "standtargety", typeof(float));
createCol(prims, "standtargetz", typeof(float));
createCol(prims, "sitactrange", typeof(float));
createCol(prims, "pseudocrc", typeof(int));
// Add in contraints
prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
@ -1355,6 +1300,7 @@ namespace OpenSim.Data.SQLite
createCol(shapes, "ProfileCurve", typeof(Int32));
createCol(shapes, "ProfileHollow", typeof(Int32));
createCol(shapes, "State", typeof(Int32));
createCol(shapes, "LastAttachPoint", typeof(Int32));
// text TODO: this isn't right, but I'm not sure the right
// way to specify this as a blob atm
createCol(shapes, "Texture", typeof(Byte[]));
@ -1456,6 +1402,7 @@ namespace OpenSim.Data.SQLite
createCol(land, "SeeAVs", typeof(Boolean));
createCol(land, "AnyAVSounds", typeof(Boolean));
createCol(land, "GroupAVSounds", typeof(Boolean));
createCol(land, "environment", typeof(string));
land.PrimaryKey = new DataColumn[] { land.Columns["UUID"] };
@ -1520,6 +1467,9 @@ namespace OpenSim.Data.SQLite
createCol(regionsettings, "map_tile_ID", typeof(String));
createCol(regionsettings, "TelehubObject", typeof(String));
createCol(regionsettings, "parcel_tile_ID", typeof(String));
createCol(regionsettings, "block_search", typeof(Boolean));
createCol(regionsettings, "casino", typeof(Boolean));
createCol(regionsettings, "cacheID", typeof(string));
regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] };
return regionsettings;
}
@ -1725,14 +1675,18 @@ namespace OpenSim.Data.SQLite
Convert.ToSingle(row["SitTargetOffsetY"]),
Convert.ToSingle(row["SitTargetOffsetZ"]));
prim.SitTargetOrientationLL = new Quaternion(
Convert.ToSingle(
row["SitTargetOrientX"]),
Convert.ToSingle(
row["SitTargetOrientY"]),
Convert.ToSingle(
row["SitTargetOrientZ"]),
Convert.ToSingle(
row["SitTargetOrientW"]));
Convert.ToSingle(row["SitTargetOrientX"]),
Convert.ToSingle(row["SitTargetOrientY"]),
Convert.ToSingle(row["SitTargetOrientZ"]),
Convert.ToSingle(row["SitTargetOrientW"]));
prim.StandOffset = new Vector3(
Convert.ToSingle(row["standtargetx"]),
Convert.ToSingle(row["standtargety"]),
Convert.ToSingle(row["standtargetz"])
);
prim.SitActiveRange = Convert.ToSingle(row["sitactrange"]);
prim.ClickAction = Convert.ToByte(row["ClickAction"]);
prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]);
@ -1743,7 +1697,10 @@ namespace OpenSim.Data.SQLite
prim.Sound = new UUID(row["LoopedSound"].ToString());
prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
prim.SoundFlags = 1; // If it's persisted at all, it's looped
if (prim.Sound != UUID.Zero)
prim.SoundFlags = 1; // If it's persisted at all, it's looped
else
prim.SoundFlags = 0;
if (!row.IsNull("TextureAnimation"))
prim.TextureAnimation = Convert.FromBase64String(row["TextureAnimation"].ToString());
@ -1809,7 +1766,7 @@ namespace OpenSim.Data.SQLite
}
else
{
prim.DynAttrs = new DAMap();
prim.DynAttrs = null;
}
prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]);
@ -1849,6 +1806,10 @@ namespace OpenSim.Data.SQLite
pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString());
prim.PhysicsInertia = pdata;
int pseudocrc = Convert.ToInt32(row["pseudocrc"]);
if(pseudocrc != 0)
prim.PseudoCRC = pseudocrc;
return prim;
}
@ -1960,6 +1921,36 @@ namespace OpenSim.Data.SQLite
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
if (row["environment"] is DBNull)
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
string env = (string)row["environment"];
if (string.IsNullOrEmpty(env))
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
else
{
try
{
ViewerEnvironment VEnv = ViewerEnvironment.FromOSDString(env);
newData.Environment = VEnv;
newData.EnvironmentVersion = VEnv.version;
}
catch
{
newData.Environment = null;
newData.EnvironmentVersion = -1;
}
}
}
return newData;
}
@ -2012,86 +2003,12 @@ namespace OpenSim.Data.SQLite
newSettings.ParcelImageID = new UUID((String)row["parcel_tile_ID"]);
newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
newSettings.Casino = Convert.ToBoolean(row["casino"]);
if (!(row["cacheID"] is System.DBNull))
newSettings.CacheID = new UUID((String)row["cacheID"]);
return newSettings;
}
/// <summary>
/// Build a windlight entry from the persisted data.
/// </summary>
/// <param name="row"></param>
/// <returns>RegionLightShareData</returns>
private RegionLightShareData buildRegionWindlight(DataRow row)
{
RegionLightShareData windlight = new RegionLightShareData();
windlight.regionID = new UUID((string)row["region_id"]);
windlight.waterColor.X = Convert.ToSingle(row["water_color_r"]);
windlight.waterColor.Y = Convert.ToSingle(row["water_color_g"]);
windlight.waterColor.Z = Convert.ToSingle(row["water_color_b"]);
//windlight.waterColor.W = Convert.ToSingle(row["water_color_i"]); //not implemented
windlight.waterFogDensityExponent = Convert.ToSingle(row["water_fog_density_exponent"]);
windlight.underwaterFogModifier = Convert.ToSingle(row["underwater_fog_modifier"]);
windlight.reflectionWaveletScale.X = Convert.ToSingle(row["reflection_wavelet_scale_1"]);
windlight.reflectionWaveletScale.Y = Convert.ToSingle(row["reflection_wavelet_scale_2"]);
windlight.reflectionWaveletScale.Z = Convert.ToSingle(row["reflection_wavelet_scale_3"]);
windlight.fresnelScale = Convert.ToSingle(row["fresnel_scale"]);
windlight.fresnelOffset = Convert.ToSingle(row["fresnel_offset"]);
windlight.refractScaleAbove = Convert.ToSingle(row["refract_scale_above"]);
windlight.refractScaleBelow = Convert.ToSingle(row["refract_scale_below"]);
windlight.blurMultiplier = Convert.ToSingle(row["blur_multiplier"]);
windlight.bigWaveDirection.X = Convert.ToSingle(row["big_wave_direction_x"]);
windlight.bigWaveDirection.Y = Convert.ToSingle(row["big_wave_direction_y"]);
windlight.littleWaveDirection.X = Convert.ToSingle(row["little_wave_direction_x"]);
windlight.littleWaveDirection.Y = Convert.ToSingle(row["little_wave_direction_y"]);
windlight.normalMapTexture = new UUID((string)row["normal_map_texture"]);
windlight.horizon.X = Convert.ToSingle(row["horizon_r"]);
windlight.horizon.Y = Convert.ToSingle(row["horizon_g"]);
windlight.horizon.Z = Convert.ToSingle(row["horizon_b"]);
windlight.horizon.W = Convert.ToSingle(row["horizon_i"]);
windlight.hazeHorizon = Convert.ToSingle(row["haze_horizon"]);
windlight.blueDensity.X = Convert.ToSingle(row["blue_density_r"]);
windlight.blueDensity.Y = Convert.ToSingle(row["blue_density_g"]);
windlight.blueDensity.Z = Convert.ToSingle(row["blue_density_b"]);
windlight.blueDensity.W = Convert.ToSingle(row["blue_density_i"]);
windlight.hazeDensity = Convert.ToSingle(row["haze_density"]);
windlight.densityMultiplier = Convert.ToSingle(row["density_multiplier"]);
windlight.distanceMultiplier = Convert.ToSingle(row["distance_multiplier"]);
windlight.maxAltitude = Convert.ToUInt16(row["max_altitude"]);
windlight.sunMoonColor.X = Convert.ToSingle(row["sun_moon_color_r"]);
windlight.sunMoonColor.Y = Convert.ToSingle(row["sun_moon_color_g"]);
windlight.sunMoonColor.Z = Convert.ToSingle(row["sun_moon_color_b"]);
windlight.sunMoonColor.W = Convert.ToSingle(row["sun_moon_color_i"]);
windlight.sunMoonPosition = Convert.ToSingle(row["sun_moon_position"]);
windlight.ambient.X = Convert.ToSingle(row["ambient_r"]);
windlight.ambient.Y = Convert.ToSingle(row["ambient_g"]);
windlight.ambient.Z = Convert.ToSingle(row["ambient_b"]);
windlight.ambient.W = Convert.ToSingle(row["ambient_i"]);
windlight.eastAngle = Convert.ToSingle(row["east_angle"]);
windlight.sunGlowFocus = Convert.ToSingle(row["sun_glow_focus"]);
windlight.sunGlowSize = Convert.ToSingle(row["sun_glow_size"]);
windlight.sceneGamma = Convert.ToSingle(row["scene_gamma"]);
windlight.starBrightness = Convert.ToSingle(row["star_brightness"]);
windlight.cloudColor.X = Convert.ToSingle(row["cloud_color_r"]);
windlight.cloudColor.Y = Convert.ToSingle(row["cloud_color_g"]);
windlight.cloudColor.Z = Convert.ToSingle(row["cloud_color_b"]);
windlight.cloudColor.W = Convert.ToSingle(row["cloud_color_i"]);
windlight.cloudXYDensity.X = Convert.ToSingle(row["cloud_x"]);
windlight.cloudXYDensity.Y = Convert.ToSingle(row["cloud_y"]);
windlight.cloudXYDensity.Z = Convert.ToSingle(row["cloud_density"]);
windlight.cloudCoverage = Convert.ToSingle(row["cloud_coverage"]);
windlight.cloudScale = Convert.ToSingle(row["cloud_scale"]);
windlight.cloudDetailXYDensity.X = Convert.ToSingle(row["cloud_detail_x"]);
windlight.cloudDetailXYDensity.Y = Convert.ToSingle(row["cloud_detail_y"]);
windlight.cloudDetailXYDensity.Z = Convert.ToSingle(row["cloud_detail_density"]);
windlight.cloudScrollX = Convert.ToSingle(row["cloud_scroll_x"]);
windlight.cloudScrollXLock = Convert.ToBoolean(row["cloud_scroll_x_lock"]);
windlight.cloudScrollY = Convert.ToSingle(row["cloud_scroll_y"]);
windlight.cloudScrollYLock = Convert.ToBoolean(row["cloud_scroll_y_lock"]);
windlight.drawClassicClouds = Convert.ToBoolean(row["draw_classic_clouds"]);
return windlight;
}
/// <summary>
/// Build a land access entry from the persisted data.
/// </summary>
@ -2172,6 +2089,14 @@ namespace OpenSim.Data.SQLite
row["SitTargetOrientX"] = sitTargetOrient.X;
row["SitTargetOrientY"] = sitTargetOrient.Y;
row["SitTargetOrientZ"] = sitTargetOrient.Z;
Vector3 standTarget = prim.StandOffset;
row["standtargetx"] = standTarget.X;
row["standtargety"] = standTarget.Y;
row["standtargetz"] = standTarget.Z;
row["sitactrange"] = prim.SitActiveRange;
row["ColorR"] = Convert.ToInt32(prim.Color.R);
row["ColorG"] = Convert.ToInt32(prim.Color.G);
row["ColorB"] = Convert.ToInt32(prim.Color.B);
@ -2197,7 +2122,6 @@ namespace OpenSim.Data.SQLite
row["CameraAtOffsetY"] = prim.GetCameraAtOffset().Y;
row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
if ((prim.SoundFlags & 1) != 0) // Looped
{
row["LoopedSound"] = prim.Sound.ToString();
@ -2247,7 +2171,7 @@ namespace OpenSim.Data.SQLite
row["AttachedPosY"] = prim.AttachedPos.Y;
row["AttachedPosZ"] = prim.AttachedPos.Z;
if (prim.DynAttrs.CountNamespaces > 0)
if (prim.DynAttrs!= null && prim.DynAttrs.CountNamespaces > 0)
row["DynAttrs"] = prim.DynAttrs.ToXml();
else
row["DynAttrs"] = null;
@ -2277,6 +2201,7 @@ namespace OpenSim.Data.SQLite
else
row["PhysInertia"] = String.Empty;
row["pseudocrc"] = prim.PseudoCRC;
}
/// <summary>
@ -2364,6 +2289,20 @@ namespace OpenSim.Data.SQLite
row["AnyAVSounds"] = land.AnyAVSounds;
row["GroupAVSounds"] = land.GroupAVSounds;
if (land.Environment == null)
row["environment"] = "";
else
{
try
{
row["environment"] = ViewerEnvironment.ToOSDString(land.Environment);
}
catch
{
row["environment"] = "";
}
}
}
/// <summary>
@ -2424,79 +2363,7 @@ namespace OpenSim.Data.SQLite
row["parcel_tile_ID"] = settings.ParcelImageID.ToString();
row["block_search"] = settings.GodBlockSearch;
row["casino"] = settings.Casino;
}
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <param name="windlight"></param>
private static void fillRegionWindlightRow(DataRow row, RegionLightShareData windlight)
{
row["region_id"] = windlight.regionID.ToString();
row["water_color_r"] = windlight.waterColor.X;
row["water_color_g"] = windlight.waterColor.Y;
row["water_color_b"] = windlight.waterColor.Z;
row["water_color_i"] = 1; //windlight.waterColor.W; //not implemented
row["water_fog_density_exponent"] = windlight.waterFogDensityExponent;
row["underwater_fog_modifier"] = windlight.underwaterFogModifier;
row["reflection_wavelet_scale_1"] = windlight.reflectionWaveletScale.X;
row["reflection_wavelet_scale_2"] = windlight.reflectionWaveletScale.Y;
row["reflection_wavelet_scale_3"] = windlight.reflectionWaveletScale.Z;
row["fresnel_scale"] = windlight.fresnelScale;
row["fresnel_offset"] = windlight.fresnelOffset;
row["refract_scale_above"] = windlight.refractScaleAbove;
row["refract_scale_below"] = windlight.refractScaleBelow;
row["blur_multiplier"] = windlight.blurMultiplier;
row["big_wave_direction_x"] = windlight.bigWaveDirection.X;
row["big_wave_direction_y"] = windlight.bigWaveDirection.Y;
row["little_wave_direction_x"] = windlight.littleWaveDirection.X;
row["little_wave_direction_y"] = windlight.littleWaveDirection.Y;
row["normal_map_texture"] = windlight.normalMapTexture.ToString();
row["horizon_r"] = windlight.horizon.X;
row["horizon_g"] = windlight.horizon.Y;
row["horizon_b"] = windlight.horizon.Z;
row["horizon_i"] = windlight.horizon.W;
row["haze_horizon"] = windlight.hazeHorizon;
row["blue_density_r"] = windlight.blueDensity.X;
row["blue_density_g"] = windlight.blueDensity.Y;
row["blue_density_b"] = windlight.blueDensity.Z;
row["blue_density_i"] = windlight.blueDensity.W;
row["haze_density"] = windlight.hazeDensity;
row["density_multiplier"] = windlight.densityMultiplier;
row["distance_multiplier"] = windlight.distanceMultiplier;
row["max_altitude"] = windlight.maxAltitude;
row["sun_moon_color_r"] = windlight.sunMoonColor.X;
row["sun_moon_color_g"] = windlight.sunMoonColor.Y;
row["sun_moon_color_b"] = windlight.sunMoonColor.Z;
row["sun_moon_color_i"] = windlight.sunMoonColor.W;
row["sun_moon_position"] = windlight.sunMoonPosition;
row["ambient_r"] = windlight.ambient.X;
row["ambient_g"] = windlight.ambient.Y;
row["ambient_b"] = windlight.ambient.Z;
row["ambient_i"] = windlight.ambient.W;
row["east_angle"] = windlight.eastAngle;
row["sun_glow_focus"] = windlight.sunGlowFocus;
row["sun_glow_size"] = windlight.sunGlowSize;
row["scene_gamma"] = windlight.sceneGamma;
row["star_brightness"] = windlight.starBrightness;
row["cloud_color_r"] = windlight.cloudColor.X;
row["cloud_color_g"] = windlight.cloudColor.Y;
row["cloud_color_b"] = windlight.cloudColor.Z;
row["cloud_color_i"] = windlight.cloudColor.W;
row["cloud_x"] = windlight.cloudXYDensity.X;
row["cloud_y"] = windlight.cloudXYDensity.Y;
row["cloud_density"] = windlight.cloudXYDensity.Z;
row["cloud_coverage"] = windlight.cloudCoverage;
row["cloud_scale"] = windlight.cloudScale;
row["cloud_detail_x"] = windlight.cloudDetailXYDensity.X;
row["cloud_detail_y"] = windlight.cloudDetailXYDensity.Y;
row["cloud_detail_density"] = windlight.cloudDetailXYDensity.Z;
row["cloud_scroll_x"] = windlight.cloudScrollX;
row["cloud_scroll_x_lock"] = windlight.cloudScrollXLock;
row["cloud_scroll_y"] = windlight.cloudScrollY;
row["cloud_scroll_y_lock"] = windlight.cloudScrollYLock;
row["draw_classic_clouds"] = windlight.drawClassicClouds;
row["cacheID"] = settings.CacheID;
}
/// <summary>

View File

@ -926,7 +926,7 @@ namespace OpenSim.Data.SQLite
{
using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = query;
cmd.CommandText = string.Format(query, "\"classifieds\"");
cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
@ -940,7 +940,7 @@ namespace OpenSim.Data.SQLite
using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = query;
cmd.CommandText = string.Format(query, "\"userpicks\"");
cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))

View File

@ -495,10 +495,6 @@ namespace OpenSim.Data.Tests
Assert.AreEqual(pricePerMeter, estateSettings.PricePerMeter);
Assert.AreEqual(redirectGridX, estateSettings.RedirectGridX);
Assert.AreEqual(redirectGridY, estateSettings.RedirectGridY);
Assert.AreEqual(useGlobalTime, estateSettings.UseGlobalTime);
Assert.AreEqual(fixedSun, estateSettings.FixedSun);
DataTestUtil.AssertDoubleEqualsWithTolerance(sunPosition, estateSettings.SunPosition);
Assert.AreEqual(allowVoice, estateSettings.AllowVoice);
Assert.AreEqual(allowDirectTeleport, estateSettings.AllowDirectTeleport);

View File

@ -269,12 +269,12 @@ namespace OpenSim.Data.Tests
random.NextBytes(partsys);
DateTime expires = new DateTime(2008, 12, 20);
DateTime rezzed = new DateTime(2009, 07, 15);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 groupos = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 offset = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Quaternion rotoff = new Quaternion(random.Next(1),random.Next(1),random.Next(1),random.Next(1));
Vector3 velocity = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 angvelo = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 accel = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
string description = name;
Color color = Color.FromArgb(255, 165, 50, 100);
string text = "All Your Base Are Belong to Us";
@ -289,7 +289,7 @@ namespace OpenSim.Data.Tests
pbshap.ProfileBegin = ushort.MaxValue;
pbshap.ProfileEnd = ushort.MaxValue;
pbshap.ProfileHollow = ushort.MaxValue;
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 scale = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
RegionInfo regionInfo = new RegionInfo();
regionInfo.RegionID = region3;
@ -378,9 +378,9 @@ namespace OpenSim.Data.Tests
SceneObjectPart p = sogs[0].RootPart;
Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))");
//Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))");
Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
Assert.That(groupos, Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
Assert.That(name,Is.EqualTo(p.Name), "Assert.That(name,Is.EqualTo(p.Name))");
Assert.That(rotoff,Is.EqualTo(p.RotationOffset), "Assert.That(rotoff,Is.EqualTo(p.RotationOffset))");
Assert.That(rotoff, Is.EqualTo(p.RotationOffset), "Assert.That(rotoff,Is.EqualTo(p.RotationOffset))");
Assert.That(uuid,Is.EqualTo(p.UUID), "Assert.That(uuid,Is.EqualTo(p.UUID))");
Assert.That(creator,Is.EqualTo(p.CreatorID), "Assert.That(creator,Is.EqualTo(p.CreatorID))");
//Assert.That(iserial,Is.EqualTo(p.InventorySerial), "Assert.That(iserial,Is.EqualTo(p.InventorySerial))");
@ -443,12 +443,12 @@ namespace OpenSim.Data.Tests
random.NextBytes(partsys);
DateTime expires = new DateTime(2010, 12, 20);
DateTime rezzed = new DateTime(2005, 07, 15);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 groupos = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 offset = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Quaternion rotoff = new Quaternion(random.Next(100000),random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 velocity = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 angvelo = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 accel = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
string description = name;
Color color = Color.FromArgb(255, 255, 255, 0);
string text = "What You Say?{]\vz~";
@ -536,12 +536,12 @@ namespace OpenSim.Data.Tests
{
UUID tmp = UUID.Random();
SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 groupos = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 offset = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Quaternion rotoff = new Quaternion(random.Next(100000),random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 velocity = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 angvelo = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
Vector3 accel = new Vector3(random.Next(100000),random.Next(100000),random.Next(100000));
sop.GroupPosition = groupos;
sop.RotationOffset = rotoff;
@ -648,11 +648,13 @@ namespace OpenSim.Data.Tests
[Test]
public void T020_PrimInventoryEmpty()
{
/*
TestHelpers.InMethod();
SceneObjectGroup sog = GetMySOG("object1");
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
Assert.That(t, Is.Null);
*/
}
// TODO: Is there any point to call StorePrimInventory on a list, rather than on the prim itself?
@ -672,6 +674,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T021_PrimInventoryBasic()
{
/*
TestHelpers.InMethod();
SceneObjectGroup sog = GetMySOG("object1");
@ -707,11 +710,13 @@ namespace OpenSim.Data.Tests
sog = FindSOG("object1", region1);
t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
Assert.That(t, Is.Null);
*/
}
[Test]
public void T025_PrimInventoryPersistency()
{
/*
TestHelpers.InMethod();
InventoryItemBase i = new InventoryItemBase();
@ -779,12 +784,14 @@ namespace OpenSim.Data.Tests
// Assert.That(t.CurrentPermissions, Is.EqualTo(curperm | 16), "Assert.That(t.CurrentPermissions, Is.EqualTo(curperm | 8))");
Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID), "Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID))");
Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID), "Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID))");
*/
}
/*
[Test]
[ExpectedException(typeof(ArgumentException))]
public void T026_PrimInventoryMany()
{
TestHelpers.InMethod();
UUID i1,i2,i3,i4;
@ -812,8 +819,9 @@ namespace OpenSim.Data.Tests
Assert.That(t3.Name, Is.EqualTo(ib3.Name), "Assert.That(t3.Name, Is.EqualTo(ib3.Name))");
TaskInventoryItem t4 = sog.GetInventoryItem(sog.RootPart.LocalId, i4);
Assert.That(t4, Is.Null);
}
}
*/
[Test]
public void T052_RemoveObject()
{
@ -861,7 +869,6 @@ namespace OpenSim.Data.Tests
double terrainlower = random.Next();
Vector3 sunvector = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
UUID terimgid = UUID.Random();
double sunpos = random.Next();
UUID cov = UUID.Random();
RegionSettings r1 = db.LoadRegionSettings(region1);
@ -895,10 +902,8 @@ namespace OpenSim.Data.Tests
r1.TerrainLowerLimit = terrainlower;
r1.UseEstateSun = false;
r1.Sandbox = true;
r1.SunVector = sunvector;
r1.TerrainImageID = terimgid;
r1.FixedSun = true;
r1.SunPosition = sunpos;
r1.Covenant = cov;
db.StoreRegionSettings(r1);
@ -933,12 +938,8 @@ namespace OpenSim.Data.Tests
Assert.That(r1a.WaterHeight,Is.EqualTo(waterh), "Assert.That(r1a.WaterHeight,Is.EqualTo(waterh))");
Assert.That(r1a.TerrainRaiseLimit,Is.EqualTo(terrainraise), "Assert.That(r1a.TerrainRaiseLimit,Is.EqualTo(terrainraise))");
Assert.That(r1a.TerrainLowerLimit,Is.EqualTo(terrainlower), "Assert.That(r1a.TerrainLowerLimit,Is.EqualTo(terrainlower))");
Assert.That(r1a.UseEstateSun,Is.False);
Assert.That(r1a.Sandbox,Is.True);
Assert.That(r1a.SunVector,Is.EqualTo(sunvector), "Assert.That(r1a.SunVector,Is.EqualTo(sunvector))");
//Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid), "Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid))");
Assert.That(r1a.FixedSun,Is.True);
Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))");
Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))");
}
@ -962,7 +963,7 @@ namespace OpenSim.Data.Tests
db.StoreTerrain(t1, region1);
// store terrain is async
Thread.Sleep(1000);
Thread.Sleep(500);
Assert.That(db.LoadTerrain(zero), Is.Null);
Assert.That(db.LoadTerrain(region1), Is.Not.Null);
@ -992,7 +993,7 @@ namespace OpenSim.Data.Tests
db.StoreTerrain(baseterrain2, region1);
// store terrain is async
Thread.Sleep(1000);
Thread.Sleep(500);
double[,] t1 = db.LoadTerrain(region1);
Assert.That(CompareTerrain(t1, baseterrain1), Is.False);
@ -1078,7 +1079,6 @@ namespace OpenSim.Data.Tests
sop.Shape = PrimitiveBaseShape.Default;
SceneObjectGroup sog = new SceneObjectGroup(sop);
// sog.SetScene(scene);
return sog;
}

View File

@ -173,6 +173,7 @@ namespace OpenSim.Framework
/// Position the Agent's Avatar starts in the region
/// </summary>
public Vector3 startpos;
public float startfar = -1.0f;
public Dictionary<string, object> ServiceURLs;
@ -219,6 +220,8 @@ namespace OpenSim.Framework
args["channel"] = OSD.FromString(Channel);
args["mac"] = OSD.FromString(Mac);
args["id0"] = OSD.FromString(Id0);
if(startfar > 0)
args["far"] = OSD.FromReal(startfar);
if (Appearance != null)
{
@ -264,16 +267,17 @@ namespace OpenSim.Framework
/// <param name="args"></param>
public void UnpackAgentCircuitData(OSDMap args)
{
if (args["agent_id"] != null)
AgentID = args["agent_id"].AsUUID();
if (args["base_folder"] != null)
BaseFolder = args["base_folder"].AsUUID();
if (args["caps_path"] != null)
CapsPath = args["caps_path"].AsString();
OSD tmpOSD;
if (args.TryGetValue("agent_id", out tmpOSD))
AgentID = tmpOSD.AsUUID();
if (args.TryGetValue("base_folder", out tmpOSD))
BaseFolder =tmpOSD.AsUUID();
if (args.TryGetValue("caps_path", out tmpOSD))
CapsPath = tmpOSD.AsString();
if ((args["children_seeds"] != null) && (args["children_seeds"].Type == OSDType.Array))
if ((args.TryGetValue("children_seeds", out tmpOSD) && tmpOSD is OSDArray))
{
OSDArray childrenSeeds = (OSDArray)(args["children_seeds"]);
OSDArray childrenSeeds = (OSDArray)tmpOSD;
ChildrenCapSeeds = new Dictionary<ulong, string>();
foreach (OSD o in childrenSeeds)
{
@ -282,50 +286,59 @@ namespace OpenSim.Framework
ulong handle = 0;
string seed = "";
OSDMap pair = (OSDMap)o;
if (pair["handle"] != null)
if (!UInt64.TryParse(pair["handle"].AsString(), out handle))
if (pair.TryGetValue("handle", out tmpOSD))
{
if (!UInt64.TryParse(tmpOSD.AsString(), out handle))
continue;
if (pair["seed"] != null)
seed = pair["seed"].AsString();
}
if (!ChildrenCapSeeds.ContainsKey(handle))
ChildrenCapSeeds.Add(handle, seed);
{
if (pair.TryGetValue("seed", out tmpOSD))
{
seed = tmpOSD.AsString();
ChildrenCapSeeds.Add(handle, seed);
}
}
}
}
}
else
ChildrenCapSeeds = new Dictionary<ulong, string>();
if (args["child"] != null)
child = args["child"].AsBoolean();
if (args["circuit_code"] != null)
UInt32.TryParse(args["circuit_code"].AsString(), out circuitcode);
if (args["first_name"] != null)
firstname = args["first_name"].AsString();
if (args["last_name"] != null)
lastname = args["last_name"].AsString();
if (args["inventory_folder"] != null)
InventoryFolder = args["inventory_folder"].AsUUID();
if (args["secure_session_id"] != null)
SecureSessionID = args["secure_session_id"].AsUUID();
if (args["session_id"] != null)
SessionID = args["session_id"].AsUUID();
if (args["service_session_id"] != null)
ServiceSessionID = args["service_session_id"].AsString();
if (args["client_ip"] != null)
IPAddress = args["client_ip"].AsString();
if (args["viewer"] != null)
Viewer = args["viewer"].AsString();
if (args["channel"] != null)
Channel = args["channel"].AsString();
if (args["mac"] != null)
Mac = args["mac"].AsString();
if (args["id0"] != null)
Id0 = args["id0"].AsString();
if (args["teleport_flags"] != null)
teleportFlags = args["teleport_flags"].AsUInteger();
if (args.TryGetValue("child", out tmpOSD))
child = tmpOSD.AsBoolean();
if (args.TryGetValue("circuit_code", out tmpOSD))
UInt32.TryParse(tmpOSD.AsString(), out circuitcode);
if (args.TryGetValue("first_name", out tmpOSD))
firstname = tmpOSD.AsString();
if (args.TryGetValue("last_name", out tmpOSD))
lastname = tmpOSD.AsString();
if (args.TryGetValue("inventory_folder", out tmpOSD))
InventoryFolder = tmpOSD.AsUUID();
if (args.TryGetValue("secure_session_id", out tmpOSD))
SecureSessionID = tmpOSD.AsUUID();
if (args.TryGetValue("session_id", out tmpOSD))
SessionID = tmpOSD.AsUUID();
if (args.TryGetValue("service_session_id", out tmpOSD))
ServiceSessionID = tmpOSD.AsString();
if (args.TryGetValue("client_ip", out tmpOSD))
IPAddress = tmpOSD.AsString();
if (args.TryGetValue("viewer", out tmpOSD))
Viewer = tmpOSD.AsString();
if (args.TryGetValue("channel", out tmpOSD))
Channel = tmpOSD.AsString();
if (args.TryGetValue("mac", out tmpOSD))
Mac = tmpOSD.AsString();
if (args.TryGetValue("id0", out tmpOSD))
Id0 = tmpOSD.AsString();
if (args.TryGetValue("teleport_flags", out tmpOSD))
teleportFlags = tmpOSD.AsUInteger();
if (args["start_pos"] != null)
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
if (args.TryGetValue("start_pos", out tmpOSD))
Vector3.TryParse(tmpOSD.AsString(), out startpos);
if(args.TryGetValue("far", out tmpOSD))
startfar = (float)tmpOSD.AsReal();
//m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
@ -336,12 +349,12 @@ namespace OpenSim.Framework
// Eventually this code should be deprecated, use full appearance
// packing in packed_appearance
if (args["appearance_serial"] != null)
Appearance.Serial = args["appearance_serial"].AsInteger();
if (args.TryGetValue("appearance_serial", out tmpOSD))
Appearance.Serial = tmpOSD.AsInteger();
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
if (args.TryGetValue("packed_appearance", out tmpOSD) && (tmpOSD is OSDMap))
{
Appearance.Unpack((OSDMap)args["packed_appearance"]);
Appearance.Unpack((OSDMap)tmpOSD);
// m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
}
else
@ -356,31 +369,29 @@ namespace OpenSim.Framework
ServiceURLs = new Dictionary<string, object>();
// Try parse the new way, OSDMap
if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map)
if (args.TryGetValue("serviceurls", out tmpOSD) && (tmpOSD is OSDMap))
{
OSDMap urls = (OSDMap)(args["serviceurls"]);
OSDMap urls = (OSDMap)tmpOSD;
foreach (KeyValuePair<String, OSD> kvp in urls)
{
ServiceURLs[kvp.Key] = kvp.Value.AsString();
ServiceURLs[kvp.Key] = kvp.Value;
//System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]);
}
}
// else try the old way, OSDArray
// OBSOLETE -- soon to be deleted
else if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array)
else if (args.TryGetValue("service_urls", out tmpOSD) && (tmpOSD is OSDArray))
{
OSDArray urls = (OSDArray)(args["service_urls"]);
for (int i = 0; i < urls.Count / 2; i++)
OSDArray urls = (OSDArray)tmpOSD;
OSD tmpOSDb;
for (int i = 0; i < urls.Count - 1; i += 2)
{
ServiceURLs[urls[i * 2].AsString()] = urls[(i * 2) + 1].AsString();
tmpOSD = urls[i];
tmpOSDb = urls[i + 1];
ServiceURLs[tmpOSD.AsString()] = tmpOSDb.AsString();
//System.Console.WriteLine("XXX " + urls[i * 2].AsString() + "=" + urls[(i * 2) + 1].AsString());
}
}
}
}
}

View File

@ -26,6 +26,7 @@
*/
using System.Collections.Generic;
using System.Collections.Concurrent;
using OpenMetaverse;
namespace OpenSim.Framework
@ -41,26 +42,18 @@ namespace OpenSim.Framework
/// <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>();
private ConcurrentDictionary<uint, AgentCircuitData> m_agentCircuits = new ConcurrentDictionary<uint, AgentCircuitData>();
/// <summary>
/// Agent circuits indexed by agent UUID.
/// </summary>
private Dictionary<UUID, AgentCircuitData> m_agentCircuitsByUUID = new Dictionary<UUID, AgentCircuitData>();
private ConcurrentDictionary<UUID, AgentCircuitData> m_agentCircuitsByUUID = new ConcurrentDictionary<UUID, AgentCircuitData>();
public virtual AuthenticateResponse AuthenticateSession(UUID sessionID, UUID agentID, uint circuitcode)
{
AgentCircuitData validcircuit = null;
lock (m_agentCircuits)
{
if (m_agentCircuits.ContainsKey(circuitcode))
validcircuit = m_agentCircuits[circuitcode];
}
AuthenticateResponse user = new AuthenticateResponse();
if (validcircuit == null)
if (!m_agentCircuits.TryGetValue(circuitcode, out AgentCircuitData validcircuit) || validcircuit == null)
{
//don't have this circuit code in our list
user.Authorised = false;
@ -79,13 +72,13 @@ namespace OpenSim.Framework
user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder;
user.LoginInfo.BaseFolder = validcircuit.BaseFolder;
user.LoginInfo.StartPos = validcircuit.startpos;
user.LoginInfo.StartFar = (float)validcircuit.startfar;
}
else
{
// Invalid
user.Authorised = false;
}
return user;
}
@ -96,65 +89,39 @@ namespace OpenSim.Framework
/// <param name="agentData"></param>
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
{
lock (m_agentCircuits)
{
if (m_agentCircuits.ContainsKey(circuitCode))
{
m_agentCircuits[circuitCode] = agentData;
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
}
else
{
m_agentCircuits.Add(circuitCode, agentData);
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
}
}
RemoveCircuit(agentData.AgentID); // no duplications
m_agentCircuits[circuitCode] = agentData;
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
}
public virtual void RemoveCircuit(uint circuitCode)
{
lock (m_agentCircuits)
if (m_agentCircuits.TryRemove(circuitCode, out AgentCircuitData ac))
{
if (m_agentCircuits.ContainsKey(circuitCode))
{
UUID agentID = m_agentCircuits[circuitCode].AgentID;
m_agentCircuits.Remove(circuitCode);
m_agentCircuitsByUUID.Remove(agentID);
}
m_agentCircuitsByUUID.TryRemove(ac.AgentID, out AgentCircuitData dummy);
}
}
public virtual void RemoveCircuit(UUID agentID)
{
lock (m_agentCircuits)
if (m_agentCircuitsByUUID.TryRemove(agentID, out AgentCircuitData ac))
{
if (m_agentCircuitsByUUID.ContainsKey(agentID))
{
uint circuitCode = m_agentCircuitsByUUID[agentID].circuitcode;
m_agentCircuits.Remove(circuitCode);
m_agentCircuitsByUUID.Remove(agentID);
}
m_agentCircuits.TryRemove(ac.circuitcode, out AgentCircuitData dummy);
}
}
public AgentCircuitData GetAgentCircuitData(uint circuitCode)
{
AgentCircuitData agentCircuit = null;
lock (m_agentCircuits)
m_agentCircuits.TryGetValue(circuitCode, out agentCircuit);
return agentCircuit;
if(m_agentCircuits.TryGetValue(circuitCode, out AgentCircuitData agentCircuit))
return agentCircuit;
return null;
}
public AgentCircuitData GetAgentCircuitData(UUID agentID)
{
AgentCircuitData agentCircuit = null;
lock (m_agentCircuits)
m_agentCircuitsByUUID.TryGetValue(agentID, out agentCircuit);
return agentCircuit;
if(m_agentCircuitsByUUID.TryGetValue(agentID, out AgentCircuitData agentCircuit))
return agentCircuit;
return null;
}
/// <summary>
@ -169,20 +136,16 @@ namespace OpenSim.Framework
public void UpdateAgentData(AgentCircuitData agentData)
{
lock (m_agentCircuits)
if (m_agentCircuits.TryGetValue(agentData.circuitcode, out AgentCircuitData ac))
{
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;
ac.firstname = agentData.firstname;
ac.lastname = agentData.lastname;
ac.startpos = agentData.startpos;
ac.startfar = agentData.startfar;
// 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);
}
// Updated for when we don't know them before calling Scene.NewUserConnection
ac.SecureSessionID = agentData.SecureSessionID;
ac.SessionID = agentData.SessionID;
}
}
@ -191,38 +154,30 @@ namespace OpenSim.Framework
/// </summary>
/// <param name="circuitcode"></param>
/// <param name="newcircuitcode"></param>
public bool TryChangeCiruitCode(uint circuitcode, uint newcircuitcode)
public bool TryChangeCircuitCode(uint circuitcode, uint newcircuitcode)
{
lock (m_agentCircuits)
if(m_agentCircuits.ContainsKey(newcircuitcode))
return false;
if (m_agentCircuits.TryRemove(circuitcode, out AgentCircuitData agentData))
{
if (m_agentCircuits.ContainsKey((uint)circuitcode) && !m_agentCircuits.ContainsKey((uint)newcircuitcode))
{
AgentCircuitData agentData = m_agentCircuits[(uint)circuitcode];
agentData.circuitcode = newcircuitcode;
m_agentCircuits.Remove((uint)circuitcode);
m_agentCircuits.Add(newcircuitcode, agentData);
return true;
}
agentData.circuitcode = newcircuitcode;
m_agentCircuits.TryAdd(newcircuitcode, agentData);
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
return true;
}
return false;
}
public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
{
lock (m_agentCircuits)
if (m_agentCircuits.ContainsKey(circuitcode))
m_agentCircuits[circuitcode].child = childstatus;
if (m_agentCircuits.TryGetValue(circuitcode, out AgentCircuitData ac))
ac.child = childstatus;
}
public bool GetAgentChildStatus(uint circuitcode)
{
lock (m_agentCircuits)
if (m_agentCircuits.ContainsKey(circuitcode))
return m_agentCircuits[circuitcode].child;
if (m_agentCircuits.TryGetValue(circuitcode, out AgentCircuitData ac))
return ac.child;
return false;
}
}

View File

@ -83,6 +83,7 @@ namespace OpenSim.Framework
public bool UseClientAgentPosition;
public bool NeedsCameraCollision;
public uint lastpacketSequence;
public double lastUpdateTS;
public AgentUpdateArgs()
{

View File

@ -112,12 +112,13 @@ namespace OpenSim.Framework
/// <param name="args"></param>
public void UnpackUpdateMessage(OSDMap args)
{
if (args["animation"] != null)
animID = args["animation"].AsUUID();
if (args["object_id"] != null)
objectID = args["object_id"].AsUUID();
if (args["seq_num"] != null)
sequenceNum = args["seq_num"].AsInteger();
OSD tmp;
if (args.TryGetValue("animation", out tmp))
animID = tmp.AsUUID();
if (args.TryGetValue("object_id", out tmp))
objectID = tmp.AsUUID();
if (args.TryGetValue("seq_num", out tmp))
sequenceNum = tmp.AsInteger();
}
public override bool Equals(object obj)

View File

@ -34,12 +34,13 @@ using OpenMetaverse;
namespace OpenSim.Framework
{
[Flags]
// this enum is stuck, can not be changed or will break compatibilty with any version older than that change
public enum AssetFlags : int
{
Normal = 0, // Immutable asset
Maptile = 1, // What it says
Rewritable = 2, // Content can be rewritten
Collectable = 4 // Can be GC'ed after some time
Collectable = 4, // Can be GC'ed after some time
}
/// <summary>

View File

@ -42,11 +42,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
public class AssetLoaderFileSystem : IAssetLoader
{
private static readonly UUID LIBRARY_OWNER_ID = new UUID("11111111-1111-0000-0000-000100bba000");
private static readonly string LIBRARY_OWNER_IDstr = "11111111-1111-0000-0000-000100bba000";
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected static AssetBase CreateAsset(string assetIdStr, string name, string path, sbyte type)
{
AssetBase asset = new AssetBase(new UUID(assetIdStr), name, type, LIBRARY_OWNER_ID.ToString());
AssetBase asset = new AssetBase(new UUID(assetIdStr), name, type, LIBRARY_OWNER_IDstr);
if (!String.IsNullOrEmpty(path))
{

View File

@ -51,27 +51,28 @@ namespace OpenSim.Framework
// this is viewer capabilities and weared things dependent
// should be only used as initial default value ( V1 viewers )
public readonly static int VISUALPARAM_COUNT = 218;
public const int VISUALPARAM_COUNT = 218;
// public readonly static int TEXTURE_COUNT = 21
// 21 bad, make it be updated as libovm gets update
// also keeping in sync with it
public readonly static int TEXTURE_COUNT = Primitive.TextureEntry.MAX_FACES;
// regions and viewer compatibility
public readonly static int TEXTURE_COUNT = 45;
public const int TEXTURE_COUNT_PV7 = 29;
public const int BAKES_COUNT_PV7 = 6;
public const int MAXWEARABLE_PV7 = 16;
public const int MAXWEARABLE_LEGACY = 15;
public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20, 40, 41, 42, 43, 44 };
protected int m_serial = 0;
protected byte[] m_visualparams;
protected Primitive.TextureEntry m_texture;
protected AvatarWearable[] m_wearables;
protected Dictionary<int, List<AvatarAttachment>> m_attachments;
protected float m_avatarHeight = 0;
protected WearableCacheItem[] m_cacheitems;
protected Vector3 m_avatarSize = new Vector3(0.45f, 0.6f, 1.9f); // sl Z cloud value
protected Vector3 m_avatarBoxSize = new Vector3(0.45f, 0.6f, 1.9f);
protected float m_avatarHeight = 0;
protected float m_avatarFeetOffset = 0;
protected float m_avatarAnimOffset = 0;
protected WearableCacheItem[] m_cacheitems;
protected bool m_cacheItemsDirty = true;
public virtual int Serial
{
@ -128,11 +129,7 @@ namespace OpenSim.Framework
set { m_cacheitems = value; }
}
public virtual bool WearableCacheItemsDirty
{
get { return m_cacheItemsDirty; }
set { m_cacheItemsDirty = value; }
}
public virtual float AvatarPreferencesHoverZ { get; set; }
public AvatarAppearance()
{
@ -204,12 +201,14 @@ namespace OpenSim.Framework
SetDefaultParams();
// SetHeight();
SetSize(new Vector3(0.45f, 0.6f, 1.9f));
AvatarPreferencesHoverZ = 0;
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
return;
}
m_serial = appearance.Serial;
AvatarPreferencesHoverZ = appearance.AvatarPreferencesHoverZ;
if (copyWearables && (appearance.Wearables != null))
{
@ -228,7 +227,7 @@ namespace OpenSim.Framework
m_texture = null;
if (appearance.Texture != null)
{
byte[] tbytes = appearance.Texture.GetBytes();
byte[] tbytes = appearance.Texture.GetBakesBytes();
m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
if (copyBaked && appearance.m_cacheitems != null)
m_cacheitems = (WearableCacheItem[])appearance.m_cacheitems.Clone();
@ -295,6 +294,7 @@ namespace OpenSim.Framework
m_serial = 0;
SetDefaultTexture();
AvatarPreferencesHoverZ = 0;
//for (int i = 0; i < BAKE_INDICES.Length; i++)
// {
@ -330,9 +330,6 @@ namespace OpenSim.Framework
protected virtual void SetDefaultTexture()
{
m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
// for (uint i = 0; i < TEXTURE_COUNT; i++)
// m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
}
/// <summary>
@ -347,31 +344,31 @@ namespace OpenSim.Framework
if (textureEntry == null)
return false;
// There are much simpler versions of this copy that could be
// made. We determine if any of the textures actually
// changed to know if the appearance should be saved later
bool changed = false;
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
{
Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i];
Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i];
Primitive.TextureEntryFace newface;
Primitive.TextureEntryFace tmpFace;
if (newface == null)
//make sure textureEntry.DefaultTexture is the unused one(DEFAULT_AVATAR_TEXTURE).
Primitive.TextureEntry converted = new Primitive.TextureEntry(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
for (uint i = 0; i < TEXTURE_COUNT; ++i)
{
newface = textureEntry.GetFace(i);
if (newface.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE)
{
if (oldface == null)
continue;
tmpFace = converted.GetFace(i);
tmpFace.TextureID = newface.TextureID; // we need a full high level copy, assuming all other parameters are the same.
if (m_texture.FaceTextures[i] == null || newface.TextureID != m_texture.FaceTextures[i].TextureID)
changed = true;
}
else
{
if (oldface != null && oldface.TextureID == newface.TextureID)
{ if (m_texture.FaceTextures[i] == null)
continue;
if(m_texture.FaceTextures[i].TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE)
changed = true;
}
changed = true;
}
m_texture = textureEntry;
if(changed)
m_texture = converted;
return changed;
}
@ -736,42 +733,72 @@ namespace OpenSim.Framework
data["serial"] = OSD.FromInteger(m_serial);
data["height"] = OSD.FromReal(m_avatarHeight);
data["aphz"] = OSD.FromReal(AvatarPreferencesHoverZ);
if (m_texture == null)
return data;
bool sendPV8 = false;
// Wearables
//
// This will send as many or as few wearables as we have, unless a count
// is given. Used for legacy (pre 0.4) versions.
int count = ctx.WearablesCount;
if (ctx.WearablesCount == -1)
count = m_wearables.Length;
OSDArray wears = new OSDArray(count);
for (int i = 0; i < count; i++)
OSDArray wears;
int count;
if (ctx == null)
count = MAXWEARABLE_LEGACY;
else
{
AvatarWearable dummyWearable = new AvatarWearable();
if (i < m_wearables.Length)
wears.Add(m_wearables[i].Pack());
if(ctx.OutboundVersion >= 0.8)
{
sendPV8 = true;
count = m_wearables.Length;
}
else if (ctx.OutboundVersion >= 0.6)
count = MAXWEARABLE_PV7;
else
wears.Add(dummyWearable.Pack());
count = MAXWEARABLE_LEGACY;
if (sendPV8 && count > MAXWEARABLE_PV7)
{
wears = new OSDArray(count - MAXWEARABLE_PV7);
for (int i = MAXWEARABLE_PV7; i < count; ++i)
wears.Add(m_wearables[i].Pack());
data["wrbls8"] = wears;
count = MAXWEARABLE_PV7;
}
}
if(count > m_wearables.Length)
count = m_wearables.Length;
wears = new OSDArray(count);
for (int i = 0; i < count; ++i)
wears.Add(m_wearables[i].Pack());
data["wearables"] = wears;
// Avatar Textures
OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT);
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
OSDArray textures;
if (sendPV8)
{
if (m_texture.FaceTextures[i] != null)
textures.Add(OSD.FromUUID(m_texture.FaceTextures[i].TextureID));
else
textures.Add(OSD.FromUUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
byte[] te = m_texture.GetBakesBytes();
data["te8"] = OSD.FromBinary(te);
}
else
{
textures = new OSDArray(TEXTURE_COUNT_PV7);
for (uint i = 0; i < TEXTURE_COUNT_PV7; ++i)
textures.Add(OSD.FromUUID(m_texture.GetFace(i).TextureID));
data["textures"] = textures;
}
data["textures"] = textures;
if (m_cacheitems != null)
{
OSDArray baked = WearableCacheItem.BakedToOSD(m_cacheitems);
if (baked != null)
OSDArray baked = WearableCacheItem.BakedToOSD(m_cacheitems, 0, BAKES_COUNT_PV7);
if (baked != null && baked.Count > 0)
data["bakedcache"] = baked;
baked = WearableCacheItem.BakedToOSD(m_cacheitems, BAKES_COUNT_PV7, -1);
if (baked != null && baked.Count > 0)
data["bc8"] = baked;
}
// Visual Parameters
@ -790,68 +817,178 @@ namespace OpenSim.Framework
return data;
}
public OSDMap PackForNotecard(bool NoHuds = true)
{
OSDMap data = new OSDMap();
data["serial"] = OSD.FromInteger(m_serial);
data["height"] = OSD.FromReal(m_avatarHeight);
data["aphz"] = OSD.FromReal(AvatarPreferencesHoverZ);
// old regions may not like missing/empty wears
OSDArray wears = new OSDArray(MAXWEARABLE_LEGACY);
for (int i = 0; i< MAXWEARABLE_LEGACY; ++i)
wears.Add(new OSDArray());
data["wearables"] = wears;
// Avatar Textures
OSDArray textures;
// allow old regions to still see something
textures = new OSDArray(TEXTURE_COUNT_PV7);
textures.Add(OSD.FromUUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
for (uint i = 1; i < TEXTURE_COUNT_PV7; ++i)
textures.Add(OSD.FromUUID(m_texture.GetFace(i).TextureID));
data["textures"] = textures;
bool needExtra = false;
for (int i = BAKES_COUNT_PV7; i < BAKE_INDICES.Length; ++i)
{
int idx = BAKE_INDICES[i];
if (m_texture.FaceTextures[idx] == null)
continue;
if (m_texture.FaceTextures[idx].TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE ||
m_texture.FaceTextures[idx].TextureID == UUID.Zero)
continue;
needExtra = true;
}
if (needExtra)
{
byte[] te = m_texture.GetBakesBytes();
data["te8"] = OSD.FromBinary(te);
}
// Visual Parameters
OSDBinary visualparams = new OSDBinary(m_visualparams);
data["visualparams"] = visualparams;
lock (m_attachments)
{
// Attachments
OSDArray attachs = new OSDArray(m_attachments.Count);
foreach (AvatarAttachment attach in GetAttachments())
{
if (NoHuds &&
attach.AttachPoint >= (uint)AttachmentPoint.HUDCenter2 &&
attach.AttachPoint <= (uint)AttachmentPoint.HUDBottomRight)
continue;
attachs.Add(attach.Pack());
}
data["attachments"] = attachs;
}
return data;
}
/// <summary>
/// Unpack and OSDMap and initialize the appearance
/// from it
/// </summary>
public void Unpack(OSDMap data)
{
if ((data != null) && (data["serial"] != null))
m_serial = data["serial"].AsInteger();
if ((data != null) && (data["height"] != null))
// m_avatarHeight = (float)data["height"].AsReal();
SetSize(new Vector3(0.45f,0.6f, (float)data["height"].AsReal()));
SetDefaultWearables();
SetDefaultTexture();
SetDefaultParams();
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
if(data == null)
{
m_log.Warn("[AVATAR APPEARANCE]: data to unpack is null");
return;
}
OSD tmpOSD;
if (data.TryGetValue("serial", out tmpOSD))
m_serial = tmpOSD.AsInteger();
if(data.TryGetValue("aphz", out tmpOSD))
AvatarPreferencesHoverZ = (float)tmpOSD.AsReal();
if (data.TryGetValue("height", out tmpOSD))
SetSize(new Vector3(0.45f, 0.6f, (float)tmpOSD.AsReal()));
try
{
// Wearables
SetDefaultWearables();
if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
OSD tmpOSD8;
OSDArray wears8 = null;
int wears8Count = 0;
if (data.TryGetValue("wrbls8", out tmpOSD8) && (tmpOSD8 is OSDArray))
{
OSDArray wears = (OSDArray)(data["wearables"]);
int count = wears.Count;
m_wearables = new AvatarWearable[count];
for (int i = 0; i < count; i++)
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
}
else
{
m_log.Warn("[AVATAR APPEARANCE]: failed to unpack wearables");
wears8 = (OSDArray)tmpOSD8;
wears8Count = wears8.Count;
}
// Avatar Textures
SetDefaultTexture();
if ((data != null) && (data["textures"] != null) && (data["textures"]).Type == OSDType.Array)
if (data.TryGetValue("wearables", out tmpOSD) && (tmpOSD is OSDArray))
{
OSDArray textures = (OSDArray)(data["textures"]);
for (int i = 0; i < AvatarAppearance.TEXTURE_COUNT && i < textures.Count; i++)
OSDArray wears = (OSDArray)tmpOSD;
if(wears.Count + wears8Count > 0)
{
UUID textureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE;
if (textures[i] != null)
textureID = textures[i].AsUUID();
m_texture.CreateFace((uint)i).TextureID = new UUID(textureID);
m_wearables = new AvatarWearable[wears.Count + wears8Count];
for (int i = 0; i < wears.Count; ++i)
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
if (wears8Count > 0)
{
for (int i = 0; i < wears8Count; ++i)
m_wearables[i + wears.Count] = new AvatarWearable((OSDArray)wears8[i]);
}
}
}
else
if (data.TryGetValue("te8", out tmpOSD))
{
m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures");
byte[] teb = tmpOSD.AsBinary();
Primitive.TextureEntry te = new Primitive.TextureEntry(teb, 0, teb.Length);
m_texture = te;
}
else if (data.TryGetValue("textures", out tmpOSD) && (tmpOSD is OSDArray))
{
OSDArray textures = (OSDArray)tmpOSD;
for (int i = 0; i < textures.Count && i < TEXTURE_COUNT_PV7; ++i)
{
tmpOSD = textures[i];
if (tmpOSD != null)
m_texture.CreateFace((uint)i).TextureID = tmpOSD.AsUUID();
}
}
if ((data != null) && (data["bakedcache"] != null) && (data["bakedcache"]).Type == OSDType.Array)
if (data.TryGetValue("bakedcache", out tmpOSD) && (tmpOSD is OSDArray))
{
OSDArray bakedOSDArray = (OSDArray)(data["bakedcache"]);
m_cacheitems = WearableCacheItem.BakedFromOSD(bakedOSDArray);
OSDArray bakedOSDArray = (OSDArray)tmpOSD;
m_cacheitems = WearableCacheItem.GetDefaultCacheItem();
bakedOSDArray = (OSDArray)tmpOSD;
foreach (OSDMap item in bakedOSDArray)
{
int idx = item["textureindex"].AsInteger();
if (idx < 0 || idx >= m_cacheitems.Length)
continue;
m_cacheitems[idx].CacheId = item["cacheid"].AsUUID();
m_cacheitems[idx].TextureID = item["textureid"].AsUUID();
m_cacheitems[idx].TextureAsset = null;
}
if (data.TryGetValue("bc8", out tmpOSD) && (tmpOSD is OSDArray))
{
bakedOSDArray = (OSDArray)tmpOSD;
foreach (OSDMap item in bakedOSDArray)
{
int idx = item["textureindex"].AsInteger();
if (idx < 0 || idx >= m_cacheitems.Length)
continue;
m_cacheitems[idx].CacheId = item["cacheid"].AsUUID();
m_cacheitems[idx].TextureID = item["textureid"].AsUUID();
m_cacheitems[idx].TextureAsset = null;
}
}
}
// Visual Parameters
SetDefaultParams();
if ((data != null) && (data["visualparams"] != null))
if (data.TryGetValue("visualparams", out tmpOSD))
{
if ((data["visualparams"].Type == OSDType.Binary) || (data["visualparams"].Type == OSDType.Array))
m_visualparams = data["visualparams"].AsBinary();
if (tmpOSD is OSDBinary || tmpOSD is OSDArray)
m_visualparams = tmpOSD.AsBinary();
}
else
{
@ -859,10 +996,9 @@ namespace OpenSim.Framework
}
// Attachments
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
if ((data != null) && (data["attachments"] != null) && (data["attachments"]).Type == OSDType.Array)
if (data.TryGetValue("attachments", out tmpOSD) && tmpOSD is OSDArray)
{
OSDArray attachs = (OSDArray)(data["attachments"]);
OSDArray attachs = (OSDArray)tmpOSD;
for (int i = 0; i < attachs.Count; i++)
{
AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]);
@ -882,6 +1018,32 @@ namespace OpenSim.Framework
#endregion
public bool CanTeleport(float version)
{
if (version >= 0.8)
return true;
if (m_wearables.Length <= MAXWEARABLE_PV7)
return true;
for(int i = MAXWEARABLE_PV7; i < m_wearables.Length; ++i)
{
if(m_wearables[i].Count > 0)
return false;
}
// also check baked
for (int i = BAKES_COUNT_PV7; i < BAKE_INDICES.Length; i++)
{
int idx = BAKE_INDICES[i];
if (m_texture.FaceTextures[idx] == null)
continue;
if (m_texture.FaceTextures[idx].TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE ||
m_texture.FaceTextures[idx].TextureID == UUID.Zero)
continue;
return false;
}
return true;
}
#region VPElement
/// <summary>

View File

@ -68,11 +68,18 @@ namespace OpenSim.Framework
public void Unpack(OSDMap args)
{
if (args["point"] != null)
AttachPoint = args["point"].AsInteger();
OSD tmpOSD;
if (args.TryGetValue("point", out tmpOSD))
AttachPoint = tmpOSD.AsInteger();
if (args.TryGetValue("item", out tmpOSD))
ItemID = tmpOSD.AsUUID();
else
ItemID = UUID.Zero;
ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero;
AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero;
if (args.TryGetValue("asset", out tmpOSD))
AssetID = tmpOSD.AsUUID();
else
AssetID = UUID.Zero;
}
}
}

View File

@ -67,10 +67,14 @@ namespace OpenSim.Framework
public static readonly int ALPHA = 13;
public static readonly int TATTOO = 14;
public static readonly int LEGACY_VERSION_MAX_WEARABLES = 15;
// public static readonly int PHYSICS = 15;
// public static int MAX_WEARABLES = 16;
public static readonly int PHYSICS = 15;
public static int MAX_WEARABLES_PV7 = 16;
public static readonly int UNIVERSAL = 16;
public static int MAX_WEARABLES = 17;
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
@ -91,11 +95,11 @@ namespace OpenSim.Framework
public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
// public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
// public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
protected List<UUID> m_ids = new List<UUID>();
@ -132,10 +136,12 @@ namespace OpenSim.Framework
public void Unpack(OSDArray args)
{
Clear();
OSD tmpOSDA, tmpOSDB;
foreach (OSDMap weardata in args)
{
Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID());
tmpOSDA = weardata["item"];
tmpOSDB = weardata["asset"];
Add(tmpOSDA.AsUUID(), tmpOSDB.AsUUID());
}
}

View File

@ -1,148 +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.Collections.Generic;
using System.Threading;
namespace OpenSim.Framework
{
public class BlockingQueue<T>
{
private readonly Queue<T> m_pqueue = new Queue<T>();
private readonly Queue<T> m_queue = new Queue<T>();
private readonly object m_queueSync = new object();
public void PriorityEnqueue(T value)
{
lock (m_queueSync)
{
m_pqueue.Enqueue(value);
Monitor.Pulse(m_queueSync);
}
}
public void Enqueue(T value)
{
lock (m_queueSync)
{
m_queue.Enqueue(value);
Monitor.Pulse(m_queueSync);
}
}
public T Dequeue()
{
lock (m_queueSync)
{
while (m_queue.Count < 1 && m_pqueue.Count < 1)
{
Monitor.Wait(m_queueSync);
}
if (m_pqueue.Count > 0)
return m_pqueue.Dequeue();
if (m_queue.Count > 0)
return m_queue.Dequeue();
return default(T);
}
}
public T Dequeue(int msTimeout)
{
lock (m_queueSync)
{
if (m_queue.Count < 1 && m_pqueue.Count < 1)
{
if(!Monitor.Wait(m_queueSync, msTimeout))
return default(T);
}
if (m_pqueue.Count > 0)
return m_pqueue.Dequeue();
if (m_queue.Count > 0)
return m_queue.Dequeue();
return default(T);
}
}
/// <summary>
/// Indicate whether this queue contains the given item.
/// </summary>
/// <remarks>
/// This method is not thread-safe. Do not rely on the result without consistent external locking.
/// </remarks>
public bool Contains(T item)
{
lock (m_queueSync)
{
if (m_queue.Count < 1 && m_pqueue.Count < 1)
return false;
if (m_pqueue.Contains(item))
return true;
return m_queue.Contains(item);
}
}
/// <summary>
/// Return a count of the number of requests on this queue.
/// </summary>
public int Count()
{
lock (m_queueSync)
return m_queue.Count + m_pqueue.Count;
}
/// <summary>
/// Return the array of items on this queue.
/// </summary>
/// <remarks>
/// This method is not thread-safe. Do not rely on the result without consistent external locking.
/// </remarks>
public T[] GetQueueArray()
{
lock (m_queueSync)
{
if (m_queue.Count < 1 && m_pqueue.Count < 1)
return new T[0];
return m_queue.ToArray();
}
}
public void Clear()
{
lock (m_queueSync)
{
m_pqueue.Clear();
m_queue.Clear();
Monitor.Pulse(m_queueSync);
}
}
}
}

View File

@ -38,6 +38,7 @@ namespace OpenSim.Framework
DebugChannel = 6,
Region = 7,
Owner = 8,
Direct = 9, //llRegionSayTo
Broadcast = 0xFF
}
}

View File

@ -398,7 +398,8 @@ namespace OpenSim.Framework
// Scripted
public ControllerData[] Controllers;
public string CallbackURI;
public string CallbackURI; // to remove
public string NewCallbackURI;
// These two must have the same Count
public List<ISceneObject> AttachmentObjects;
@ -528,6 +529,9 @@ namespace OpenSim.Framework
if ((CallbackURI != null) && (!CallbackURI.Equals("")))
args["callback_uri"] = OSD.FromString(CallbackURI);
if ((NewCallbackURI != null) && (!NewCallbackURI.Equals("")))
args["cb_uri"] = OSD.FromString(NewCallbackURI);
// Attachment objects for fatpack messages
if (AttachmentObjects != null)
{
@ -567,145 +571,141 @@ namespace OpenSim.Framework
public virtual void Unpack(OSDMap args, IScene scene, EntityTransferContext ctx)
{
//m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
OSD tmp;
if (args.TryGetValue("region_id", out tmp) && tmp != null)
UUID.TryParse(tmp.AsString(), out RegionID);
if (args.ContainsKey("region_id"))
UUID.TryParse(args["region_id"].AsString(), out RegionID);
if (args.TryGetValue("circuit_code", out tmp) && tmp != null)
UInt32.TryParse(tmp.AsString(), out CircuitCode);
if (args["circuit_code"] != null)
UInt32.TryParse((string)args["circuit_code"].AsString(), out CircuitCode);
if (args.TryGetValue("agent_uuid", out tmp) && tmp != null)
AgentID = tmp.AsUUID();
if (args["agent_uuid"] != null)
AgentID = args["agent_uuid"].AsUUID();
if (args.TryGetValue("session_uuid", out tmp) && tmp != null)
SessionID = tmp.AsUUID();
if (args["session_uuid"] != null)
SessionID = args["session_uuid"].AsUUID();
if (args.TryGetValue("position", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out Position);
if (args["position"] != null)
Vector3.TryParse(args["position"].AsString(), out Position);
if (args.TryGetValue("velocity", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out Velocity);
if (args["velocity"] != null)
Vector3.TryParse(args["velocity"].AsString(), out Velocity);
if (args.TryGetValue("center", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out Center);
if (args["center"] != null)
Vector3.TryParse(args["center"].AsString(), out Center);
if (args.TryGetValue("size", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out Size);
if (args["size"] != null)
Vector3.TryParse(args["size"].AsString(), out Size);
if (args.TryGetValue("at_axis", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out AtAxis);
if (args["at_axis"] != null)
Vector3.TryParse(args["at_axis"].AsString(), out AtAxis);
if (args.TryGetValue("left_axis", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out AtAxis);
if (args["left_axis"] != null)
Vector3.TryParse(args["left_axis"].AsString(), out AtAxis);
if (args.TryGetValue("up_axis", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out AtAxis);
if (args["up_axis"] != null)
Vector3.TryParse(args["up_axis"].AsString(), out AtAxis);
if (args.TryGetValue("wait_for_root", out tmp) && tmp != null)
SenderWantsToWaitForRoot = tmp.AsBoolean();
if (args.ContainsKey("wait_for_root") && args["wait_for_root"] != null)
SenderWantsToWaitForRoot = args["wait_for_root"].AsBoolean();
if (args.TryGetValue("far", out tmp) && tmp != null)
Far = (float)(tmp.AsReal());
if (args["far"] != null)
Far = (float)(args["far"].AsReal());
if (args.TryGetValue("aspect", out tmp) && tmp != null)
Aspect = (float)tmp.AsReal();
if (args["aspect"] != null)
Aspect = (float)args["aspect"].AsReal();
if (args.TryGetValue("throttles", out tmp) && tmp != null)
Throttles = tmp.AsBinary();
if (args["throttles"] != null)
Throttles = args["throttles"].AsBinary();
if (args.TryGetValue("locomotion_state", out tmp) && tmp != null)
UInt32.TryParse(tmp.AsString(), out LocomotionState);
if (args["locomotion_state"] != null)
UInt32.TryParse(args["locomotion_state"].AsString(), out LocomotionState);
if (args.TryGetValue("head_rotation", out tmp) && tmp != null)
Quaternion.TryParse(tmp.AsString(), out HeadRotation);
if (args["head_rotation"] != null)
Quaternion.TryParse(args["head_rotation"].AsString(), out HeadRotation);
if (args.TryGetValue("body_rotation", out tmp) && tmp != null)
Quaternion.TryParse(tmp.AsString(), out BodyRotation);
if (args["body_rotation"] != null)
Quaternion.TryParse(args["body_rotation"].AsString(), out BodyRotation);
if (args.TryGetValue("control_flags", out tmp) && tmp != null)
UInt32.TryParse(tmp.AsString(), out ControlFlags);
if (args["control_flags"] != null)
UInt32.TryParse(args["control_flags"].AsString(), out ControlFlags);
if (args.TryGetValue("energy_level", out tmp) && tmp != null)
EnergyLevel = (float)(tmp.AsReal());
if (args["energy_level"] != null)
EnergyLevel = (float)(args["energy_level"].AsReal());
if (args.TryGetValue("god_data", out tmp) && tmp != null)
GodData = tmp;
//if (args["god_level"] != null)
// Byte.TryParse(args["god_level"].AsString(), out GodLevel);
if (args.TryGetValue("always_run", out tmp) && tmp != null)
AlwaysRun = tmp.AsBoolean();
if (args.ContainsKey("god_data") && args["god_data"] != null)
GodData = args["god_data"];
if (args.TryGetValue("prey_agent", out tmp) && tmp != null)
PreyAgent = tmp.AsUUID();
if (args["always_run"] != null)
AlwaysRun = args["always_run"].AsBoolean();
if (args.TryGetValue("agent_access", out tmp) && tmp != null)
Byte.TryParse(tmp.AsString(), out AgentAccess);
if (args["prey_agent"] != null)
PreyAgent = args["prey_agent"].AsUUID();
if (args.TryGetValue("agent_cof", out tmp) && tmp != null)
agentCOF = tmp.AsUUID();
if (args["agent_access"] != null)
Byte.TryParse(args["agent_access"].AsString(), out AgentAccess);
if (args.ContainsKey("agent_cof") && args["agent_cof"] != null)
agentCOF = args["agent_cof"].AsUUID();
if (args.ContainsKey("crossingflags") && args["crossingflags"] != null)
CrossingFlags = (byte)args["crossingflags"].AsInteger();
if (args.TryGetValue("crossingflags", out tmp) && tmp != null)
CrossingFlags = (byte)tmp.AsInteger();
if(CrossingFlags != 0)
{
if (args.ContainsKey("crossExtraFlags") && args["crossExtraFlags"] != null)
CrossExtraFlags = (byte)args["crossExtraFlags"].AsInteger();
if (args.TryGetValue("crossExtraFlags", out tmp) && tmp != null)
CrossExtraFlags = (byte)tmp.AsInteger();
}
if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
ActiveGroupID = args["active_group_id"].AsUUID();
if (args.TryGetValue("active_group_id", out tmp) && tmp != null)
ActiveGroupID = tmp.AsUUID();
if (args.ContainsKey("active_group_name") && args["active_group_name"] != null)
ActiveGroupName = args["active_group_name"].AsString();
if (args.TryGetValue("active_group_name", out tmp) && tmp != null)
ActiveGroupName = tmp.AsString();
if(args.ContainsKey("active_group_title") && args["active_group_title"] != null)
ActiveGroupTitle = args["active_group_title"].AsString();
if(args.TryGetValue("active_group_title", out tmp) && tmp != null)
ActiveGroupTitle = tmp.AsString();
if (args.ContainsKey("children_seeds") && (args["children_seeds"] != null) &&
(args["children_seeds"].Type == OSDType.Array))
if (args.TryGetValue("children_seeds", out tmp) && tmp is OSDArray)
{
OSDArray childrenSeeds = (OSDArray)(args["children_seeds"]);
OSDArray childrenSeeds = (OSDArray)tmp;
ChildrenCapSeeds = new Dictionary<ulong, string>();
foreach (OSD o in childrenSeeds)
{
if (o.Type == OSDType.Map)
if (o is OSDMap)
{
ulong handle = 0;
string seed = "";
OSDMap pair = (OSDMap)o;
if (pair["handle"] != null)
if (!UInt64.TryParse(pair["handle"].AsString(), out handle))
if (pair.TryGetValue("handle", out tmp))
if (!UInt64.TryParse(tmp.AsString(), out handle))
continue;
if (pair["seed"] != null)
seed = pair["seed"].AsString();
if (pair.TryGetValue("seed", out tmp))
seed = tmp.AsString();
if (!ChildrenCapSeeds.ContainsKey(handle))
ChildrenCapSeeds.Add(handle, seed);
}
}
}
if ((args["animations"] != null) && (args["animations"]).Type == OSDType.Array)
if (args.TryGetValue("animations", out tmp) && tmp is OSDArray)
{
OSDArray anims = (OSDArray)(args["animations"]);
OSDArray anims = (OSDArray)tmp;
Anims = new Animation[anims.Count];
int i = 0;
foreach (OSD o in anims)
{
if (o.Type == OSDType.Map)
if (o is OSDMap)
{
Anims[i++] = new Animation((OSDMap)o);
}
}
}
if (args["default_animation"] != null)
if (args.TryGetValue("default_animation", out tmp) && tmp is OSDMap)
{
try
{
DefaultAnim = new Animation((OSDMap)args["default_animation"]);
DefaultAnim = new Animation((OSDMap)tmp);
}
catch
{
@ -713,11 +713,11 @@ namespace OpenSim.Framework
}
}
if (args["animation_state"] != null)
if (args.TryGetValue("animation_state", out tmp) && tmp is OSDMap)
{
try
{
AnimState = new Animation((OSDMap)args["animation_state"]);
AnimState = new Animation((OSDMap)tmp);
}
catch
{
@ -727,9 +727,9 @@ namespace OpenSim.Framework
MovementAnimationOverRides.Clear();
if (args["movementAO"] != null && args["movementAO"].Type == OSDType.Array)
if (args.TryGetValue("movementAO", out tmp) && tmp is OSDArray)
{
OSDArray AOs = (OSDArray)(args["movementAO"]);
OSDArray AOs = (OSDArray)tmp;
int count = AOs.Count;
for (int i = 0; i < count; i++)
@ -744,8 +744,8 @@ namespace OpenSim.Framework
}
}
if (args.ContainsKey("motion_state"))
MotionState = (byte)args["motion_state"].AsInteger();
if (args.TryGetValue("motion_state", out tmp) && tmp != null)
MotionState = (byte)tmp.AsInteger();
//if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
//{
@ -758,10 +758,10 @@ namespace OpenSim.Framework
// packed_appearence should contain all appearance information
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
if (args.TryGetValue("packed_appearance", out tmp) && tmp is OSDMap)
{
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] got packed appearance");
Appearance = new AvatarAppearance((OSDMap)args["packed_appearance"]);
Appearance = new AvatarAppearance((OSDMap)tmp);
}
else
{
@ -773,19 +773,19 @@ namespace OpenSim.Framework
// The code to unpack textures, visuals, wearables and attachments
// should be removed; packed appearance contains the full appearance
// This is retained for backward compatibility only
if (args["texture_entry"] != null)
if (args.TryGetValue("texture_entry", out tmp) && tmp != null)
{
byte[] rawtextures = args["texture_entry"].AsBinary();
byte[] rawtextures = tmp.AsBinary();
Primitive.TextureEntry textures = new Primitive.TextureEntry(rawtextures, 0, rawtextures.Length);
Appearance.SetTextureEntries(textures);
}
if (args["visual_params"] != null)
Appearance.SetVisualParams(args["visual_params"].AsBinary());
if (args.TryGetValue("visual_params", out tmp) && tmp != null)
Appearance.SetVisualParams(tmp.AsBinary());
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
if (args.TryGetValue("wearables", out tmp) && tmp is OSDArray)
{
OSDArray wears = (OSDArray)(args["wearables"]);
OSDArray wears = (OSDArray)tmp;
for (int i = 0; i < wears.Count / 2; i++)
{
@ -794,12 +794,12 @@ namespace OpenSim.Framework
}
}
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
if (args.TryGetValue("attachments", out tmp) && tmp is OSDArray)
{
OSDArray attachs = (OSDArray)(args["attachments"]);
OSDArray attachs = (OSDArray)tmp;
foreach (OSD o in attachs)
{
if (o.Type == OSDType.Map)
if (o is OSDMap)
{
// We know all of these must end up as attachments so we
// append rather than replace to ensure multiple attachments
@ -811,38 +811,36 @@ namespace OpenSim.Framework
}
// end of code to remove
}
/* moved above
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
Appearance = new AvatarAppearance((OSDMap)args["packed_appearance"]);
else
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");
*/
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
if (args.TryGetValue("controllers", out tmp) && tmp is OSDArray)
{
OSDArray controls = (OSDArray)(args["controllers"]);
OSDArray controls = (OSDArray)tmp;
Controllers = new ControllerData[controls.Count];
int i = 0;
foreach (OSD o in controls)
{
if (o.Type == OSDType.Map)
if (o is OSDMap)
{
Controllers[i++] = new ControllerData((OSDMap)o);
}
}
}
if (args["callback_uri"] != null)
CallbackURI = args["callback_uri"].AsString();
if (args.TryGetValue("callback_uri", out tmp) && tmp != null)
CallbackURI = tmp.AsString();
if (args.TryGetValue("cb_uri", out tmp) && tmp != null)
NewCallbackURI = tmp.AsString();
// Attachment objects
if (args["attach_objects"] != null && args["attach_objects"].Type == OSDType.Array)
if (args.TryGetValue("attach_objects", out tmp) && tmp is OSDArray)
{
OSDArray attObjs = (OSDArray)(args["attach_objects"]);
OSDArray attObjs = (OSDArray)tmp;
AttachmentObjects = new List<ISceneObject>();
AttachmentObjectStates = new List<string>();
foreach (OSD o in attObjs)
{
if (o.Type == OSDType.Map)
if (o is OSDMap)
{
OSDMap info = (OSDMap)o;
ISceneObject so = scene.DeserializeObject(info["sog"].AsString());
@ -854,10 +852,10 @@ namespace OpenSim.Framework
}
}
if (args["parent_part"] != null)
ParentPart = args["parent_part"].AsUUID();
if (args["sit_offset"] != null)
Vector3.TryParse(args["sit_offset"].AsString(), out SitOffset);
if (args.TryGetValue("parent_part", out tmp) && tmp != null)
ParentPart = tmp.AsUUID();
if (args.TryGetValue("sit_offset", out tmp) && tmp != null)
Vector3.TryParse(tmp.AsString(), out SitOffset);
}
public AgentData()

View File

@ -51,7 +51,14 @@ namespace OpenSim.Framework
private object m_syncRoot = new object();
/// <summary>Number of clients in the collection</summary>
public int Count { get { return m_dict1.Count; } }
public int Count
{
get
{
lock (m_syncRoot)
return m_dict1.Count;
}
}
/// <summary>
/// Default constructor
@ -60,7 +67,7 @@ namespace OpenSim.Framework
{
m_dict1 = new Dictionary<UUID, IClientAPI>();
m_dict2 = new Dictionary<IPEndPoint, IClientAPI>();
m_array = new IClientAPI[0];
m_array = null;
}
/// <summary>
@ -74,17 +81,9 @@ namespace OpenSim.Framework
{
lock (m_syncRoot)
{
// allow self healing
// if (m_dict1.ContainsKey(value.AgentId) || m_dict2.ContainsKey(value.RemoteEndPoint))
// return false;
m_dict1[value.AgentId] = value;
m_dict2[value.RemoteEndPoint] = value;
// dict1 is the master
IClientAPI[] newArray = new IClientAPI[m_dict1.Count];
m_dict1.Values.CopyTo(newArray, 0);
m_array = newArray;
m_array = null;
}
return true;
@ -105,10 +104,7 @@ namespace OpenSim.Framework
{
m_dict1.Remove(key);
m_dict2.Remove(value.RemoteEndPoint);
IClientAPI[] newArray = new IClientAPI[m_dict1.Count];
m_dict1.Values.CopyTo(newArray, 0);
m_array = newArray;
m_array = null;
return true;
}
}
@ -124,7 +120,7 @@ namespace OpenSim.Framework
{
m_dict1.Clear();
m_dict2.Clear();
m_array = new IClientAPI[0];
m_array = null;
}
}
@ -135,7 +131,8 @@ namespace OpenSim.Framework
/// <returns>True if the UUID was found in the collection, otherwise false</returns>
public bool ContainsKey(UUID key)
{
return m_dict1.ContainsKey(key);
lock (m_syncRoot)
return m_dict1.ContainsKey(key);
}
/// <summary>
@ -145,7 +142,8 @@ namespace OpenSim.Framework
/// <returns>True if the endpoint was found in the collection, otherwise false</returns>
public bool ContainsKey(IPEndPoint key)
{
return m_dict2.ContainsKey(key);
lock (m_syncRoot)
return m_dict2.ContainsKey(key);
}
/// <summary>
@ -156,8 +154,12 @@ namespace OpenSim.Framework
/// <returns>True if the lookup succeeded, otherwise false</returns>
public bool TryGetValue(UUID key, out IClientAPI value)
{
try { return m_dict1.TryGetValue(key, out value); }
catch (Exception)
try
{
lock (m_syncRoot)
return m_dict1.TryGetValue(key, out value);
}
catch
{
value = null;
return false;
@ -172,8 +174,12 @@ namespace OpenSim.Framework
/// <returns>True if the lookup succeeded, otherwise false</returns>
public bool TryGetValue(IPEndPoint key, out IClientAPI value)
{
try { return m_dict2.TryGetValue(key, out value); }
catch (Exception)
try
{
lock (m_syncRoot)
return m_dict2.TryGetValue(key, out value);
}
catch
{
value = null;
return false;
@ -187,7 +193,20 @@ namespace OpenSim.Framework
/// <param name="action">Action to perform on each element</param>
public void ForEach(Action<IClientAPI> action)
{
IClientAPI[] localArray = m_array;
IClientAPI[] localArray;
lock (m_syncRoot)
{
if (m_array == null)
{
if (m_dict1.Count == 0)
return;
m_array = new IClientAPI[m_dict1.Count];
m_dict1.Values.CopyTo(m_array, 0);
}
localArray = m_array;
}
for (int i = 0; i < localArray.Length; i++)
action(localArray[i]);
}

4
OpenSim/Framework/ConfigurationMember.cs Normal file → Executable file
View File

@ -262,14 +262,14 @@ namespace OpenSim.Framework
if (configurationDescription.Trim() != String.Empty)
{
console_result =
MainConsole.Instance.CmdPrompt(
MainConsole.Instance.Prompt(
configurationDescription + ": " + configOption.configurationQuestion,
configOption.configurationDefault);
}
else
{
console_result =
MainConsole.Instance.CmdPrompt(configOption.configurationQuestion,
MainConsole.Instance.Prompt(configOption.configurationQuestion,
configOption.configurationDefault);
}
}

5
OpenSim/Framework/Console/CommandConsole.cs Normal file → Executable file
View File

@ -36,6 +36,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using log4net;
using OpenSim.Framework;
using Nini.Config;
namespace OpenSim.Framework.Console
{
@ -789,5 +790,9 @@ namespace OpenSim.Framework.Console
}
return cmdinput;
}
public virtual void ReadConfig(IConfigSource configSource)
{
}
}
}

View File

@ -35,13 +35,39 @@ using log4net;
namespace OpenSim.Framework.Console
{
public class ConsoleBase
public class ConsoleLevel
{
public string m_string;
ConsoleLevel(string v)
{
m_string = v;
}
static public implicit operator ConsoleLevel(string s)
{
return new ConsoleLevel(s);
}
public static string ToString(ConsoleLevel s)
{
return s.m_string;
}
public override string ToString()
{
return m_string;
}
}
public class ConsoleBase : IConsole
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected string prompt = "# ";
public object ConsoleScene { get; set; }
public IScene ConsoleScene { get; set; }
public string DefaultPrompt { get; set; }
@ -58,27 +84,47 @@ namespace OpenSim.Framework.Console
{
}
public virtual void Output(string text, string level)
public virtual void Output(string format)
{
Output(text);
System.Console.WriteLine(format);
}
public virtual void Output(string text)
public virtual void Output(string format, params object[] components)
{
string level = null;
if (components != null && components.Length > 0)
{
if (components[0] == null || components[0] is ConsoleLevel)
{
if (components[0] is ConsoleLevel)
level = ((ConsoleLevel)components[0]).ToString();
if (components.Length > 1)
{
object[] tmp = new object[components.Length - 1];
Array.Copy(components, 1, tmp, 0, components.Length - 1);
components = tmp;
}
else
components = null;
}
}
string text;
if (components == null || components.Length == 0)
text = format;
else
text = String.Format(format, components);
System.Console.WriteLine(text);
}
public virtual void OutputFormat(string format, params object[] components)
{
Output(string.Format(format, components));
}
public string CmdPrompt(string p)
public string Prompt(string p)
{
return ReadLine(String.Format("{0}: ", p), false, true);
}
public string CmdPrompt(string p, string def)
public string Prompt(string p, string def)
{
string ret = ReadLine(String.Format("{0} [{1}]: ", p, def), false, true);
if (ret == String.Empty)
@ -87,14 +133,14 @@ namespace OpenSim.Framework.Console
return ret;
}
public string CmdPrompt(string p, List<char> excludedCharacters)
public string Prompt(string p, List<char> excludedCharacters)
{
bool itisdone = false;
string ret = String.Empty;
while (!itisdone)
{
itisdone = true;
ret = CmdPrompt(p);
ret = Prompt(p);
foreach (char c in excludedCharacters)
{
@ -109,27 +155,34 @@ namespace OpenSim.Framework.Console
return ret;
}
public string CmdPrompt(string p, string def, List<char> excludedCharacters)
public virtual string Prompt(string p, string def, List<char> excludedCharacters, bool echo = true)
{
bool itisdone = false;
string ret = String.Empty;
while (!itisdone)
{
itisdone = true;
ret = CmdPrompt(p, def);
if (ret == String.Empty)
if (def == null)
ret = ReadLine(String.Format("{0}: ", p), false, echo);
else
ret = ReadLine(String.Format("{0} [{1}]: ", p, def), false, echo);
if (ret == String.Empty && def != null)
{
ret = def;
}
else
{
foreach (char c in excludedCharacters)
if (excludedCharacters != null)
{
if (ret.Contains(c.ToString()))
foreach (char c in excludedCharacters)
{
System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted.");
itisdone = false;
if (ret.Contains(c.ToString()))
{
System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted.");
itisdone = false;
}
}
}
}
@ -139,14 +192,14 @@ namespace OpenSim.Framework.Console
}
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
public string CmdPrompt(string prompt, string defaultresponse, List<string> options)
public virtual string Prompt(string prompt, string defaultresponse, List<string> options)
{
bool itisdone = false;
string optstr = String.Empty;
foreach (string s in options)
optstr += " " + s;
string temp = CmdPrompt(prompt, defaultresponse);
string temp = Prompt(prompt, defaultresponse);
while (itisdone == false)
{
if (options.Contains(temp))
@ -156,19 +209,12 @@ namespace OpenSim.Framework.Console
else
{
System.Console.WriteLine("Valid options are" + optstr);
temp = CmdPrompt(prompt, defaultresponse);
temp = Prompt(prompt, defaultresponse);
}
}
return temp;
}
// Displays a prompt and waits for the user to enter a string, then returns that string
// (Done with no echo and suitable for passwords)
public string PasswdPrompt(string p)
{
return ReadLine(String.Format("{0}: ", p), false, false);
}
public virtual string ReadLine(string p, bool isCommand, bool e)
{
System.Console.Write("{0}", p);

20
OpenSim/Framework/Console/ConsoleUtil.cs Normal file → Executable file
View File

@ -75,7 +75,7 @@ namespace OpenSim.Framework.Console
{
if (File.Exists(path))
{
console.OutputFormat("File {0} already exists. Please move or remove it.", path);
console.Output("File {0} already exists. Please move or remove it.", path);
return false;
}
@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
if (!UUID.TryParse(rawUuid, out uuid))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid uuid", rawUuid);
console.Output("ERROR: {0} is not a valid uuid", rawUuid);
return false;
}
@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
if (!uint.TryParse(rawLocalId, out localId))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid local id", localId);
console.Output("ERROR: {0} is not a valid local id", localId);
return false;
}
@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
if (localId == 0)
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
return false;
}
@ -150,7 +150,7 @@ namespace OpenSim.Framework.Console
}
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid UUID or local id", rawId);
console.Output("ERROR: {0} is not a valid UUID or local id", rawId);
return false;
}
@ -167,7 +167,7 @@ namespace OpenSim.Framework.Console
if (!bool.TryParse(rawConsoleString, out b))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a true or false value", rawConsoleString);
console.Output("ERROR: {0} is not a true or false value", rawConsoleString);
return false;
}
@ -187,7 +187,7 @@ namespace OpenSim.Framework.Console
if (!int.TryParse(rawConsoleInt, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid integer", rawConsoleInt);
console.Output("ERROR: {0} is not a valid integer", rawConsoleInt);
return false;
}
@ -207,7 +207,7 @@ namespace OpenSim.Framework.Console
if (!float.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid float", rawConsoleInput);
console.Output("ERROR: {0} is not a valid float", rawConsoleInput);
return false;
}
@ -227,7 +227,7 @@ namespace OpenSim.Framework.Console
if (!double.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid double", rawConsoleInput);
console.Output("ERROR: {0} is not a valid double", rawConsoleInput);
return false;
}
@ -249,7 +249,7 @@ namespace OpenSim.Framework.Console
if (i < 0)
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a positive integer", rawConsoleInt);
console.Output("ERROR: {0} is not a positive integer", rawConsoleInt);
return false;
}

59
OpenSim/Framework/Console/LocalConsole.cs Normal file → Executable file
View File

@ -46,6 +46,7 @@ namespace OpenSim.Framework.Console
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_historyPath;
private bool m_historyEnable;
private bool m_historytimestamps;
// private readonly object m_syncRoot = new object();
private const string LOGLEVEL_NONE = "(none)";
@ -98,15 +99,30 @@ namespace OpenSim.Framework.Console
string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt");
int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100);
m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile));
m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath);
m_historytimestamps = startupConfig.GetBoolean("ConsoleHistoryTimeStamp", false);
m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1} {2} timestamps",
m_historySize, m_historyPath, m_historytimestamps?"with":"without");
if (File.Exists(m_historyPath))
{
List<string> originallines = new List<string>();
using (StreamReader history_file = new StreamReader(m_historyPath))
{
string line;
while ((line = history_file.ReadLine()) != null)
{
originallines.Add(line);
if(line.StartsWith("["))
{
int indx = line.IndexOf("]:> ");
if(indx > 0)
{
if(indx + 4 >= line.Length)
line = String.Empty;
else
line = line.Substring(indx + 4);
}
}
m_history.Add(line);
}
}
@ -114,11 +130,14 @@ namespace OpenSim.Framework.Console
if (m_history.Count > m_historySize)
{
while (m_history.Count > m_historySize)
{
m_history.RemoveAt(0);
originallines.RemoveAt(0);
}
using (StreamWriter history_file = new StreamWriter(m_historyPath))
{
foreach (string line in m_history)
foreach (string line in originallines)
{
history_file.WriteLine(line);
}
@ -141,6 +160,8 @@ namespace OpenSim.Framework.Console
m_history.Add(text);
if (m_historyEnable)
{
if (m_historytimestamps)
text = String.Format("[{0} {1}]:> {2}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), text);
File.AppendAllText(m_historyPath, text + Environment.NewLine);
}
}
@ -338,7 +359,7 @@ namespace OpenSim.Framework.Console
{
string outText = text;
if (level != LOGLEVEL_NONE)
if (level != null)
{
MatchCollection matches = m_categoryRegex.Matches(text);
@ -368,13 +389,38 @@ namespace OpenSim.Framework.Console
System.Console.WriteLine();
}
public override void Output(string text)
public override void Output(string format)
{
Output(text, LOGLEVEL_NONE);
Output(format, null);
}
public override void Output(string text, string level)
public override void Output(string format, params object[] components)
{
string level = null;
if(components != null && components.Length > 0)
{
if(components[0] == null || components[0] is ConsoleLevel)
{
if(components[0] is ConsoleLevel)
level = ((ConsoleLevel)components[0]).ToString();
if (components.Length > 1)
{
object[] tmp = new object[components.Length - 1];
Array.Copy(components, 1, tmp, 0, components.Length - 1);
components = tmp;
}
else
components = null;
}
}
string text;
if (components == null || components.Length == 0)
text = format;
else
text = String.Format(format, components);
FireOnOutput(text);
lock (m_commandLine)
@ -382,7 +428,6 @@ namespace OpenSim.Framework.Console
if (m_cursorYPosition == -1)
{
WriteLocalText(text, level);
return;
}

20
OpenSim/Framework/Console/MockConsole.cs Normal file → Executable file
View File

@ -30,6 +30,7 @@ using System.Threading;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Nini.Config;
namespace OpenSim.Framework.Console
{
@ -56,23 +57,24 @@ namespace OpenSim.Framework.Console
public string ReadLine(string p, bool isCommand, bool e) { return ""; }
public object ConsoleScene {
public IScene ConsoleScene {
get { return null; }
set {}
}
public void Output(string text, string level) {}
public void Output(string text) {}
public void OutputFormat(string format, params object[] components) {}
public void Output(string format) { }
public void Output(string format, params object[] components) { }
public string CmdPrompt(string p) { return ""; }
public string CmdPrompt(string p, string def) { return ""; }
public string CmdPrompt(string p, List<char> excludedCharacters) { return ""; }
public string CmdPrompt(string p, string def, List<char> excludedCharacters) { return ""; }
public string Prompt(string p) { return ""; }
public string Prompt(string p, string def) { return ""; }
public string Prompt(string p, List<char> excludedCharacters) { return ""; }
public string Prompt(string p, string def, List<char> excludedCharacters, bool echo) { return ""; }
public string CmdPrompt(string prompt, string defaultresponse, List<string> options) { return ""; }
public string Prompt(string prompt, string defaultresponse, List<string> options) { return ""; }
public string PasswdPrompt(string p) { return ""; }
public void ReadConfig(IConfigSource configSource) { }
}
public class MockCommands : ICommands

View File

@ -55,12 +55,14 @@ namespace OpenSim.Framework.Console
{
if (m_console != null)
{
string level = "normal";
ConsoleLevel level;
if (le.Level == Level.Error)
level = "error";
else if (le.Level == Level.Warn)
level = "warn";
else
level = "normal";
m_console.Output(loggingMessage, level);
}

52
OpenSim/Framework/Console/RemoteConsole.cs Normal file → Executable file
View File

@ -46,6 +46,8 @@ namespace OpenSim.Framework.Console
//
public class RemoteConsole : CommandConsole
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// Connection specific data, indexed by a session ID
// we create when a client connects.
protected class ConsoleConnection
@ -153,7 +155,7 @@ namespace OpenSim.Framework.Console
m_expireTimer.Start();
}
public void ReadConfig(IConfigSource config)
public override void ReadConfig(IConfigSource config)
{
m_Config = config;
@ -188,13 +190,46 @@ namespace OpenSim.Framework.Console
m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand);
}
public override void Output(string text, string level)
public override void Output(string format)
{
Output(format, null);
}
public override void Output(string format, params object[] components)
{
string level = null;
if (components != null && components.Length > 0)
{
if (components[0] == null || components[0] is ConsoleLevel)
{
if (components[0] is ConsoleLevel)
level = ((ConsoleLevel)components[0]).ToString();
if (components.Length > 1)
{
object[] tmp = new object[components.Length - 1];
Array.Copy(components, 1, tmp, 0, components.Length - 1);
components = tmp;
}
else
components = null;
}
}
string text;
if (components == null || components.Length == 0)
text = format;
else
text = String.Format(format, components);
Output(text, level, false, false, false);
}
protected void Output(string text, string level, bool isPrompt, bool isCommand, bool isInput)
{
if (level == null)
level = String.Empty;
// Increment the line number. It was 0 and they start at 1
// so we need to pre-increment.
m_lineNumber++;
@ -228,12 +263,6 @@ namespace OpenSim.Framework.Console
System.Console.WriteLine(text.Trim());
}
public override void Output(string text)
{
// Output plain (non-logging style) text.
Output(text, String.Empty, false, false, false);
}
public override string ReadLine(string p, bool isCommand, bool e)
{
// Output the prompt an prepare to wait. This
@ -400,10 +429,9 @@ namespace OpenSim.Framework.Console
}
// This call is a CAP. The URL is the authentication.
string uri = "/ReadResponses/" + sessionID.ToString() + "/";
string uri = "/ReadResponses/" + sessionID.ToString();
m_Server.AddPollServiceHTTPHandler(
uri, new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, sessionID,25000)); // 25 secs timeout
m_Server.AddPollServiceHTTPHandler(new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, null, sessionID,25000)); // 25 secs timeout
// Our reply is an XML document.
// TODO: Change this to Linq.Xml
@ -687,7 +715,6 @@ namespace OpenSim.Framework.Console
result["int_response_code"] = 200;
result["content_type"] = "application/xml";
result["keepalive"] = false;
result["reusecontext"] = false;
result = CheckOrigin(result);
return result;
@ -713,7 +740,6 @@ namespace OpenSim.Framework.Console
result["int_response_code"] = 200;
result["content_type"] = "text/xml";
result["keepalive"] = false;
result["reusecontext"] = false;
result = CheckOrigin(result);
return result;

View File

@ -25,18 +25,22 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
namespace OpenSim.Framework
{
public class Constants
{
public const int MaxAgentAttachments = 38;
public const int MaxAgentGroups = 60;
// 'RegionSize' is the legacy region size.
// DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not
// be the legacy region size.
public const uint RegionSize = 256;
public const uint RegionHeight = 4096;
// This could be a parameters but, really, a region of greater than this is pretty unmanageable
public const uint MaximumRegionSize = 8192;
public const uint MaximumRegionSize = 4096;
// Since terrain is stored in 16x16 heights, regions must be a multiple of this number and that is the minimum
public const int MinRegionSize = 16;
@ -44,6 +48,9 @@ namespace OpenSim.Framework
public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f";
public static readonly UUID m_MrOpenSimID = new UUID("11111111-1111-0000-0000-000100bba000");
public static readonly DateTime m_MrOpenSimBorn = new DateTime(2007, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public enum EstateAccessCodex : uint
{
AllowedAccess = 1,
@ -103,8 +110,8 @@ namespace OpenSim.Framework
/// <summary>Finished, Same Sim</summary>
FinishedViaSameSim = 1 << 29,
/// <summary>Agent coming into the grid from another grid</summary>
ViaHGLogin = 1 << 30
ViaHGLogin = 1 << 30,
notViaHGLogin = 0xbffffff
}
}
}

View File

@ -1,56 +1 @@
/*
* 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.Globalization;
using System.Threading;
namespace OpenSim.Framework
{
public class Culture
{
private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false);
public static NumberFormatInfo NumberFormatInfo
{
get { return m_cultureInfo.NumberFormat; }
}
public static IFormatProvider FormatProvider
{
get { return m_cultureInfo; }
}
/// <summary>
/// Set Culture to en-US to make string processing of numbers simpler.
/// </summary>
public static void SetCurrentCulture()
{
Thread.CurrentThread.CurrentCulture = m_cultureInfo;
}
}
}
/* * 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.Globalization; using System.Threading; namespace OpenSim.Framework { public class Culture { private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false); public static NumberFormatInfo NumberFormatInfo { get { return m_cultureInfo.NumberFormat; } } public static IFormatProvider FormatProvider { get { return m_cultureInfo; } } /// <summary> /// Set Culture to en-US to make string processing of numbers simpler. /// </summary> public static void SetCurrentCulture() { Thread.CurrentThread.CurrentCulture = m_cultureInfo; } public static void SetDefaultCurrentCulture() { CultureInfo.DefaultThreadCurrentCulture = m_cultureInfo; } public static CultureInfo GetDefaultCurrentCulture() { return CultureInfo.DefaultThreadCurrentCulture; } } }

View File

@ -41,23 +41,28 @@ namespace OpenSim.Framework
{
Dictionary<TKey1, TValue> Dictionary1;
Dictionary<TKey2, TValue> Dictionary2;
private TValue[] m_array;
ReaderWriterLockSlim rwLock = new ReaderWriterLockSlim();
public DoubleDictionaryThreadAbortSafe()
{
Dictionary1 = new Dictionary<TKey1,TValue>();
Dictionary2 = new Dictionary<TKey2,TValue>();
m_array = null;
}
public DoubleDictionaryThreadAbortSafe(int capacity)
{
Dictionary1 = new Dictionary<TKey1, TValue>(capacity);
Dictionary2 = new Dictionary<TKey2, TValue>(capacity);
m_array = null;
}
~DoubleDictionaryThreadAbortSafe()
{
rwLock.Dispose();
if(rwLock != null)
rwLock.Dispose();
}
public void Add(TKey1 key1, TKey2 key2, TValue value)
@ -74,6 +79,8 @@ namespace OpenSim.Framework
{
rwLock.EnterWriteLock();
gotLock = true;
}
/*
if (Dictionary1.ContainsKey(key1))
{
if (!Dictionary2.ContainsKey(key2))
@ -84,9 +91,10 @@ namespace OpenSim.Framework
if (!Dictionary1.ContainsKey(key1))
throw new ArgumentException("key2 exists in the dictionary but not key1");
}
*/
Dictionary1[key1] = value;
Dictionary2[key2] = value;
}
m_array = null;
}
finally
{
@ -110,9 +118,10 @@ namespace OpenSim.Framework
{
rwLock.EnterWriteLock();
gotLock = true;
Dictionary1.Remove(key1);
success = Dictionary2.Remove(key2);
}
success = Dictionary1.Remove(key1);
success &= Dictionary2.Remove(key2);
m_array = null;
}
finally
{
@ -153,6 +162,7 @@ namespace OpenSim.Framework
{
Dictionary1.Remove(key1);
Dictionary2.Remove(kvp.Key);
m_array = null;
}
found = true;
break;
@ -199,6 +209,7 @@ namespace OpenSim.Framework
{
Dictionary2.Remove(key2);
Dictionary1.Remove(kvp.Key);
m_array = null;
}
found = true;
break;
@ -231,6 +242,7 @@ namespace OpenSim.Framework
gotLock = true;
Dictionary1.Clear();
Dictionary2.Clear();
m_array = null;
}
}
finally
@ -313,28 +325,12 @@ namespace OpenSim.Framework
public void ForEach(Action<TValue> action)
{
bool gotLock = false;
TValue[] values = GetArray();
if(values == null || values.Length == 0)
return;
try
{
// Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
// the acquision inside the main try. The inner finally block is needed because thread aborts cannot
// interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
try {}
finally
{
rwLock.EnterReadLock();
gotLock = true;
}
foreach (TValue value in Dictionary1.Values)
action(value);
}
finally
{
if (gotLock)
rwLock.ExitReadLock();
}
foreach (TValue value in values)
action(value);
}
public void ForEach(Action<KeyValuePair<TKey1, TValue>> action)
@ -391,30 +387,12 @@ namespace OpenSim.Framework
public TValue FindValue(Predicate<TValue> predicate)
{
bool gotLock = false;
try
TValue[] values = GetArray();
int len = values.Length;
for (int i = 0; i < len; ++i)
{
// Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
// the acquision inside the main try. The inner finally block is needed because thread aborts cannot
// interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
try {}
finally
{
rwLock.EnterReadLock();
gotLock = true;
}
foreach (TValue value in Dictionary1.Values)
{
if (predicate(value))
return value;
}
}
finally
{
if (gotLock)
rwLock.ExitReadLock();
if (predicate(values[i]))
return values[i];
}
return default(TValue);
@ -423,32 +401,14 @@ namespace OpenSim.Framework
public IList<TValue> FindAll(Predicate<TValue> predicate)
{
IList<TValue> list = new List<TValue>();
bool gotLock = false;
TValue[] values = GetArray();
try
int len = values.Length;
for (int i = 0; i < len; ++i)
{
// Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
// the acquision inside the main try. The inner finally block is needed because thread aborts cannot
// interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
try {}
finally
{
rwLock.EnterReadLock();
gotLock = true;
}
foreach (TValue value in Dictionary1.Values)
{
if (predicate(value))
list.Add(value);
}
if (predicate(values[i]))
list.Add(values[i]);
}
finally
{
if (gotLock)
rwLock.ExitReadLock();
}
return list;
}
@ -497,6 +457,7 @@ namespace OpenSim.Framework
for (int i = 0; i < list2.Count; i++)
Dictionary2.Remove(list2[i]);
m_array = null;
}
}
finally
@ -513,5 +474,51 @@ namespace OpenSim.Framework
return list.Count;
}
public TValue[] GetArray()
{
bool gotupLock = false;
try
{
try { }
finally
{
rwLock.EnterUpgradeableReadLock();
gotupLock = true;
}
if (m_array == null)
{
bool gotwritelock = false;
try
{
try { }
finally
{
rwLock.EnterWriteLock();
gotwritelock = true;
}
m_array = new TValue[Dictionary1.Count];
Dictionary1.Values.CopyTo(m_array, 0);
}
finally
{
if (gotwritelock)
rwLock.ExitWriteLock();
}
}
return m_array;
}
catch
{
return new TValue[0];
}
finally
{
if (gotupLock)
rwLock.ExitUpgradeableReadLock();
}
}
}
}

View File

@ -58,13 +58,13 @@ namespace OpenSim.Framework
public void Unpack(OSD data)
{
OSDMap map = (OSDMap)data;
if (map.ContainsKey("InboundVersion"))
InboundVersion = (float)map["InboundVersion"].AsReal();
if (map.ContainsKey("OutboundVersion"))
OutboundVersion = (float)map["OutboundVersion"].AsReal();
if (map.ContainsKey("WearablesCount"))
WearablesCount = map["WearablesCount"].AsInteger();
OSD tmpOSD;
if (map.TryGetValue("InboundVersion", out tmpOSD))
InboundVersion = (float)tmpOSD.AsReal();
if (map.TryGetValue("OutboundVersion", out tmpOSD))
OutboundVersion = (float)tmpOSD.AsReal();
if (map.TryGetValue("WearablesCount", out tmpOSD))
WearablesCount = tmpOSD.AsInteger();
}
}
}

View File

@ -67,6 +67,9 @@ namespace OpenSim.Framework
}
}
public UUID BanningUserID { get; set; }
public int BanTime { get; set; }
private string m_bannedHostAddress = string.Empty;
/// <summary>
/// IP address or domain name of the banned client.
@ -137,6 +140,8 @@ namespace OpenSim.Framework
object value = p.GetValue(this, null);
if (value is String)
p.SetValue(this, map[p.Name], null);
else if (value is Int32)
p.SetValue(this, Int32.Parse((string)map[p.Name]), null);
else if (value is UInt32)
p.SetValue(this, UInt32.Parse((string)map[p.Name]), null);
else if (value is Boolean)

Some files were not shown because too many files have changed in this diff Show More