Fix Mantis #2215: llGetNotecardLine() not detecting EOF under DNE

0.6.0-stable
Homer Horwitz 2008-09-20 14:46:09 +00:00
parent 6a691df1a6
commit 4d8544dada
1 changed files with 23 additions and 9 deletions

View File

@ -8252,8 +8252,9 @@ namespace OpenSim.Region.ScriptEngine.Common
// line index starts at zero // line index starts at zero
if ((!String.IsNullOrEmpty(notecardLines[0])) && if ((!String.IsNullOrEmpty(notecardLines[0])) &&
(line >= 0) && (line >= 0))
(line < notecardLines.Length)) {
if (line < notecardLines.Length)
{ {
// ScriptSleep(100); // ScriptSleep(100);
UUID rq = UUID.Random(); UUID rq = UUID.Random();
@ -8266,6 +8267,19 @@ namespace OpenSim.Region.ScriptEngine.Common
return tid.ToString(); return tid.ToString();
} }
else else
{
// ScriptSleep(100);
UUID rq = UUID.Random();
UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
m_localID, m_itemID, rq.ToString());
m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.DataserverReply(rq.ToString(), BuiltIn_Commands_BaseClass.EOF);
return tid.ToString();
}
}
else
{ {
// ScriptSleep(100); // ScriptSleep(100);
return UUID.Zero.ToString(); return UUID.Zero.ToString();