aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/OpenSimClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenSimClient.cs')
-rw-r--r--src/OpenSimClient.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs
index f9349db..af4ce0e 100644
--- a/src/OpenSimClient.cs
+++ b/src/OpenSimClient.cs
@@ -98,6 +98,35 @@ namespace OpenSim
98 Transfer.TransferInfo.Params = reqPacket.TransferInfo.Params; 98 Transfer.TransferInfo.Params = reqPacket.TransferInfo.Params;
99 Transfer.TransferInfo.Size = (int)AssetResponse.ContentLength; 99 Transfer.TransferInfo.Size = (int)AssetResponse.ContentLength;
100 Transfer.TransferInfo.TransferID = reqPacket.TransferInfo.TransferID; 100 Transfer.TransferInfo.TransferID = reqPacket.TransferInfo.TransferID;
101
102 OutPacket(Transfer);
103
104 TransferPacketPacket TransferPacket = new TransferPacketPacket();
105 TransferPacket.TransferData.Packet = 0;
106 TransferPacket.TransferData.ChannelType = 2;
107 TransferPacket.TransferData.TransferID=reqPacket.TransferInfo.TransferID;
108
109 if(AssetResponse.ContentLength>1000) {
110 byte[] chunk = new byte[1000];
111 Array.Copy(idata,chunk,1000);
112 TransferPacket.TransferData.Data = chunk;
113 TransferPacket.TransferData.Status = 0;
114 OutPacket(TransferPacket);
115
116 TransferPacket = new TransferPacketPacket();
117 TransferPacket.TransferData.Packet = 1;
118 TransferPacket.TransferData.ChannelType = 2;
119 TransferPacket.TransferData.TransferID = reqPacket.TransferInfo.TransferID;
120 byte[] chunk1 = new byte[(idata.Length-1000)];
121 Array.Copy(idata, 1000, chunk1, 0, chunk1.Length);
122 TransferPacket.TransferData.Data = chunk1;
123 TransferPacket.TransferData.Status = 1;
124 OutPacket(TransferPacket);
125 } else {
126 TransferPacket.TransferData.Status = 1;
127 TransferPacket.TransferData.Data = idata;
128 OutPacket(TransferPacket);
129 }
101 } 130 }
102 131
103 public void ProcessInPacket(Packet Pack) { 132 public void ProcessInPacket(Packet Pack) {
@@ -109,7 +138,11 @@ namespace OpenSim
109 case PacketType.RegionHandshakeReply: 138 case PacketType.RegionHandshakeReply:
110 OpenSim_Main.local_world.SendLayerData(this); 139 OpenSim_Main.local_world.SendLayerData(this);
111 break; 140 break;
141 case PacketType.AgentWearablesRequest:
142 ClientAvatar.SendInitialAppearance();
143 break;
112 case PacketType.TransferRequest: 144 case PacketType.TransferRequest:
145 Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request");
113 // We put transfer requests into a big queue and then spawn a thread for each new one 146 // We put transfer requests into a big queue and then spawn a thread for each new one
114 TransferRequestPacket transfer = (TransferRequestPacket)Pack; 147 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
115 AssetRequests.Enqueue(transfer); 148 AssetRequests.Enqueue(transfer);