Fix a null data block in DirClassifiedReply packet, preventing a session

crash in search.
Fixes Mantis #3952
trunk
Melanie Thielker 2009-07-28 18:46:45 +00:00
parent b008865110
commit 64c874a951
2 changed files with 5 additions and 0 deletions

View File

@ -493,6 +493,7 @@ namespace OpenSim.Framework
public uint creationDate; public uint creationDate;
public uint expirationDate; public uint expirationDate;
public int price; public int price;
public uint Status;
} }
public struct DirLandReplyData public struct DirLandReplyData

View File

@ -10243,11 +10243,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
packet.QueryReplies = new DirClassifiedReplyPacket.QueryRepliesBlock[ packet.QueryReplies = new DirClassifiedReplyPacket.QueryRepliesBlock[
data.Length]; data.Length];
packet.StatusData = new DirClassifiedReplyPacket.StatusDataBlock[
data.Length];
int i = 0; int i = 0;
foreach (DirClassifiedReplyData d in data) foreach (DirClassifiedReplyData d in data)
{ {
packet.QueryReplies[i] = new DirClassifiedReplyPacket.QueryRepliesBlock(); packet.QueryReplies[i] = new DirClassifiedReplyPacket.QueryRepliesBlock();
packet.StatusData[i] = new DirClassifiedReplyPacket.StatusDataBlock();
packet.QueryReplies[i].ClassifiedID = d.classifiedID; packet.QueryReplies[i].ClassifiedID = d.classifiedID;
packet.QueryReplies[i].Name = packet.QueryReplies[i].Name =
Utils.StringToBytes(d.name); Utils.StringToBytes(d.name);
@ -10255,6 +10258,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
packet.QueryReplies[i].CreationDate = d.creationDate; packet.QueryReplies[i].CreationDate = d.creationDate;
packet.QueryReplies[i].ExpirationDate = d.expirationDate; packet.QueryReplies[i].ExpirationDate = d.expirationDate;
packet.QueryReplies[i].PriceForListing = d.price; packet.QueryReplies[i].PriceForListing = d.price;
packet.StatusData[i].Status = d.Status;
i++; i++;
} }