From 2627baf168a25aecd7980b0a16d6bebee4c17261 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 14 Apr 2008 13:49:03 +0000 Subject: [PATCH] Added check. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10426 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/SIPackages.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-si/modules/SIPackages.pm b/gosa-si/modules/SIPackages.pm index 6542eeaa0..b14caeafb 100644 --- a/gosa-si/modules/SIPackages.pm +++ b/gosa-si/modules/SIPackages.pm @@ -918,7 +918,11 @@ sub hardware_config { sub server_matches { my $target = shift; - my $target_ip = sprintf("%s", $target =~ /^([0-9\.]*?):.*$/); + my $target_ip = ($1) if $target =~ /^([0-9\.]*?):.*$/; + if(!defined($target_ip) or length($target_ip) == 0) { + return; + } + my $result = 0; if($server_ip eq $target_ip) { -- 2.30.2