xinbc / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

Automatically configure E-bit when 3000 >= result code < 4000 #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Diameter RFC indicates that the message E-bit should be set when 3000 >= 
result code < 4000

Fix from Alexandre:
add to 
https://code.google.com/p/jdiameter/source/browse/core/jdiameter/impl/src/main/j
ava/org/jdiameter/client/impl/controller/PeerImpl.java#712 the following:

try {
  long resultCode = message.getResultCode().getUnsigned32();
  message.setError(resultCode >= 3000 && resultCode < 4000);
}
catch (Exception e) {
  logger.debug("Unable to retrieve Result-Code from answer. Not setting ERROR bit.");
}

Original issue reported on code.google.com by richgood...@gmail.com on 9 Oct 2013 at 11:47

GoogleCodeExporter commented 9 years ago

Original comment by brainslog on 12 Dec 2013 at 11:13

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 2d73ff9f4b65.

Applied above fix and commented an setError usage which may be misleading 
(wouldn't cause issues as the fix overwrites any misusage).

Original comment by brainslog on 12 Dec 2013 at 11:58