Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2540 from J-N-K/fix-fritzbox-exception
Browse files Browse the repository at this point in the history
Fix issue #1845
  • Loading branch information
teichsta committed May 4, 2015
2 parents f475b17 + b0dc7af commit a4f3fce
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
* and outgoing calls, as well as for connections and disconnections.
*
* @author Kai Kreuzer
* @author Jan N. Klug
* @since 0.7.0
*/
public class FritzboxBinding extends
Expand Down Expand Up @@ -451,7 +452,11 @@ public void run() {
}
}
} catch (IOException e) {
logger.error("Lost connection to FritzBox", e);
if (interrupted) {
logger.info("Lost connection to Fritzbox because of interrupt");
} else {
logger.error("Lost connection to FritzBox", e);
}
break;
}
}
Expand All @@ -473,7 +478,7 @@ private MonitorEvent parseMonitorEvent(String line) {
event.timestamp = sections[0];
event.eventType = sections[1];
event.connectionId = sections[2];

if (event.eventType.equals("RING")) {
event.externalNo = sections[3];
event.internalNo = sections[4];
Expand Down Expand Up @@ -525,7 +530,6 @@ private void handleEventType(MonitorEvent event, String bindingType) {
.getItemNamesForType(bindingType)) {
Class<? extends Item> itemType = provider
.getItemType(itemName);

org.openhab.core.types.State state = null;
if (event.eventType.equals("DISCONNECT")) {
state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.OFF
Expand Down

0 comments on commit a4f3fce

Please sign in to comment.