google-code-export / smslib

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

SMPPGateway - TON & NPI - code bug #532

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there just found a bug in the SMPPGateway - org.smslib.smsserver.gateways

create() and getBindAttributes()

The NPI where using the TON values, causing problems when the number doesnt 
exists in the NPI values. (EX: TON = 5, causes gateway error)

It's a classic Copy/Paste error.

Fix change in 3 places:

NumberingPlanIndicator 
numberingPlanIndicator=(npi==null)?NumberingPlanIndicator.UNKNOWN:NumberingPlanI
ndicator.valueOf(Byte.parseByte(ton));

to:

NumberingPlanIndicator 
numberingPlanIndicator=(npi==null)?NumberingPlanIndicator.UNKNOWN:NumberingPlanI
ndicator.valueOf(Byte.parseByte(npi));

Original issue reported on code.google.com by tiago.pe...@gmail.com on 3 Oct 2013 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by admin@smslib.org on 1 Jan 2014 at 9:25

GoogleCodeExporter commented 9 years ago
https://github.com/smslib/smslib-v3/pull/2

Original comment by admin@smslib.org on 2 Jan 2014 at 12:06