diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-10-19 18:57:30 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-10-19 18:57:30 +0000 |
| commit | b97be677001ec35469d080a98ba88276f2300651 (patch) | |
| tree | 2d947cee25396e96ad1a49f43d9de82e04f0f96a /cpp/src/qpid/framing/Buffer.cpp | |
| parent | f25df3a53ca1ef5eec396512fd584823e7f6636d (diff) | |
| download | qpid-python-b97be677001ec35469d080a98ba88276f2300651.tar.gz | |
QPID-651 applied patch from Ted
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@586578 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/Buffer.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/Buffer.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/qpid/framing/Buffer.cpp b/cpp/src/qpid/framing/Buffer.cpp index 758d0b5f3c..eaa4433b5f 100644 --- a/cpp/src/qpid/framing/Buffer.cpp +++ b/cpp/src/qpid/framing/Buffer.cpp @@ -34,8 +34,17 @@ void Buffer::record(){ r_position = position; } -void Buffer::restore(){ +void Buffer::restore(bool reRecord){ + uint32_t savedPosition = position; + position = r_position; + + if (reRecord) + r_position = savedPosition; +} + +void Buffer::reset(){ + position = 0; } uint32_t Buffer::available(){ |
