[Slim-Checkins] r8861 - /trunk/server/Slim/Buttons/Common.pm

dsully at svn.slimdevices.com dsully at svn.slimdevices.com
Tue Aug 8 10:43:03 PDT 2006


Author: dsully
Date: Tue Aug  8 10:43:02 2006
New Revision: 8861

URL: http://svn.slimdevices.com?rev=8861&view=rev
Log:
Bug: N/A
Description: Fix an uninitialized warning.

Modified:
    trunk/server/Slim/Buttons/Common.pm

Modified: trunk/server/Slim/Buttons/Common.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Common.pm?rev=8861&r1=8860&r2=8861&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Common.pm (original)
+++ trunk/server/Slim/Buttons/Common.pm Tue Aug  8 10:43:02 2006
@@ -1389,15 +1389,21 @@
 
 sub _periodicUpdate {
 	my $client = shift;
-	my $update = $client->param('modeUpdateInterval');
-	my $update2 = ($client->param('screen2') eq 'periodic');
+
+	my $update  = $client->param('modeUpdateInterval');
+	my $update2 = undef;
+
+	if ($client->param('screen2') && $client->param('screen2') eq 'periodic') {
+
+		$update2 = 1;
+	}
 
 	# if params not set then no longer required
 	return unless ($update || $update2);
-	
+
 	# schedule the next update time, skip if running late
-	my $time = $client->periodicUpdateTime();
-	my $timenow = Time::HiRes::time();
+	my $time     = $client->periodicUpdateTime();
+	my $timenow  = Time::HiRes::time();
 	my $interval = $update || 1;
 
 	do {
@@ -1405,21 +1411,22 @@
 	} while ($time < $timenow);
 
 	Slim::Utils::Timers::setTimer($client, $time, \&_periodicUpdate, $client);
+
 	$client->periodicUpdateTime($time);
 
-	unless ($client->display->updateMode()) {
-		# updates not blocked
-
-		if ($update) {
-			$client->display->update();
-		}
-
-		if ($update2 && !$client->display->animateState() && (my $linefunc = $client->display->lines2periodic()) ) {
-				$client->display->update({ 'screen2' => &$linefunc($client) });
-		}
-	}
-}
-
+	if ($client->display->updateMode) {
+		return;
+	}
+
+	# updates not blocked
+	if ($update) {
+		$client->display->update();
+	}
+
+	if ($update2 && !$client->display->animateState() && (my $linefunc = $client->display->lines2periodic()) ) {
+		$client->display->update({ 'screen2' => &$linefunc($client) });
+	}
+}
 
 1;
 



More information about the checkins mailing list