Hello Thanasis,
Wouldn't it be better to add a setting to smslib that would disable
the unsolicited notifications. Or disable the unsolicited
notifications in case the CNMI emulator has been enabled.
If unsolicited notifications and the emulator are both enabled you may
receive messages twice (when the emulator period is low). This
happens when the message is received first as an unsolicited
notification. Assume the emulator wakes up one second later. The
emulator is blocked on some synchronized object. Then the message is
returned to the application (sms4domino). Before sms4domino is able
to perform the delete of the message the cnmi emulator has picked up
the message a second time.
Code for AModemDriver.connect could be
if (!getGateway().getATHandler().setIndications())
{
Logger.getInstance().logWarn("Callback
indications were *not* set
succesfully!", null, getGateway().getGatewayId());
getCnmiEmulationProcessor().enable();
}
else
{
if
(getGateway().getATHandler().getIndications().getMode().equals("0"))
getCnmiEmulationProcessor().enable();
}
if (getCnmiEmulationProcessor().isEnabled ( ) ) {
getGateway().getATHandler().clearIndications
( ) // this would be a new method to clear the unsolicited messages
}
or have a special setting
What is your opinion ?
Regards
Wim Stevens
--
You received this message because you are subscribed to the Google Groups
"SMSLib Discussion Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/smslib?hl=en.