Removed all the trailing residue from the mutexes, fixed a Logout bug with closing the sim socket
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@395 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
namespace libsecondlife
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
namespace libsecondlife
|
||||
|
||||
@@ -30,7 +30,6 @@ using System.Timers;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Security.Cryptography;
|
||||
using Nwc.XmlRpc;
|
||||
using Nii.JSON;
|
||||
@@ -205,7 +204,7 @@ namespace libsecondlife
|
||||
{
|
||||
return;
|
||||
}
|
||||
Thread.Sleep(10);
|
||||
System.Threading.Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -380,8 +379,8 @@ namespace libsecondlife
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
Client.Log("Socket error, shutting down " + this.Region.Name +
|
||||
" (" + endPoint.ToString() + ")", Helpers.LogLevel.Error);
|
||||
Client.Log(endPoint.ToString() + " socket is closed, shutting down " + this.Region.Name,
|
||||
Helpers.LogLevel.Info);
|
||||
|
||||
connected = false;
|
||||
Network.DisconnectSim(this);
|
||||
@@ -989,6 +988,8 @@ namespace libsecondlife
|
||||
return;
|
||||
}
|
||||
|
||||
Client.Log("Logging out", Helpers.LogLevel.Info);
|
||||
|
||||
DisconnectTimer.Stop();
|
||||
connected = false;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
namespace libsecondlife
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Threading;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
@@ -70,8 +69,6 @@ namespace SLAccountant
|
||||
|
||||
// libsecondlife instance
|
||||
private SecondLife client;
|
||||
// Mutex for locking the listview
|
||||
Mutex lstFindMutex;
|
||||
|
||||
public frmSLAccountant()
|
||||
{
|
||||
@@ -366,23 +363,21 @@ namespace SLAccountant
|
||||
{
|
||||
DirPeopleReplyPacket reply = (DirPeopleReplyPacket)packet;
|
||||
|
||||
lstFindMutex.WaitOne();
|
||||
|
||||
foreach (DirPeopleReplyPacket.QueryRepliesBlock block in reply.QueryReplies)
|
||||
lock (lstFind)
|
||||
{
|
||||
ListViewItem listItem = new ListViewItem(new string[] {
|
||||
|
||||
foreach (DirPeopleReplyPacket.QueryRepliesBlock block in reply.QueryReplies)
|
||||
{
|
||||
ListViewItem listItem = new ListViewItem(new string[] {
|
||||
Helpers.FieldToString(block.FirstName) + " " + Helpers.FieldToString(block.LastName),
|
||||
(block.Online ? "Yes" : "No"), block.AgentID.ToString() });
|
||||
lstFind.Items.Add(listItem);
|
||||
lstFind.Items.Add(listItem);
|
||||
}
|
||||
}
|
||||
|
||||
lstFindMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
private void frmSLAccountant_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
lstFindMutex = new Mutex(false, "lstFindMutex");
|
||||
|
||||
client = new SecondLife();
|
||||
|
||||
// Install our packet handlers
|
||||
|
||||
@@ -4,8 +4,8 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using System.Threading;
|
||||
using Nwc.XmlRpc;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
|
||||
Reference in New Issue
Block a user