diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AssetBase.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Console/LocalConsole.cs | 180 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 5 | ||||
-rw-r--r-- | OpenSim/Framework/IScene.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | 93 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 |
8 files changed, 158 insertions, 132 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 06e040f..ff240be 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -169,6 +169,7 @@ namespace OpenSim.Framework | |||
169 | get { return m_metadata.FullID; } | 169 | get { return m_metadata.FullID; } |
170 | set { m_metadata.FullID = value; } | 170 | set { m_metadata.FullID = value; } |
171 | } | 171 | } |
172 | |||
172 | /// <summary> | 173 | /// <summary> |
173 | /// Asset MetaData ID (transferring from UUID to string ID) | 174 | /// Asset MetaData ID (transferring from UUID to string ID) |
174 | /// </summary> | 175 | /// </summary> |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 21e2233..f147e14 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -225,6 +225,8 @@ namespace OpenSim.Framework | |||
225 | /// </summary> | 225 | /// </summary> |
226 | public virtual void ResetAppearance() | 226 | public virtual void ResetAppearance() |
227 | { | 227 | { |
228 | // m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance"); | ||
229 | |||
228 | m_serial = 0; | 230 | m_serial = 0; |
229 | 231 | ||
230 | SetDefaultTexture(); | 232 | SetDefaultTexture(); |
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index eda41b8..7c8626d 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -46,12 +46,11 @@ namespace OpenSim.Framework.Console | |||
46 | // private readonly object m_syncRoot = new object(); | 46 | // private readonly object m_syncRoot = new object(); |
47 | private const string LOGLEVEL_NONE = "(none)"; | 47 | private const string LOGLEVEL_NONE = "(none)"; |
48 | 48 | ||
49 | private int y = -1; | 49 | private int m_cursorYPosition = -1; |
50 | private int cp = 0; | 50 | private int m_cursorXPosition = 0; |
51 | private int h = 1; | 51 | private StringBuilder m_commandLine = new StringBuilder(); |
52 | private StringBuilder cmdline = new StringBuilder(); | 52 | private bool m_echo = true; |
53 | private bool echo = true; | 53 | private List<string> m_history = new List<string>(); |
54 | private List<string> history = new List<string>(); | ||
55 | 54 | ||
56 | private static readonly ConsoleColor[] Colors = { | 55 | private static readonly ConsoleColor[] Colors = { |
57 | // the dark colors don't seem to be visible on some black background terminals like putty :( | 56 | // the dark colors don't seem to be visible on some black background terminals like putty :( |
@@ -81,10 +80,10 @@ namespace OpenSim.Framework.Console | |||
81 | 80 | ||
82 | private void AddToHistory(string text) | 81 | private void AddToHistory(string text) |
83 | { | 82 | { |
84 | while (history.Count >= 100) | 83 | while (m_history.Count >= 100) |
85 | history.RemoveAt(0); | 84 | m_history.RemoveAt(0); |
86 | 85 | ||
87 | history.Add(text); | 86 | m_history.Add(text); |
88 | } | 87 | } |
89 | 88 | ||
90 | /// <summary> | 89 | /// <summary> |
@@ -111,11 +110,11 @@ namespace OpenSim.Framework.Console | |||
111 | } | 110 | } |
112 | else | 111 | else |
113 | { | 112 | { |
114 | int bw = System.Console.BufferWidth; | 113 | int bufferWidth = System.Console.BufferWidth; |
115 | 114 | ||
116 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) | 115 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) |
117 | if (bw > 0 && left >= bw) | 116 | if (bufferWidth > 0 && left >= bufferWidth) |
118 | System.Console.CursorLeft = bw - 1; | 117 | System.Console.CursorLeft = bufferWidth - 1; |
119 | } | 118 | } |
120 | 119 | ||
121 | if (top < 0) | 120 | if (top < 0) |
@@ -124,11 +123,11 @@ namespace OpenSim.Framework.Console | |||
124 | } | 123 | } |
125 | else | 124 | else |
126 | { | 125 | { |
127 | int bh = System.Console.BufferHeight; | 126 | int bufferHeight = System.Console.BufferHeight; |
128 | 127 | ||
129 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) | 128 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) |
130 | if (bh > 0 && top >= bh) | 129 | if (bufferHeight > 0 && top >= bufferHeight) |
131 | top = bh - 1; | 130 | top = bufferHeight - 1; |
132 | } | 131 | } |
133 | 132 | ||
134 | System.Console.CursorTop = top; | 133 | System.Console.CursorTop = top; |
@@ -160,10 +159,10 @@ namespace OpenSim.Framework.Console | |||
160 | } | 159 | } |
161 | else | 160 | else |
162 | { | 161 | { |
163 | int bh = System.Console.BufferHeight; | 162 | int bufferHeight = System.Console.BufferHeight; |
164 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) | 163 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) |
165 | if (bh > 0 && top >= bh) | 164 | if (bufferHeight > 0 && top >= bufferHeight) |
166 | System.Console.CursorTop = bh - 1; | 165 | System.Console.CursorTop = bufferHeight - 1; |
167 | } | 166 | } |
168 | 167 | ||
169 | if (left < 0) | 168 | if (left < 0) |
@@ -172,11 +171,11 @@ namespace OpenSim.Framework.Console | |||
172 | } | 171 | } |
173 | else | 172 | else |
174 | { | 173 | { |
175 | int bw = System.Console.BufferWidth; | 174 | int bufferWidth = System.Console.BufferWidth; |
176 | 175 | ||
177 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) | 176 | // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) |
178 | if (bw > 0 && left >= bw) | 177 | if (bufferWidth > 0 && left >= bufferWidth) |
179 | left = bw - 1; | 178 | left = bufferWidth - 1; |
180 | } | 179 | } |
181 | 180 | ||
182 | System.Console.CursorLeft = left; | 181 | System.Console.CursorLeft = left; |
@@ -186,31 +185,30 @@ namespace OpenSim.Framework.Console | |||
186 | 185 | ||
187 | private void Show() | 186 | private void Show() |
188 | { | 187 | { |
189 | lock (cmdline) | 188 | lock (m_commandLine) |
190 | { | 189 | { |
191 | if (y == -1 || System.Console.BufferWidth == 0) | 190 | if (m_cursorYPosition == -1 || System.Console.BufferWidth == 0) |
192 | return; | 191 | return; |
193 | 192 | ||
194 | int xc = prompt.Length + cp; | 193 | int xc = prompt.Length + m_cursorXPosition; |
195 | int new_x = xc % System.Console.BufferWidth; | 194 | int new_x = xc % System.Console.BufferWidth; |
196 | int new_y = y + xc / System.Console.BufferWidth; | 195 | int new_y = m_cursorYPosition + xc / System.Console.BufferWidth; |
197 | int end_y = y + (cmdline.Length + prompt.Length) / System.Console.BufferWidth; | 196 | int end_y = m_cursorYPosition + (m_commandLine.Length + prompt.Length) / System.Console.BufferWidth; |
198 | if (end_y / System.Console.BufferWidth >= h) | 197 | |
199 | h++; | ||
200 | if (end_y >= System.Console.BufferHeight) // wrap | 198 | if (end_y >= System.Console.BufferHeight) // wrap |
201 | { | 199 | { |
202 | y--; | 200 | m_cursorYPosition--; |
203 | new_y--; | 201 | new_y--; |
204 | SetCursorLeft(0); | 202 | SetCursorLeft(0); |
205 | SetCursorTop(System.Console.BufferHeight - 1); | 203 | SetCursorTop(System.Console.BufferHeight - 1); |
206 | System.Console.WriteLine(" "); | 204 | System.Console.WriteLine(" "); |
207 | } | 205 | } |
208 | 206 | ||
209 | y = SetCursorTop(y); | 207 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
210 | SetCursorLeft(0); | 208 | SetCursorLeft(0); |
211 | 209 | ||
212 | if (echo) | 210 | if (m_echo) |
213 | System.Console.Write("{0}{1}", prompt, cmdline); | 211 | System.Console.Write("{0}{1}", prompt, m_commandLine); |
214 | else | 212 | else |
215 | System.Console.Write("{0}", prompt); | 213 | System.Console.Write("{0}", prompt); |
216 | 214 | ||
@@ -221,20 +219,20 @@ namespace OpenSim.Framework.Console | |||
221 | 219 | ||
222 | public override void LockOutput() | 220 | public override void LockOutput() |
223 | { | 221 | { |
224 | Monitor.Enter(cmdline); | 222 | Monitor.Enter(m_commandLine); |
225 | try | 223 | try |
226 | { | 224 | { |
227 | if (y != -1) | 225 | if (m_cursorYPosition != -1) |
228 | { | 226 | { |
229 | y = SetCursorTop(y); | 227 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
230 | System.Console.CursorLeft = 0; | 228 | System.Console.CursorLeft = 0; |
231 | 229 | ||
232 | int count = cmdline.Length + prompt.Length; | 230 | int count = m_commandLine.Length + prompt.Length; |
233 | 231 | ||
234 | while (count-- > 0) | 232 | while (count-- > 0) |
235 | System.Console.Write(" "); | 233 | System.Console.Write(" "); |
236 | 234 | ||
237 | y = SetCursorTop(y); | 235 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
238 | SetCursorLeft(0); | 236 | SetCursorLeft(0); |
239 | } | 237 | } |
240 | } | 238 | } |
@@ -245,12 +243,12 @@ namespace OpenSim.Framework.Console | |||
245 | 243 | ||
246 | public override void UnlockOutput() | 244 | public override void UnlockOutput() |
247 | { | 245 | { |
248 | if (y != -1) | 246 | if (m_cursorYPosition != -1) |
249 | { | 247 | { |
250 | y = System.Console.CursorTop; | 248 | m_cursorYPosition = System.Console.CursorTop; |
251 | Show(); | 249 | Show(); |
252 | } | 250 | } |
253 | Monitor.Exit(cmdline); | 251 | Monitor.Exit(m_commandLine); |
254 | } | 252 | } |
255 | 253 | ||
256 | private void WriteColorText(ConsoleColor color, string sender) | 254 | private void WriteColorText(ConsoleColor color, string sender) |
@@ -317,29 +315,29 @@ namespace OpenSim.Framework.Console | |||
317 | 315 | ||
318 | public override void Output(string text, string level) | 316 | public override void Output(string text, string level) |
319 | { | 317 | { |
320 | lock (cmdline) | 318 | lock (m_commandLine) |
321 | { | 319 | { |
322 | if (y == -1) | 320 | if (m_cursorYPosition == -1) |
323 | { | 321 | { |
324 | WriteLocalText(text, level); | 322 | WriteLocalText(text, level); |
325 | 323 | ||
326 | return; | 324 | return; |
327 | } | 325 | } |
328 | 326 | ||
329 | y = SetCursorTop(y); | 327 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
330 | SetCursorLeft(0); | 328 | SetCursorLeft(0); |
331 | 329 | ||
332 | int count = cmdline.Length + prompt.Length; | 330 | int count = m_commandLine.Length + prompt.Length; |
333 | 331 | ||
334 | while (count-- > 0) | 332 | while (count-- > 0) |
335 | System.Console.Write(" "); | 333 | System.Console.Write(" "); |
336 | 334 | ||
337 | y = SetCursorTop(y); | 335 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
338 | SetCursorLeft(0); | 336 | SetCursorLeft(0); |
339 | 337 | ||
340 | WriteLocalText(text, level); | 338 | WriteLocalText(text, level); |
341 | 339 | ||
342 | y = System.Console.CursorTop; | 340 | m_cursorYPosition = System.Console.CursorTop; |
343 | 341 | ||
344 | Show(); | 342 | Show(); |
345 | } | 343 | } |
@@ -347,9 +345,9 @@ namespace OpenSim.Framework.Console | |||
347 | 345 | ||
348 | private bool ContextHelp() | 346 | private bool ContextHelp() |
349 | { | 347 | { |
350 | string[] words = Parser.Parse(cmdline.ToString()); | 348 | string[] words = Parser.Parse(m_commandLine.ToString()); |
351 | 349 | ||
352 | bool trailingSpace = cmdline.ToString().EndsWith(" "); | 350 | bool trailingSpace = m_commandLine.ToString().EndsWith(" "); |
353 | 351 | ||
354 | // Allow ? through while typing a URI | 352 | // Allow ? through while typing a URI |
355 | // | 353 | // |
@@ -368,19 +366,18 @@ namespace OpenSim.Framework.Console | |||
368 | 366 | ||
369 | public override string ReadLine(string p, bool isCommand, bool e) | 367 | public override string ReadLine(string p, bool isCommand, bool e) |
370 | { | 368 | { |
371 | h = 1; | 369 | m_cursorXPosition = 0; |
372 | cp = 0; | ||
373 | prompt = p; | 370 | prompt = p; |
374 | echo = e; | 371 | m_echo = e; |
375 | int historyLine = history.Count; | 372 | int historyLine = m_history.Count; |
376 | 373 | ||
377 | SetCursorLeft(0); // Needed for mono | 374 | SetCursorLeft(0); // Needed for mono |
378 | System.Console.Write(" "); // Needed for mono | 375 | System.Console.Write(" "); // Needed for mono |
379 | 376 | ||
380 | lock (cmdline) | 377 | lock (m_commandLine) |
381 | { | 378 | { |
382 | y = System.Console.CursorTop; | 379 | m_cursorYPosition = System.Console.CursorTop; |
383 | cmdline.Remove(0, cmdline.Length); | 380 | m_commandLine.Remove(0, m_commandLine.Length); |
384 | } | 381 | } |
385 | 382 | ||
386 | while (true) | 383 | while (true) |
@@ -388,92 +385,95 @@ namespace OpenSim.Framework.Console | |||
388 | Show(); | 385 | Show(); |
389 | 386 | ||
390 | ConsoleKeyInfo key = System.Console.ReadKey(true); | 387 | ConsoleKeyInfo key = System.Console.ReadKey(true); |
391 | char c = key.KeyChar; | 388 | char enteredChar = key.KeyChar; |
392 | 389 | ||
393 | if (!Char.IsControl(c)) | 390 | if (!Char.IsControl(enteredChar)) |
394 | { | 391 | { |
395 | if (cp >= 318) | 392 | if (m_cursorXPosition >= 318) |
396 | continue; | 393 | continue; |
397 | 394 | ||
398 | if (c == '?' && isCommand) | 395 | if (enteredChar == '?' && isCommand) |
399 | { | 396 | { |
400 | if (ContextHelp()) | 397 | if (ContextHelp()) |
401 | continue; | 398 | continue; |
402 | } | 399 | } |
403 | 400 | ||
404 | cmdline.Insert(cp, c); | 401 | m_commandLine.Insert(m_cursorXPosition, enteredChar); |
405 | cp++; | 402 | m_cursorXPosition++; |
406 | } | 403 | } |
407 | else | 404 | else |
408 | { | 405 | { |
409 | switch (key.Key) | 406 | switch (key.Key) |
410 | { | 407 | { |
411 | case ConsoleKey.Backspace: | 408 | case ConsoleKey.Backspace: |
412 | if (cp == 0) | 409 | if (m_cursorXPosition == 0) |
413 | break; | 410 | break; |
414 | cmdline.Remove(cp-1, 1); | 411 | m_commandLine.Remove(m_cursorXPosition-1, 1); |
415 | cp--; | 412 | m_cursorXPosition--; |
416 | 413 | ||
417 | SetCursorLeft(0); | 414 | SetCursorLeft(0); |
418 | y = SetCursorTop(y); | 415 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
419 | 416 | ||
420 | System.Console.Write("{0}{1} ", prompt, cmdline); | 417 | if (m_echo) |
418 | System.Console.Write("{0}{1} ", prompt, m_commandLine); | ||
419 | else | ||
420 | System.Console.Write("{0}", prompt); | ||
421 | 421 | ||
422 | break; | 422 | break; |
423 | case ConsoleKey.End: | 423 | case ConsoleKey.End: |
424 | cp = cmdline.Length; | 424 | m_cursorXPosition = m_commandLine.Length; |
425 | break; | 425 | break; |
426 | case ConsoleKey.Home: | 426 | case ConsoleKey.Home: |
427 | cp = 0; | 427 | m_cursorXPosition = 0; |
428 | break; | 428 | break; |
429 | case ConsoleKey.UpArrow: | 429 | case ConsoleKey.UpArrow: |
430 | if (historyLine < 1) | 430 | if (historyLine < 1) |
431 | break; | 431 | break; |
432 | historyLine--; | 432 | historyLine--; |
433 | LockOutput(); | 433 | LockOutput(); |
434 | cmdline.Remove(0, cmdline.Length); | 434 | m_commandLine.Remove(0, m_commandLine.Length); |
435 | cmdline.Append(history[historyLine]); | 435 | m_commandLine.Append(m_history[historyLine]); |
436 | cp = cmdline.Length; | 436 | m_cursorXPosition = m_commandLine.Length; |
437 | UnlockOutput(); | 437 | UnlockOutput(); |
438 | break; | 438 | break; |
439 | case ConsoleKey.DownArrow: | 439 | case ConsoleKey.DownArrow: |
440 | if (historyLine >= history.Count) | 440 | if (historyLine >= m_history.Count) |
441 | break; | 441 | break; |
442 | historyLine++; | 442 | historyLine++; |
443 | LockOutput(); | 443 | LockOutput(); |
444 | if (historyLine == history.Count) | 444 | if (historyLine == m_history.Count) |
445 | { | 445 | { |
446 | cmdline.Remove(0, cmdline.Length); | 446 | m_commandLine.Remove(0, m_commandLine.Length); |
447 | } | 447 | } |
448 | else | 448 | else |
449 | { | 449 | { |
450 | cmdline.Remove(0, cmdline.Length); | 450 | m_commandLine.Remove(0, m_commandLine.Length); |
451 | cmdline.Append(history[historyLine]); | 451 | m_commandLine.Append(m_history[historyLine]); |
452 | } | 452 | } |
453 | cp = cmdline.Length; | 453 | m_cursorXPosition = m_commandLine.Length; |
454 | UnlockOutput(); | 454 | UnlockOutput(); |
455 | break; | 455 | break; |
456 | case ConsoleKey.LeftArrow: | 456 | case ConsoleKey.LeftArrow: |
457 | if (cp > 0) | 457 | if (m_cursorXPosition > 0) |
458 | cp--; | 458 | m_cursorXPosition--; |
459 | break; | 459 | break; |
460 | case ConsoleKey.RightArrow: | 460 | case ConsoleKey.RightArrow: |
461 | if (cp < cmdline.Length) | 461 | if (m_cursorXPosition < m_commandLine.Length) |
462 | cp++; | 462 | m_cursorXPosition++; |
463 | break; | 463 | break; |
464 | case ConsoleKey.Enter: | 464 | case ConsoleKey.Enter: |
465 | SetCursorLeft(0); | 465 | SetCursorLeft(0); |
466 | y = SetCursorTop(y); | 466 | m_cursorYPosition = SetCursorTop(m_cursorYPosition); |
467 | 467 | ||
468 | System.Console.WriteLine(); | 468 | System.Console.WriteLine(); |
469 | //Show(); | 469 | //Show(); |
470 | 470 | ||
471 | lock (cmdline) | 471 | lock (m_commandLine) |
472 | { | 472 | { |
473 | y = -1; | 473 | m_cursorYPosition = -1; |
474 | } | 474 | } |
475 | 475 | ||
476 | string commandLine = cmdline.ToString(); | 476 | string commandLine = m_commandLine.ToString(); |
477 | 477 | ||
478 | if (isCommand) | 478 | if (isCommand) |
479 | { | 479 | { |
@@ -481,12 +481,12 @@ namespace OpenSim.Framework.Console | |||
481 | 481 | ||
482 | if (cmd.Length != 0) | 482 | if (cmd.Length != 0) |
483 | { | 483 | { |
484 | int i; | 484 | int index; |
485 | 485 | ||
486 | for (i=0 ; i < cmd.Length ; i++) | 486 | for (index=0 ; index < cmd.Length ; index++) |
487 | { | 487 | { |
488 | if (cmd[i].Contains(" ")) | 488 | if (cmd[index].Contains(" ")) |
489 | cmd[i] = "\"" + cmd[i] + "\""; | 489 | cmd[index] = "\"" + cmd[index] + "\""; |
490 | } | 490 | } |
491 | AddToHistory(String.Join(" ", cmd)); | 491 | AddToHistory(String.Join(" ", cmd)); |
492 | return String.Empty; | 492 | return String.Empty; |
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Console | |||
494 | } | 494 | } |
495 | 495 | ||
496 | // If we're not echoing to screen (e.g. a password) then we probably don't want it in history | 496 | // If we're not echoing to screen (e.g. a password) then we probably don't want it in history |
497 | if (echo && commandLine != "") | 497 | if (m_echo && commandLine != "") |
498 | AddToHistory(commandLine); | 498 | AddToHistory(commandLine); |
499 | 499 | ||
500 | return commandLine; | 500 | return commandLine; |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ee3d6b6..f02543d 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -53,8 +53,7 @@ namespace OpenSim.Framework | |||
53 | 53 | ||
54 | public delegate ISceneEntity RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); | 54 | public delegate ISceneEntity RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); |
55 | 55 | ||
56 | public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | 56 | public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, List<KeyValuePair<UUID, uint>> rezlist ); |
57 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects); | ||
58 | 57 | ||
59 | public delegate void ObjectAttach( | 58 | public delegate void ObjectAttach( |
60 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); | 59 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); |
@@ -940,7 +939,7 @@ namespace OpenSim.Framework | |||
940 | event ScriptReset OnScriptReset; | 939 | event ScriptReset OnScriptReset; |
941 | event GetScriptRunning OnGetScriptRunning; | 940 | event GetScriptRunning OnGetScriptRunning; |
942 | event SetScriptRunning OnSetScriptRunning; | 941 | event SetScriptRunning OnSetScriptRunning; |
943 | event Action<Vector3, bool> OnAutoPilotGo; | 942 | event Action<Vector3, bool, bool> OnAutoPilotGo; |
944 | 943 | ||
945 | event TerrainUnacked OnUnackedTerrain; | 944 | event TerrainUnacked OnUnackedTerrain; |
946 | event ActivateGesture OnActivateGesture; | 945 | event ActivateGesture OnActivateGesture; |
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 8f7a2e5..e0cb897 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -33,15 +33,12 @@ namespace OpenSim.Framework | |||
33 | { | 33 | { |
34 | public delegate void restart(RegionInfo thisRegion); | 34 | public delegate void restart(RegionInfo thisRegion); |
35 | 35 | ||
36 | //public delegate void regionup (RegionInfo thisRegion); | ||
37 | |||
38 | public enum RegionStatus : int | 36 | public enum RegionStatus : int |
39 | { | 37 | { |
40 | Down = 0, | 38 | Down = 0, |
41 | Up = 1, | 39 | Up = 1, |
42 | Crashed = 2, | 40 | Crashed = 2, |
43 | Starting = 3, | 41 | Starting = 3, |
44 | SlaveScene = 4 | ||
45 | }; | 42 | }; |
46 | 43 | ||
47 | /// <value> | 44 | /// <value> |
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs index 0aae4ff..8332c14 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs | |||
@@ -48,11 +48,13 @@ namespace OpenSim.Framework.RegionLoader.Filesystem | |||
48 | public RegionInfo[] LoadRegions() | 48 | public RegionInfo[] LoadRegions() |
49 | { | 49 | { |
50 | string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); | 50 | string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); |
51 | bool allowRegionless = false; | ||
51 | 52 | ||
52 | try | 53 | try |
53 | { | 54 | { |
54 | IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"]; | 55 | IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"]; |
55 | regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim(); | 56 | regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim(); |
57 | allowRegionless = startupConfig.GetBoolean("allow_regionless", false); | ||
56 | } | 58 | } |
57 | catch (Exception) | 59 | catch (Exception) |
58 | { | 60 | { |
@@ -68,7 +70,7 @@ namespace OpenSim.Framework.RegionLoader.Filesystem | |||
68 | string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); | 70 | string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); |
69 | 71 | ||
70 | // Create an empty Regions.ini if there are no existing config files. | 72 | // Create an empty Regions.ini if there are no existing config files. |
71 | if (configFiles.Length == 0 && iniFiles.Length == 0) | 73 | if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0) |
72 | { | 74 | { |
73 | new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); | 75 | new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); |
74 | iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); | 76 | iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); |
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index f0ffc2c..c7caf6f 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -60,6 +60,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
60 | { | 60 | { |
61 | IConfig startupConfig = (IConfig) m_configSource.Configs["Startup"]; | 61 | IConfig startupConfig = (IConfig) m_configSource.Configs["Startup"]; |
62 | string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim(); | 62 | string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim(); |
63 | bool allowRegionless = startupConfig.GetBoolean("allow_regionless", false); | ||
64 | |||
63 | if (url == String.Empty) | 65 | if (url == String.Empty) |
64 | { | 66 | { |
65 | m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty."); | 67 | m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty."); |
@@ -67,39 +69,60 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
67 | } | 69 | } |
68 | else | 70 | else |
69 | { | 71 | { |
70 | while (tries > 0) | 72 | while(tries > 0) |
71 | { | 73 | { |
72 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); | 74 | RegionInfo[] regionInfos = new RegionInfo[] {}; |
73 | webRequest.Timeout = 30000; //30 Second Timeout | 75 | int regionCount = 0; |
74 | m_log.Debug("[WEBLOADER]: Sending Download Request..."); | 76 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); |
75 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); | 77 | webRequest.Timeout = 30000; //30 Second Timeout |
76 | m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server..."); | 78 | m_log.DebugFormat("[WEBLOADER]: Sending download request to {0}", url); |
77 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | ||
78 | string xmlSource = String.Empty; | ||
79 | string tempStr = reader.ReadLine(); | ||
80 | while (tempStr != null) | ||
81 | { | ||
82 | xmlSource = xmlSource + tempStr; | ||
83 | tempStr = reader.ReadLine(); | ||
84 | } | ||
85 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + | ||
86 | xmlSource.Length); | ||
87 | XmlDocument xmlDoc = new XmlDocument(); | ||
88 | xmlDoc.LoadXml(xmlSource); | ||
89 | if (xmlDoc.FirstChild.Name == "Regions") | ||
90 | { | ||
91 | RegionInfo[] regionInfos = new RegionInfo[xmlDoc.FirstChild.ChildNodes.Count]; | ||
92 | int i; | ||
93 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) | ||
94 | { | ||
95 | m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); | ||
96 | regionInfos[i] = | ||
97 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource); | ||
98 | } | ||
99 | 79 | ||
100 | if (i > 0) | 80 | try |
101 | return regionInfos; | 81 | { |
102 | } | 82 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); |
83 | m_log.Debug("[WEBLOADER]: Downloading region information..."); | ||
84 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | ||
85 | string xmlSource = String.Empty; | ||
86 | string tempStr = reader.ReadLine(); | ||
87 | while (tempStr != null) | ||
88 | { | ||
89 | xmlSource = xmlSource + tempStr; | ||
90 | tempStr = reader.ReadLine(); | ||
91 | } | ||
92 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + | ||
93 | xmlSource.Length); | ||
94 | XmlDocument xmlDoc = new XmlDocument(); | ||
95 | xmlDoc.LoadXml(xmlSource); | ||
96 | if (xmlDoc.FirstChild.Name == "Regions") | ||
97 | { | ||
98 | regionCount = xmlDoc.FirstChild.ChildNodes.Count; | ||
99 | |||
100 | if (regionCount > 0) | ||
101 | { | ||
102 | regionInfos = new RegionInfo[regionCount]; | ||
103 | int i; | ||
104 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) | ||
105 | { | ||
106 | m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); | ||
107 | regionInfos[i] = | ||
108 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource); | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | catch (WebException ex) | ||
114 | { | ||
115 | if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.NotFound) | ||
116 | { | ||
117 | if (!allowRegionless) | ||
118 | throw ex; | ||
119 | } | ||
120 | else | ||
121 | throw ex; | ||
122 | } | ||
123 | |||
124 | if (regionCount > 0 | allowRegionless) | ||
125 | return regionInfos; | ||
103 | 126 | ||
104 | m_log.Debug("[WEBLOADER]: Request yielded no regions."); | 127 | m_log.Debug("[WEBLOADER]: Request yielded no regions."); |
105 | tries--; | 128 | tries--; |
@@ -108,8 +131,10 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
108 | m_log.Debug("[WEBLOADER]: Retrying"); | 131 | m_log.Debug("[WEBLOADER]: Retrying"); |
109 | System.Threading.Thread.Sleep(wait); | 132 | System.Threading.Thread.Sleep(wait); |
110 | } | 133 | } |
111 | } | 134 | } |
112 | return null; | 135 | |
136 | m_log.Error("[WEBLOADER]: No region configs were available."); | ||
137 | return null; | ||
113 | } | 138 | } |
114 | } | 139 | } |
115 | } | 140 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index c0d65ac..a6bdc2d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -442,7 +442,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
442 | string path = request.RawUrl; | 442 | string path = request.RawUrl; |
443 | string handlerKey = GetHandlerKey(request.HttpMethod, path); | 443 | string handlerKey = GetHandlerKey(request.HttpMethod, path); |
444 | 444 | ||
445 | //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); | 445 | // m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); |
446 | 446 | ||
447 | if (TryGetStreamHandler(handlerKey, out requestHandler)) | 447 | if (TryGetStreamHandler(handlerKey, out requestHandler)) |
448 | { | 448 | { |