From: janw Date: Mon, 14 Apr 2008 13:49:03 +0000 (+0000) Subject: Added check. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2627baf168a25aecd7980b0a16d6bebee4c17261;p=gosa.git Added check. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10426 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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) {