Skip to content

Commit

Permalink
Little fix for issue #77 CallGap operation
Browse files Browse the repository at this point in the history
  • Loading branch information
vetss committed Feb 10, 2017
1 parent b6cce6c commit 364f07a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Binary file modified cap/CAPMessagesImplemented.ods
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,16 @@ public void encodeAll(AsnOutputStream asnOs, int tagClass, int tag) throws CAPEx

public void encodeData(AsnOutputStream asnOs) throws CAPException {

if ((this.calledAddressValue == null && this.gapOnService == null && this.calledAddressAndService == null && this.callingAddressAndService == null)
|| (this.calledAddressValue != null && this.gapOnService != null || this.calledAddressAndService != null && this.callingAddressAndService != null)) {
int cnt = 0;
if (this.calledAddressValue != null)
cnt++;
if (this.gapOnService != null)
cnt++;
if (this.calledAddressAndService != null)
cnt++;
if (this.callingAddressAndService != null)
cnt++;
if (cnt != 1) {
throw new CAPException("Error while encoding " + _PrimitiveName + ": One and only one choice must be selected");
}

Expand Down

0 comments on commit 364f07a

Please sign in to comment.