diff options
| author | Gordon Sim <gsim@apache.org> | 2010-05-14 16:08:33 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-05-14 16:08:33 +0000 |
| commit | 221df8f0a2a7b8e820b6c2b75daef2d527a74ea2 (patch) | |
| tree | 1e10e268e386ab6b392339eac1703cb993c4fea4 /cpp/src/qpid/framing/AMQFrame.h | |
| parent | ba63eb36f77ccce19d4849c29532566f8e7837fd (diff) | |
| download | qpid-python-221df8f0a2a7b8e820b6c2b75daef2d527a74ea2.tar.gz | |
This reverts r736810. In my testing (admittedly limited) I did not observe any benefot from the optimisation. It causes a bug where concurrent calls to the non-const getBody() method can result in the encodedSize() method returning 0. This has implications e.g. for store modules where the message size may be incorrectly reported resulting in buffer overruns.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@944329 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/AMQFrame.h')
| -rw-r--r-- | cpp/src/qpid/framing/AMQFrame.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/qpid/framing/AMQFrame.h b/cpp/src/qpid/framing/AMQFrame.h index 29e368b671..d7b04f0f65 100644 --- a/cpp/src/qpid/framing/AMQFrame.h +++ b/cpp/src/qpid/framing/AMQFrame.h @@ -43,8 +43,8 @@ class AMQFrame : public AMQDataBlock ChannelId getChannel() const { return channel; } void setChannel(ChannelId c) { channel = c; } - QPID_COMMON_EXTERN AMQBody* getBody(); - QPID_COMMON_EXTERN const AMQBody* getBody() const; + AMQBody* getBody() { return body.get(); } + const AMQBody* getBody() const { return body.get(); } AMQMethodBody* getMethod() { return getBody() ? getBody()->getMethod() : 0; } const AMQMethodBody* getMethod() const { return getBody() ? getBody()->getMethod() : 0; } @@ -102,7 +102,6 @@ class AMQFrame : public AMQDataBlock bool eof : 1; bool bos : 1; bool eos : 1; - mutable uint32_t encodedSizeCache; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const AMQFrame&); |
