Commit Graph

4 Commits

Author SHA1 Message Date
Peter A. Bigot d0b5189d1e Envelope: ensure const objects cannot be changed through _body
In commit 00b81949d3 where Message and
Envelope objects were made uncopiable the Envelope _body member was
changed from const char * to char * and a const_cast introduced to
remove the qualifier from the pointer passed to the constructor.

This technically produces undefined behavior when constructing an
Envelope() to publish data from a const buffer.  It also risks future
bugs if a new subclass of Envelope mutates const objects through the
_body pointer.

Envelope does not need to support mutable or owned content.  Move this
capability down to Message which is used in restricted situations where
the body size is set once and its content built up piecewise.
2018-04-20 18:27:53 -05:00
theirix 539128e559 Replaced C-casts with const_cast for Envelope::body_ 2018-04-18 14:59:35 +03:00
Emiel Bruijntjes e0feb17ecc renamed deferredconsumerbase into deferredreceiver, because it is not only a base class for the consumer, but also for other receiving operations: get requests and in the future also for returned messages 2018-02-27 05:08:21 +01:00
Aart Stuurman cf7261add5 Reordered public include files so they are now in include/amqpcpp/. 2018-01-24 01:58:18 +01:00