nguyenbahuong / smslib

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

java.lang.NullPointerException after stop IPModem #471

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you connect to a telnet was not available when starting the service, you 
can not stop the server.

Caused by: java.lang.NullPointerException
    at org.smslib.modem.IPModemDriver.disconnectPort(IPModemDriver.java:114)
    at org.smslib.modem.AModemDriver.disconnect(AModemDriver.java:283)
    at org.smslib.modem.ModemGateway.stopGateway(ModemGateway.java:200)
    at org.smslib.Service.stopService(Service.java:356)
    at org.jboss.as.sms.server.impl.SMSServerImpl.closePart(SMSServerImpl.java:346)
    at org.jboss.as.sms.server.impl.SMSServerImpl.access$500(SMSServerImpl.java:39)
    at org.jboss.as.sms.server.impl.SMSServerImpl$LiveActivation.close(SMSServerImpl.java:575)
    at org.jboss.as.sms.server.impl.SMSServerImpl.stop(SMSServerImpl.java:202)
    at org.jboss.as.sms.server.impl.SMSServerImpl.stop(SMSServerImpl.java:154)
    at org.jboss.as.sms.subsystem.SMSLibService.stop(SMSLibService.java:180)

Original issue reported on code.google.com by Waldemar.Klaczynski on 9 Mar 2012 at 1:23

GoogleCodeExporter commented 9 years ago
The proposed change:

--- sms-lib/src/main/java/org/smslib/modem/IPModemDriver.java
+++ sms-lib/src/main/java/org/smslib/modem/IPModemDriver.java
@@ -111,10 +111,12 @@
        {
            if (this.tc != null) this.tc.disconnect();
            this.tc = null;
+                        if(peeker != null){
            this.peeker.interrupt();
            this.peeker.join();
        }
    }
+   }

    @Override
    protected void clear() throws IOException

Original comment by Waldemar.Klaczynski on 9 Mar 2012 at 1:26

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 10 Mar 2012 at 12:05

GoogleCodeExporter commented 9 years ago
r2332

Original comment by T.Delenikas on 10 Mar 2012 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 31 Mar 2012 at 8:03