X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fcodec%2FMessage.hpp;h=a3916f74b98bfded199bdcf729987c463b1f13a7;hb=4552131b751399a8b4fd323f5547f91c7cb0f978;hp=6ec6e3a620119899d2faaa0890b3d25dc51d8ae2;hpb=129af2a9a7c287843be5bd443c5b1ad9b08438a8;p=anna.git diff --git a/include/anna/diameter/codec/Message.hpp b/include/anna/diameter/codec/Message.hpp index 6ec6e3a..a3916f7 100644 --- a/include/anna/diameter/codec/Message.hpp +++ b/include/anna/diameter/codec/Message.hpp @@ -244,18 +244,20 @@ public: /** Sets/unsets E bit activation. Application should not have to use this because dictionary information is used in order to configure flags when Message identifier is stored. + This flag MUST NOT be set in request messages (in this case, it will be ignored). @param activate Activates/deactivates the bit. True by default. */ - void setErrorBit(bool activate = true) throw() { if(activate) a_flags |= EBitMask; else a_flags &= (~EBitMask); } + void setErrorBit(bool activate = true) throw() { if(isRequest()) return; if(activate) a_flags |= EBitMask; else a_flags &= (~EBitMask); } /** Sets/unsets T bit activation. Application should not have to use this because dictionary information is used in order to configure flags when Message identifier is stored. + This flag MUST NOT be set in answer messages (in this case, it will be ignored). @param activate Activates/deactivates the bit. True by default. */ - void setPotentiallyReTransmittedMessageBit(bool activate = true) throw() { if(activate) a_flags |= TBitMask; else a_flags &= (~TBitMask); } + void setPotentiallyReTransmittedMessageBit(bool activate = true) throw() { if(isAnswer()) return; if(activate) a_flags |= TBitMask; else a_flags &= (~TBitMask); } /** Sets the message application id.