projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New Batch Converter. Fix flags problem regarding may/shouldnot uncertainty
[anna.git]
/
source
/
diameter
/
codec
/
Message.cpp
diff --git
a/source/diameter/codec/Message.cpp
b/source/diameter/codec/Message.cpp
index
4938a03
..
b374b90
100644
(file)
--- a/
source/diameter/codec/Message.cpp
+++ b/
source/diameter/codec/Message.cpp
@@
-234,7
+234,7
@@
void Message::setApplicationId(U32 aid) throw() {
a_applicationId = aid;
// Default behaviour:
a_applicationId = aid;
// Default behaviour:
- if (!getEngine()->
s
electStackWithApplicationId()) return;
+ if (!getEngine()->
hasS
electStackWithApplicationId()) return;
// Adapts for Application-ID stack identifier:
getEngine()->setDictionary(aid);
// Adapts for Application-ID stack identifier:
getEngine()->setDictionary(aid);
@@
-345,10
+345,9
@@
void Message::decode(const anna::DataBlock &db, Message *ptrAnswer) throw(anna::
U24 code = DECODE3BYTES_INDX_VALUETYPE(buffer, 5, U24);
U24 code = DECODE3BYTES_INDX_VALUETYPE(buffer, 5, U24);
- // This is called before setId, and in general before any operation which needs to know about the stack elements.
- setApplicationId(DECODE4BYTES_INDX_VALUETYPE(buffer, 8, U32)); // centralize set, because it could be used for stack selection.
+ a_id = CommandId(code, requestBit() /* based on a_flags */);
- set
Id(CommandId(code, requestBit() /* based on a_flags */));
+ set
ApplicationId(DECODE4BYTES_INDX_VALUETYPE(buffer, 8, U32)); // centralize set, because it could be used for stack selection.
a_hopByHop = DECODE4BYTES_INDX_VALUETYPE(buffer, 12, U32);
a_hopByHop = DECODE4BYTES_INDX_VALUETYPE(buffer, 12, U32);
@@
-771,6
+770,9
@@
void Message::fromXML(const anna::xml::Node* messageNode) throw(anna::RuntimeExc
int i_aux;
unsigned int u_aux;
int i_aux;
unsigned int u_aux;
+ // Clear the message
+ clear();
+
if(version) {
i_aux = version->getIntegerValue();
if(version) {
i_aux = version->getIntegerValue();
@@
-784,8
+786,8
@@
void Message::fromXML(const anna::xml::Node* messageNode) throw(anna::RuntimeExc
}
// Application-id
}
// Application-id
- // This is called before
setId, and in general before any operation which needs to know about the stack elements.
- setApplicationId(appid->getIntegerValue());
// this could set the dictionary...
+ // This is called before
any operation which needs to know about the stack elements (this could set the dictionary)
+ setApplicationId(appid->getIntegerValue());
// Dictionary
const stack::Dictionary * dictionary = getEngine()->getDictionary();
// Dictionary
const stack::Dictionary * dictionary = getEngine()->getDictionary();
@@
-816,7
+818,7
@@
void Message::fromXML(const anna::xml::Node* messageNode) throw(anna::RuntimeExc
throw anna::RuntimeException(msg, ANNA_FILE_LOCATION);
}
throw anna::RuntimeException(msg, ANNA_FILE_LOCATION);
}
- setId(stackCommand->getId());
+ setId(stackCommand->getId()
, false /* don't clear */
);
// 'P', 'E' and 'T' flags:
bool activateP = pbit ? (pbit->getValue() == "yes") : false;
bool activateE = ebit ? (ebit->getValue() == "yes") : false;
// 'P', 'E' and 'T' flags:
bool activateP = pbit ? (pbit->getValue() == "yes") : false;
bool activateE = ebit ? (ebit->getValue() == "yes") : false;
@@
-867,7
+869,7
@@
void Message::fromXML(const anna::xml::Node* messageNode) throw(anna::RuntimeExc
a_flags = i_aux;
int flagsBCK = a_flags;
// Final assignments
a_flags = i_aux;
int flagsBCK = a_flags;
// Final assignments
-
setId(CommandId(u_code, requestBit() /* based on a_flags */)
);
+
a_id = CommandId(u_code, requestBit() /* based on a_flags */
);
// Flags could have been updated regarding dictionary, but during parsing we must respect xml file:
a_flags = flagsBCK;
}
// Flags could have been updated regarding dictionary, but during parsing we must respect xml file:
a_flags = flagsBCK;
}