ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/loop.C
(Generate patch)

Comparing deliantra/server/socket/loop.C (file contents):
Revision 1.57 by root, Sun Jul 1 06:07:03 2007 UTC vs.
Revision 1.58 by root, Thu Jul 5 10:34:08 2007 UTC

199 199
200 if (facedata *d = face_data (ix.idx, faceset)) 200 if (facedata *d = face_data (ix.idx, faceset))
201 { 201 {
202 if (fxix) 202 if (fxix)
203 { 203 {
204 // 9 bytes is enough for fx_FFFOOO, 240 leaves some room for image data 204 // only transfer something if the amount of data transferred
205 // has a healthy relation to the header overhead
206 if (avail <= 40)
207 break;
208
209 // 9 bytes is enough for fx_FFFOOO
205 int chunk = min (min (avail - 240, MAXSOCKBUF - 9), ix.ofs); 210 int chunk = min (min (avail, MAXSOCKBUF - 9), (int)ix.ofs);
206 211
207 if (chunk <= 0) 212 if (chunk <= 0)
208 break; 213 break;
209 214
210 ix.ofs -= chunk; 215 ix.ofs -= chunk;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines