diff options
author | Ted Ross <tross@apache.org> | 2009-01-21 18:42:16 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-01-21 18:42:16 +0000 |
commit | 6878134a26bf5b3e9a2b28c9886cb05f47b5718b (patch) | |
tree | 351f9022b43f061e4b023419590eb46638a5a70f /cpp/src | |
parent | 8286d4dca724d72f98e9529d433765a0cebf6222 (diff) | |
download | qpid-python-6878134a26bf5b3e9a2b28c9886cb05f47b5718b.tar.gz |
Enforce a minimum frame-max to avoid really bad things that can happen
if frame-max is set to zero.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736370 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/ConnectionState.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/ConnectionState.h b/cpp/src/qpid/broker/ConnectionState.h index c4c75833bf..373b7d868a 100644 --- a/cpp/src/qpid/broker/ConnectionState.h +++ b/cpp/src/qpid/broker/ConnectionState.h @@ -35,6 +35,9 @@ namespace broker { class ConnectionState : public ConnectionToken, public management::Manageable { + // Minimum allowed frameMax + static const uint32_t MIN_FRAME_MAX = 4096; + protected: sys::ConnectionOutputHandlerPtr out; @@ -50,8 +53,6 @@ class ConnectionState : public ConnectionToken, public management::Manageable federationLink(true) {} - - virtual ~ConnectionState () {} uint32_t getFrameMax() const { return framemax; } @@ -59,7 +60,7 @@ class ConnectionState : public ConnectionToken, public management::Manageable uint16_t getHeartbeatMax() const { return heartbeatmax; } uint64_t getStagingThreshold() const { return stagingThreshold; } - void setFrameMax(uint32_t fm) { framemax = fm; } + void setFrameMax(uint32_t fm) { framemax = std::max(fm, MIN_FRAME_MAX); } void setHeartbeat(uint16_t hb) { heartbeat = hb; } void setHeartbeatMax(uint16_t hbm) { heartbeatmax = hbm; } void setStagingThreshold(uint64_t st) { stagingThreshold = st; } |