Revision: 0df50122a530
Author:   [email protected] <[email protected]>
Date:     Mon Sep 30 17:04:22 2013 UTC
Log: Fixed Issue #289 SccpAddress when persisted has different value for AddressIndicator in .xml

http://code.google.com/p/jss7/source/detail?r=0df50122a530

Modified:
/sccp/sccp-impl/src/main/java/org/mobicents/protocols/ss7/sccp/impl/oam/SccpExecutor.java

=======================================
--- /sccp/sccp-impl/src/main/java/org/mobicents/protocols/ss7/sccp/impl/oam/SccpExecutor.java Tue Jun 18 18:28:02 2013 UTC +++ /sccp/sccp-impl/src/main/java/org/mobicents/protocols/ss7/sccp/impl/oam/SccpExecutor.java Mon Sep 30 17:04:22 2013 UTC
@@ -589,6 +589,15 @@
         AddressIndicator aiObj = new AddressIndicator((byte) ai);
         pc = Integer.parseInt(options[index++]);
         ssn = Integer.parseInt(options[index++]);
+
+        if(aiObj.ssnPresent() && ssn == 0){
+ throw new Exception(String.format("Address Indicator %d indicates that SSN is present, however SSN passed is 0", ai));
+        }
+
+        if(aiObj.pcPresent() && pc == 0){
+ throw new Exception(String.format("Address Indicator %d indicates that PointCode is present, however PointCode passed is 0", ai));
+        }
+
         int tt = Integer.parseInt(options[index++]);
NumberingPlan np = NumberingPlan.valueOf(Integer.parseInt(options[index++])); NatureOfAddress nai = NatureOfAddress.valueOf(Integer.parseInt(options[index++]));

--

--- You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to