diff options
-rw-r--r-- | Ivy.pm | 11 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | example/ivyprobe.pl | 9 |
3 files changed, 21 insertions, 6 deletions
@@ -1,7 +1,7 @@ # # Ivy, Perl interface # -# Copyright 1997-2006 +# Copyright 1997-2008 # Centre d'Études de la Navigation Aérienne # # Authors: Alexandre Bustico <alexandre.bustico@cena.fr> @@ -1519,7 +1519,8 @@ sub _getMessages ($$) # on recupere le couple call back, regexp correspondant # a l'identifiant et on appelle la fonction avec les parametres # traites par la regexp - if (my @cb = @{$self->[recCbList][$id]->[1]}) { + if (ref ($self->[recCbList][$id]) eq 'ARRAY') { + my @cb = @{$self->[recCbList][$id]->[1]}; my $cb = shift @cb; # cleaning $sendername with previous \004 used for connection status @@ -1778,10 +1779,8 @@ sub _removeFileDescriptor ($$$) # uniquement si on est dans le thread principal # sinon le select merde salement sur ce coup my $peerPort = $fd->peerport() ; - if ($peerPort == 0) { -# syswrite ($trace, "_removeFileDescriptor : peerport is NULL, don't do anything\n"); - return; - } + $peerPort = 0 unless defined $peerPort; + # syswrite ($trace, sprintf ("_removeFileDescriptor : suppression dans le fdset de %s[%s]:%d\n", # (gethostbyaddr ($fd->peeraddr(),AF_INET))[0], # join (':', unpack ('C4', $fd->peeraddr())), diff --git a/debian/changelog b/debian/changelog index 7b015ed..8752546 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ivy-perl (4.25-4) unstable; urgency=low + + * New upstream version: * verify validity of data structure before using + it + + -- Alexandre Bustico <bustico@cena.fr> Wed, 13 Fev 2008 14:43:00 +0200 + ivy-perl (4.25-3) unstable; urgency=low * New upstream version: * restrict lexical scope of use bytes pragma diff --git a/example/ivyprobe.pl b/example/ivyprobe.pl index 41efe78..ba095df 100755 --- a/example/ivyprobe.pl +++ b/example/ivyprobe.pl @@ -34,6 +34,8 @@ my $timestamp = 0; my $noReadLineMode ; my $regexpFile; my $classes; +my $messCount=0; + my @classes = (); # for each application gives the number of running instances @@ -125,6 +127,12 @@ $Ivyobj->fileEvent(*STDIN, \&cb); $Ivyobj->mainLoop(); +sub printtime_mess { + return if (!$timestamp); + my ($sec,$min,$hour) = localtime(); + printf "[%02d:%02d:%02d>>%d] ", $hour, $min, $sec, $messCount++; +} + sub printtime { return if (!$timestamp); my ($sec,$min,$hour) = localtime(); @@ -277,6 +285,7 @@ sub callback { my $paramString = ""; if (scalar @param) { $paramString = join ("' '", @param); } + printtime_mess(); print "$appname sent '", $paramString, "'\n"; } |