~ubuntu-branches/ubuntu/trusty/haproxy/trusty-updates

« back to all changes in this revision

Viewing changes to include/proto/buffers.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20091019223145-rymupk5njs544bvp
ImportĀ upstreamĀ versionĀ 1.3.22

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
{
100
100
        unsigned int data_left;
101
101
 
102
 
        buf->to_forward += bytes;
103
102
        data_left = buf->l - buf->send_max;
104
 
        if (data_left > buf->to_forward)
105
 
                data_left = buf->to_forward;
 
103
        if (data_left >= bytes) {
 
104
                buf->send_max += bytes;
 
105
                return;
 
106
        }
106
107
 
107
 
        buf->to_forward -= data_left;
 
108
        buf->to_forward += bytes - data_left;
108
109
        buf->send_max += data_left;
109
110
}
110
111