diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 00:45:57 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 00:45:57 +0000 |
commit | 985732844da6028e541ffad0dcc3d69365570e25 (patch) | |
tree | 1a3a908a6db1d4775513148472ec2c7f00ce49f6 | |
parent | 668e10731c7c93eda83f0ee5f0e1a7077fa8ade3 (diff) | |
download | chromium_src-985732844da6028e541ffad0dcc3d69365570e25.zip chromium_src-985732844da6028e541ffad0dcc3d69365570e25.tar.gz chromium_src-985732844da6028e541ffad0dcc3d69365570e25.tar.bz2 |
Fix minor error it SDCH filter code (hidden by filter control code)
The controlling code in filter.cc doesn't significantly distinguish
FILTER_OK and FILTER_NEEDS_MORE_DATA, but we *should* transition
to a semantic where FILTER_OK becomes instead "FILTER_NEEDS_OUTPUT_SPACE"
and then we'd need to do this uniformly for all filter code.
We *could* then improve the driving filter code (for example, not have
to sniff output buffer usage to deduce that the filter wanted to be
called again to emit more data).
r=huanr
Review URL: http://codereview.chromium.org/28193
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10544 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/sdch_filter.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/base/sdch_filter.cc b/net/base/sdch_filter.cc index 9309de6..b0f19a6 100644 --- a/net/base/sdch_filter.cc +++ b/net/base/sdch_filter.cc @@ -250,6 +250,7 @@ Filter::FilterStatus SdchFilter::ReadFilteredData(char* dest_buffer, amount = OutputBufferExcess(dest_buffer, available_space); *dest_len += amount; dest_buffer += amount; + available_space -= amount; if (0 == available_space && !dest_buffer_excess_.empty()) return FILTER_OK; return FILTER_NEED_MORE_DATA; |