Skip to content

Commit

Permalink
Fixed Issue twitter-archive#33 Add submit_multi request/response supp…
Browse files Browse the repository at this point in the history
…ort - part 2
  • Loading branch information
vetss committed Nov 13, 2016
1 parent 4ac58e0 commit 652bf2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/cloudhopper/smpp/pdu/SubmitMulti.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/
public class SubmitMulti extends BaseSm<SubmitMultiResp> {

private byte numberOfDest;
private int numberOfDest;

private List<Address> destAddresses = new ArrayList<Address>();
private List<String> destDistributionList = new ArrayList<String>();
Expand Down Expand Up @@ -114,9 +114,9 @@ public int getNumberOfDest(){
public void readBody(ChannelBuffer buffer) throws UnrecoverablePduException, RecoverablePduException {
this.serviceType = ChannelBufferUtil.readNullTerminatedString(buffer);
this.sourceAddress = ChannelBufferUtil.readAddress(buffer);
this.numberOfDest = buffer.readByte();

this.numberOfDest = buffer.readByte() & 0xFF;

for(int count=0;count<this.numberOfDest; count++){
byte flag = buffer.readByte();
if(flag==SmppConstants.SME_ADDRESS){
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/cloudhopper/smpp/pdu/SubmitMultiResp.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
public class SubmitMultiResp extends BaseSmResp {

private byte numberOfUnsucessfulDest;
private int numberOfUnsucessfulDest;
private List<UnsucessfulSME> unsucessfulSmes = new ArrayList<UnsucessfulSME>();

/**
Expand All @@ -60,7 +60,7 @@ public void addUnsucessfulSME(UnsucessfulSME unsucessfulSME)
this.unsucessfulSmes.add(unsucessfulSME);
}

public byte getNumberOfUnsucessfulDest() {
public int getNumberOfUnsucessfulDest() {
return numberOfUnsucessfulDest;
}

Expand All @@ -73,7 +73,7 @@ public void readBody(ChannelBuffer buffer)
throws UnrecoverablePduException, RecoverablePduException {
super.readBody(buffer);

this.numberOfUnsucessfulDest = buffer.readByte();
this.numberOfUnsucessfulDest = buffer.readByte() & 0xFF;

for (int count = 0; count < this.numberOfUnsucessfulDest; count++) {
Address address = ChannelBufferUtil.readAddress(buffer);
Expand Down

0 comments on commit 652bf2c

Please sign in to comment.