summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb22142)
raw | patch | inline | side by side (parent: eb22142)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 12:14:02 +0000 (13:14 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 12:14:02 +0000 (13:14 +0100) |
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
bindings/perl/Oping.xs | patch | blob | history | |
bindings/perl/lib/Net/Oping.pm | patch | blob | history |
diff --git a/bindings/perl/Oping.xs b/bindings/perl/Oping.xs
index 6fbf49cbc27ba71269c76fa954fd02342c7c0f02..d97d4f82f128486efd43badbd074d63fd4e4157c 100644 (file)
--- a/bindings/perl/Oping.xs
+++ b/bindings/perl/Oping.xs
status = ping_iterator_get_info (iter, PING_INFO_HOSTNAME,
(void *) buffer, &buffer_size);
if (status != 0)
+ {
+ free (buffer);
break;
+ }
XPUSHs (sv_2mortal (newSVpvn(buffer,buffer_size)));
free(buffer);
index 1552ee98cb1aea4669df4758a16bd063a163ee64..838fb589fc41e582c9e633390fc0a6532798b89c 100644 (file)
$status = _ping_send ($obj->{'c_obj'});
if ($status < 0)
{
- print "\$status = $status;\n";
$obj->{'err_msg'} = "" . _ping_get_error ($obj->{'c_obj'});
return;
}
$iter = _ping_iterator_get ($obj->{'c_obj'});
+ if (!$iter)
+ {
+ $obj->{'err_msg'} = "" . _ping_get_error ($obj->{'c_obj'});
+ return;
+ }
+
while ($iter)
{
my $host = _ping_iterator_get_hostname ($iter);