diff options
author | mertz | 2002-06-10 09:36:53 +0000 |
---|---|---|
committer | mertz | 2002-06-10 09:36:53 +0000 |
commit | e64a3a9cbfdf4456161862fc97d5ead307fddcb0 (patch) | |
tree | c9471619c7f3e5856d52f4c6133e23555cf93767 | |
parent | a6cb40bb1196aa3d4d3e48783e7ce32164ba73c9 (diff) | |
download | ivy-perl-e64a3a9cbfdf4456161862fc97d5ead307fddcb0.zip ivy-perl-e64a3a9cbfdf4456161862fc97d5ead307fddcb0.tar.gz ivy-perl-e64a3a9cbfdf4456161862fc97d5ead307fddcb0.tar.bz2 ivy-perl-e64a3a9cbfdf4456161862fc97d5ead307fddcb0.tar.xz |
amélioration de qqs messages d'erruer (pour Ivy::sendDirectMsgs et Ivy::ping)
-rw-r--r-- | Ivy.pm | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -800,7 +800,7 @@ sub sendDirectMsgs my $self = ref($_[0]) eq __PACKAGE__ ? shift : $globalIvy; my ($to, $id, @msgs) = @_; - if (defined ($self->[appliList]{$to})) { + if (defined $to and defined ($self->[appliList]{$to})) { my @fds = @{$self->[appliList]{$to}}; # pour tous les messages foreach my $msg (@msgs) { @@ -812,8 +812,10 @@ sub sendDirectMsgs } } return 1; - } else { - carp "Warning in Ivy::sendDirectMsgs, application $to unknown"; + } + else { + my $to_appli = (defined $to) ? $to : ''; + carp "Warning in Ivy::sendDirectMsgs, application $to_appli unknown"; return 0; } } @@ -838,7 +840,7 @@ sub sendDieTo return 1; } else { - my $to_appli = (defined $to) ? $to : ''; + my $to_appli = (defined $to) ? $to : ''; carp "Warning in Ivy::sendDieTo, application '$to_appli' is unknown" if $^W; return 0; } @@ -851,7 +853,7 @@ sub ping my $self = ref($_[0]) eq __PACKAGE__ ? shift : $globalIvy; my ($to, $timeout) = @_; - if (defined ($self->[appliList]{$to})) { + if (defined $to and defined ($self->[appliList]{$to})) { my @fds = @{$self->[appliList]{$to}}; @@ -861,6 +863,11 @@ sub ping or $self->_removeFileDescriptor ($fd); } } + else { + my $to_appli = (defined $to) ? $to : ''; + carp "Warning in Ivy::ping, application '$to_appli' is unknown" if $^W; + return 0; + } } ############### METHODE MAINLOOP |