We're using this bl only when removing *some* of data in front of
outcoming_bl, so there's no need to construct it each time we empty
*entire* outcoming_bl.
Though something more efficient than tmp bufferlist and splice is
probably better solution.
Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
// trim already sent for outcoming_bl
if (sent_bytes) {
- bufferlist bl;
if (sent_bytes < outcoming_bl.length()) {
+ bufferlist bl;
outcoming_bl.splice(sent_bytes, outcoming_bl.length()-sent_bytes, &bl);
bl.swap(outcoming_bl);
} else {