From c77444a8215748633812e67adea8c7ff66a5480d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 16 Apr 2010 20:40:01 +0100
Subject: Fix http://opensimulator.org/mantis/view.php?id=4657 where
OpenSim.Grid.UserServer.exe fails on startup if no previous config probably
appears to occur because mono 2.4.2.3 (and possibly later) erroneously
returns a value of 0 for BufferWidth and BufferHeight in some circumstances
---
OpenSim/Framework/Console/LocalConsole.cs | 63 +++++++++++++++++++++++--------
OpenSim/Framework/Util.cs | 2 +-
2 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index be936b6..a3036d0 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console
{
///
/// A console that uses cursor control and color
- ///
+ ///
public class LocalConsole : CommandConsole
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -100,24 +100,40 @@ namespace OpenSim.Framework.Console
private int SetCursorTop(int top)
{
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
- // to set a cursor row position with a currently invalid column, mono will throw an exception.
- // Therefore, we need to make sure that the column position is valid first.
+ // to set a cursor row position with a currently invalid column, mono will throw an exception.
+ // Therefore, we need to make sure that the column position is valid first.
int left = System.Console.CursorLeft;
if (left < 0)
+ {
System.Console.CursorLeft = 0;
- else if (left >= System.Console.BufferWidth)
- System.Console.CursorLeft = System.Console.BufferWidth - 1;
+ }
+ else
+ {
+ int bw = System.Console.BufferWidth;
+
+ // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
+ if (bw > 0 && left >= bw)
+ System.Console.CursorLeft = bw - 1;
+ }
if (top < 0)
+ {
top = 0;
- if (top >= System.Console.BufferHeight)
- top = System.Console.BufferHeight - 1;
+ }
+ else
+ {
+ int bh = System.Console.BufferHeight;
+
+ // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
+ if (bh > 0 && top >= bh)
+ top = bh - 1;
+ }
System.Console.CursorTop = top;
return top;
- }
+ }
///
/// Set the cursor column.
@@ -129,23 +145,38 @@ namespace OpenSim.Framework.Console
///
///
/// The new cursor column.
- ///
+ ///
private int SetCursorLeft(int left)
{
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
- // to set a cursor column position with a currently invalid row, mono will throw an exception.
- // Therefore, we need to make sure that the row position is valid first.
+ // to set a cursor column position with a currently invalid row, mono will throw an exception.
+ // Therefore, we need to make sure that the row position is valid first.
int top = System.Console.CursorTop;
if (top < 0)
+ {
System.Console.CursorTop = 0;
- else if (top >= System.Console.BufferHeight)
- System.Console.CursorTop = System.Console.BufferHeight - 1;
+ }
+ else
+ {
+ int bh = System.Console.BufferHeight;
+ // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
+ if (bh > 0 && top >= bh)
+ System.Console.CursorTop = bh - 1;
+ }
if (left < 0)
+ {
left = 0;
- if (left >= System.Console.BufferWidth)
- left = System.Console.BufferWidth - 1;
+ }
+ else
+ {
+ int bw = System.Console.BufferWidth;
+
+ // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
+ if (bw > 0 && left >= bw)
+ left = bw - 1;
+ }
System.Console.CursorLeft = left;
@@ -183,7 +214,7 @@ namespace OpenSim.Framework.Console
System.Console.Write("{0}", prompt);
SetCursorTop(new_y);
- SetCursorLeft(new_x);
+ SetCursorLeft(new_x);
}
}
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 48435cb..ec33b5e 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1441,4 +1441,4 @@ namespace OpenSim.Framework
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
}
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From b7457a0a5d70667d741c03483ef00955f604c16f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sun, 18 Apr 2010 19:16:41 +0100
Subject: Update OpenMetaverse libraries to those used in master as of commit
9a781e7 This removes Mono.Security.dll which might help with Mono 2.6.3
compatability issues (notwithstanding the sqlite problem)
---
bin/Mono.Security.dll | Bin 289792 -> 0 bytes
bin/OpenMetaverse.Http.dll | Bin 36864 -> 0 bytes
bin/OpenMetaverse.StructuredData.dll | Bin 102400 -> 102400 bytes
bin/OpenMetaverse.dll | Bin 1650688 -> 1691648 bytes
bin/OpenMetaverseTypes.dll | Bin 102400 -> 106496 bytes
5 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 bin/Mono.Security.dll
delete mode 100644 bin/OpenMetaverse.Http.dll
diff --git a/bin/Mono.Security.dll b/bin/Mono.Security.dll
deleted file mode 100644
index c027c19..0000000
Binary files a/bin/Mono.Security.dll and /dev/null differ
diff --git a/bin/OpenMetaverse.Http.dll b/bin/OpenMetaverse.Http.dll
deleted file mode 100644
index dbbe4d3..0000000
Binary files a/bin/OpenMetaverse.Http.dll and /dev/null differ
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll
index f3244f6..f4992a2 100644
Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll
index edbf3ce..8751bfc 100644
Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll
index 95d6021..6c6440e 100644
Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ
--
cgit v1.1
From 43acd99bb38de4568614e8ae88ea2daa6797f37d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sun, 18 Apr 2010 19:19:50 +0100
Subject: Slightly tweak README to account for the fact that first-time
standalone users may effectively set up their avatar as 'master avatar' in
the region configuration stage.
---
README.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.txt b/README.txt
index ed59bf5..f1a71be 100644
--- a/README.txt
+++ b/README.txt
@@ -59,7 +59,8 @@ Once you are presented with a prompt that looks like:
You have successfully started OpenSim.
-Before you can log in you will need to create a user account. You can do
+Before you can log in you will need to create a user account if you didn't already create
+your user as the "Master Avatar" during the region configuration stage. You can do
this by running the "create user" command on the OpenSim console. This will
ask you a series of questions such as first name, last name and password.
--
cgit v1.1