openhab/openhab — pull request #937 by sumnerboy12 (2014-03-21 09:59:31+00:00)
Title: Fritzbox reconnect issue

If the FritzBox binding is restarted or reconfigured, an exception is thrown due to an attempt to recreate the daily reconnect Quartz job.

2014-03-21 21:41:56 WARN o.o.b.f.i.FritzboxBinding[:193]- Could not create daily reconnection job
org.quartz.ObjectAlreadyExistsException: Unable to store Job : 'FritzBox.Reconnect', because one already exists with this identification.
at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:277)
at org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:249)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:840)
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:250)
at org.openhab.binding.fritzbox.internal.FritzboxBinding.updated(FritzboxBinding.java:190)
at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:183)

This fix checks for the existence of this reconnect job and skips creation if already exists.