From: <cs-...@li...> - 2012-04-04 13:31:54
|
details: http://cs-studio.hg.sourceforge.net/hgweb/cs-studio/cs-studio//hgroot/cs-studio/cs-studio/rev/e396a8f0680d changeset: 14448:e396a8f0680d user: Markus Moeller <mar...@de...> date: Wed Apr 04 15:12:23 2012 +0200 description: o.c.ams.delivery.sms: If a modem check is active and the delivery worker gets the message to start a new one, the old check will be reset and a new check is forced. diffstat: applications/plugins/org.csstudio.ams.delivery.sms/src/org/csstudio/ams/delivery/sms/SmsDeliveryDevice.java | 12 +++++---- 1 files changed, 7 insertions(+), 5 deletions(-) diffs (24 lines): diff -r 2f7c29faf761 -r e396a8f0680d applications/plugins/org.csstudio.ams.delivery.sms/src/org/csstudio/ams/delivery/sms/SmsDeliveryDevice.java --- a/applications/plugins/org.csstudio.ams.delivery.sms/src/org/csstudio/ams/delivery/sms/SmsDeliveryDevice.java Wed Apr 04 14:44:27 2012 +0200 +++ b/applications/plugins/org.csstudio.ams.delivery.sms/src/org/csstudio/ams/delivery/sms/SmsDeliveryDevice.java Wed Apr 04 15:12:23 2012 +0200 @@ -248,13 +248,15 @@ } public void announceDeviceTest(final DeviceTestMessageContent msg) { - if (!testStatus.isActive()) { - testStatus.setDeviceTestMessageContent(msg); - } else { - LOG.info("A modem check is still active. Ignoring the new modem check."); - return; + + // If we have an active check, reset it and force a new check + if (testStatus.isActive()) { + LOG.info("A modem check is still active. Forcing a new modem check."); + testStatus.reset(); } + testStatus.setDeviceTestMessageContent(msg); + final DeviceCheckWorker checkWorker = new DeviceCheckWorker(testStatus, modemInfo, readWaitingPeriod); final Thread checkerThread = new Thread(checkWorker); checkerThread.setName("Checker-Thread"); |