nitingautam / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

nullpointer on smppsession-notifyNoActivity #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.Put a break point on the smsc simulator so that a bind response will not
be sent.
2. start the jsmpp application.The nullpointer will occur and then  the
correct response timeout exception.

What is the expected output? What do you see instead?

Exception in thread "Thread-8" java.lang.NullPointerException
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.notifyNoActivity(SMPPSession.java:
583)
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.readPDU(SMPPSession.java:572)
        at
org.jsmpp.session.SMPPSession$PDUReaderWorker.run(SMPPSession.java:538) 

What version of the product are you using? On what operating system?

mac osx /windows xp/ubuntu.........runnning the current trunk code

Please provide any additional information below.

I fixed the nullpointer by just making sure enquireLinkSender was
instantiated(see my attached smppsession). Another way is to simply add a
null check to notifyNoActivity.

private void notifyNoActivity() {
            logger.debug("No activity notified");
                        if(enquireLinkSender!=null){
                enquireLinkSender.enquireLink();
                }
}

Could any of these changes please be added to trunk?I don't want a custom
version of jsmpp that differs from trunk..

Original issue reported on code.google.com by etienne....@gmail.com on 12 Jun 2009 at 9:38

Attachments: