diff --git a/contrib/cussh.pl b/contrib/cussh.pl
index 6da2856d0d8b307387788da48aff2da58cf6353d..3fa410518ef43749eea2c88ce7f93587c47c268d 100755 (executable)
--- a/contrib/cussh.pl
+++ b/contrib/cussh.pl
print $$string . $/;
my ($h, $p, $pi, $t, $ti) =
- $$string =~ m/^(\w+)\/(\w+)(?:-(\w+))?\/(\w+)(?:-(\w+))?\s*/;
+ $$string =~ m#^([^/]+)/([^/-]+)(?:-([^/]+))?/([^/-]+)(?:-([^/]+))?\s*#;
$$string = $';
return if ((! $h) || (! $p) || (! $t));
($id{'host'}, $id{'plugin'}, $id{'type'}) = ($h, $p, $t);
- $id{'plugin_instance'} = $pi if ($pi);
- $id{'type_instance'} = $ti if ($ti);
+ $id{'plugin_instance'} = $pi if defined ($pi);
+ $id{'type_instance'} = $ti if defined ($ti);
return \%id;
}