smslib receives inbound messages either via unsolicited notifications or via
the cnmi emulator.
If unsolicited notification mode is active the cnmi emulator is disabled.
I suggest to do some occasional polling of the modem to be sure no message has
been missed.
I propose a minor modification to the process method of the
AModemDriver.KeepAlive class
Updated code (my modifications between WIM STEVENS - of course this indication
may be removed if the change is accepted)
public void process() throws Exception
{
try
{
if (!isConnected()) return;
if (getGateway().getStatus() == GatewayStatuses.STARTED)
{
synchronized (getSYNCCommander())
{
if (!isConnected()) return;
try
{
Logger.getInstance().logDebug("Keep alive check.", null, getGateway().getGatewayId());
if (!getGateway().getATHandler().isAlive()) getGateway().setStatus(GatewayStatuses.RESTART);
// Wim Stevens
// Wake up the async message processor if cnmi emulator is disabled
if (! getCnmiEmulationProcessor().isEnabled() ) {
getAsyncMessageProcessor().setProcess();
}
// End of Wim Stevens
}
catch (Exception e)
{
getGateway().setStatus(GatewayStatuses.RESTART);
}
}
}
}
catch (Exception e)
{
Logger.getInstance().logError("ModemDriver: KeepAlive Error.", e, getGateway().getGatewayId());
getGateway().setStatus(GatewayStatuses.RESTART);
}
}
Original issue reported on code.google.com by wim.stev...@gmail.com on 20 Mar 2012 at 10:24
Original issue reported on code.google.com by
wim.stev...@gmail.com
on 20 Mar 2012 at 10:24