From 1758d60e2ec00151b41b5f966d6b7f1660a34030 Mon Sep 17 00:00:00 2001 From: Lars Hanisch Date: Wed, 23 Mar 2011 18:16:23 +0100 Subject: don't print log message on 'set timeout' if no device is attached --- dynamicdevice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dynamicdevice.c b/dynamicdevice.c index 2fcb9a4..111c9a1 100644 --- a/dynamicdevice.c +++ b/dynamicdevice.c @@ -357,6 +357,8 @@ void cDynamicDevice::ReadUdevProperties(void) void cDynamicDevice::InternSetGetTSTimeout(int Seconds) { getTSTimeout = Seconds; + if (subDevice == NULL) + return; // no log message if no device is connected if (Seconds == 0) isyslog("dynamite: disable GetTSTimeout on device %s", GetDevPath()); else -- cgit v1.2.3