--- deliantra/server/socket/loop.C 2008/05/06 16:55:26 1.77 +++ deliantra/server/socket/loop.C 2008/12/27 01:25:00 1.78 @@ -184,13 +184,13 @@ max_send = min (max_send, (tcpi.tcpi_snd_cwnd - tcpi.tcpi_unacked + tcpi.tcpi_sacked) * mss); #endif - // if we can split images, round to next-lowest mss - if (fxix) max_send -= max_send % mss; + // round to next-lowest mss + max_send -= max_send % mss; if (ixface.empty ()) { // regularly send a new face when queue is empty - if (bg_scrub && !--bg_scrub && enable_bg_scrub) + if (bg_scrub && !--bg_scrub) while (scrub_idx < faces.size () - 1) { ++scrub_idx; @@ -222,36 +222,28 @@ if (facedata *d = face_data (ix.idx, faceset)) { - if (fxix) - { - // estimate the packet header overhead "ix " + idx + (new)ofs - int pktlen = 3 + ber32::encoded_size (ix.idx) + ber32::encoded_size (ix.ofs); - int chunk = min (avail - packet::hdrlen, MAXSOCKBUF) - pktlen; - - // only transfer something if the amount of data transferred - // has a healthy relation to the header overhead - if (chunk < 64) - break; + // estimate the packet header overhead "ix " + idx + (new)ofs + int pktlen = 3 + ber32::encoded_size (ix.idx) + ber32::encoded_size (ix.ofs); + int chunk = min (avail - packet::hdrlen, MAXSOCKBUF) - pktlen; + + // only transfer something if the amount of data transferred + // has a healthy relation to the header overhead + if (chunk < 64) + break; - chunk = min (chunk, (int)ix.ofs); + chunk = min (chunk, (int)ix.ofs); - ix.ofs -= chunk; + ix.ofs -= chunk; - //fprintf (stderr, "i%dx %6d: %5d+%4d (%4d)\n", fxix, ix.idx,ix.ofs,chunk, ixface.size());//D + //fprintf (stderr, "i%dx %6d: %5d+%4d (%4d)\n", fxix, ix.idx,ix.ofs,chunk, ixface.size());//D - packet sl ("ix"); + packet sl ("ix"); - sl << ber32 (ix.idx) - << ber32 (ix.ofs) - << data (d->data.data () + ix.ofs, chunk); + sl << ber32 (ix.idx) + << ber32 (ix.ofs) + << data (d->data.data () + ix.ofs, chunk); - send_packet (sl); - } - else - { - send_image (ix.idx); - ix.ofs = 0; - } + send_packet (sl); } else ix.ofs = 0;