vintuwei / jss7

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

Bug in PDPContextImpl decoding #287

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is seems to be a bug in the encoding of PDPContextImpl in 2.1.0-SNAPSHOT. 
It throws an exception if sipToPermission is not specified: 
211787 [pool-9-thread-1] ERROR 
org.mobicents.protocols.ss7.map.service.mobility.MAPServiceMobilityImpl - Error 
processing UpdateGprsLocationRequest: null 
java.lang.NullPointerException 
at 
org.mobicents.protocols.ss7.map.service.mobility.subscriberInformation.PDPContex
tImpl.encodeData(PDPContextImpl.java:581) 
at 
org.mobicents.protocols.ss7.map.primitives.SequenceBase.encodeAll(SequenceBase.j
ava:98) 
at 
org.mobicents.protocols.ss7.map.primitives.SequenceBase.encodeAll(SequenceBase.j
ava:91) 
at 
org.mobicents.protocols.ss7.map.service.mobility.subscriberManagement.GPRSSubscr
iptionDataImpl.encodeData(GPRSSubscriptionDataImpl.java:210) 
at 
org.mobicents.protocols.ss7.map.primitives.SequenceBase.encodeAll(SequenceBase.j
ava:98) 
at 
org.mobicents.protocols.ss7.map.service.mobility.subscriberManagement.InsertSubs
criberDataRequestImpl.encodeData(InsertSubscriberDataRequestImpl.java:1211) 
at 
org.mobicents.protocols.ss7.map.service.mobility.MAPDialogMobilityImpl.addInsert
SubscriberDataRequest(MAPDialogMobilityImpl.java:705) 
at 
org.mobicents.protocols.ss7.map.service.mobility.MAPDialogMobilityImpl.addInsert
SubscriberDataRequest(MAPDialogMobilityImpl.java:633) 
at 
com.bodytrace.mobile.hlr.MobilityManager.onUpdateGprsLocationRequest(MobilityMan
ager.java:242) 
at 
org.mobicents.protocols.ss7.map.service.mobility.MAPServiceMobilityImpl.updateGp
rsLocationRequest(MAPServiceMobilityImpl.java:617) 
at 
org.mobicents.protocols.ss7.map.service.mobility.MAPServiceMobilityImpl.processC
omponent(MAPServiceMobilityImpl.java:313) 
at 
org.mobicents.protocols.ss7.map.MAPProviderImpl.doProcessComponent(MAPProviderIm
pl.java:1601) 
at 
org.mobicents.protocols.ss7.map.MAPProviderImpl.processComponents(MAPProviderImp
l.java:1471) 
at 
org.mobicents.protocols.ss7.map.MAPProviderImpl.onTCBegin(MAPProviderImpl.java:6
42) 
at 
org.mobicents.protocols.ss7.tcap.TCAPProviderImpl.deliver(TCAPProviderImpl.java:
277) 
at 
org.mobicents.protocols.ss7.tcap.DialogImpl.processBegin(DialogImpl.java:1312) 
at 
org.mobicents.protocols.ss7.tcap.TCAPProviderImpl.onMessage(TCAPProviderImpl.jav
a:640) 
at 
org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl.route(SccpRoutingContro
l.java:533) 
at 
org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl.translationFunction(Scc
pRoutingControl.java:437) 
at 
org.mobicents.protocols.ss7.sccp.impl.SccpRoutingControl.routeMssgFromMtp(SccpRo
utingControl.java:152) 
at 
org.mobicents.protocols.ss7.sccp.impl.SccpStackImpl.onMtp3TransferMessage(SccpSt
ackImpl.java:858) 
at 
org.mobicents.protocols.ss7.mtp.Mtp3UserPartBaseImpl$MsgTransferDeliveryHandler.
run(Mtp3UserPartBaseImpl.java:259) 
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:722)

The issue seems to be in line 581 of 
jss7/map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility
/subscriberInformation/PDPContextImpl.java.

This should be only executed if this.sipToPermission is not null, but it 
happens unconditionally, triggering a NullPointerException.

Cheers, 
Andy

Original issue reported on code.google.com by serg.vet...@gmail.com on 3 Jun 2013 at 7:03

GoogleCodeExporter commented 9 years ago
Hello!

This is fixed now for 2.0.x-SNAPSHOT and 2.1 (MASTER) branches:

https://code.google.com/p/jss7/source/detail?r=0aed642f228b6e587edb680bbde30b6ab
dbd1e25

Original comment by serg.vet...@gmail.com on 5 Jun 2013 at 10:28