summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbustico2010-03-04 09:37:55 +0000
committerbustico2010-03-04 09:37:55 +0000
commit8a9ebd6320907ca943b2630baea33e8ee60e668f (patch)
tree9e6a7b9b02d4c3a0a1a725af378832c89ee6640b
parent2f351fab323bdae9b7d3e73bf8b0ea6b1ce1a1a0 (diff)
downloadivy-perl-8a9ebd6320907ca943b2630baea33e8ee60e668f.zip
ivy-perl-8a9ebd6320907ca943b2630baea33e8ee60e668f.tar.gz
ivy-perl-8a9ebd6320907ca943b2630baea33e8ee60e668f.tar.bz2
ivy-perl-8a9ebd6320907ca943b2630baea33e8ee60e668f.tar.xz
fix: an internal table used to send direct message was not updated when application disconnects.
-rw-r--r--Ivy.pm23
-rw-r--r--debian/changelog5
2 files changed, 25 insertions, 3 deletions
diff --git a/Ivy.pm b/Ivy.pm
index d64c60f..2ed610f 100644
--- a/Ivy.pm
+++ b/Ivy.pm
@@ -1883,12 +1883,23 @@ sub _removeFileDescriptor ($$$)
# $fd->peerport()));
&$fileEventFunc ($fd, '') ;
delete $self->[sendRegList]->{$fd};
+ delete $self->[sendRegListSrc]->{$fd};
delete $self->[sockList]->{$fd};
delete $self->[bufRecByCnnx]->{$fd};
delete $self->[bufEmiByCnnx]->{$fd};
$fd->close();
+ # remove all occurence of fd from $self->[appliList]
+ foreach my $name (keys %{$self->[appliList]}) {
+ for (my $i=0; $i < scalar (@{$self->[appliList]{$name}}); $i++) {
+ my $fdp = $self->[appliList]{$name}->[$i];
+ if ($fd eq $fdp) {
+ delete ($self->[appliList]{$name}->[$i]);
+ }
+ }
+ }
+
unless (defined $diedAppName) {
warn "Ivy::__removeFileDescriptor (called by $callBy) : disconnection of NONAME\n" if $^W;
return;
@@ -1962,8 +1973,10 @@ TABLE DE REGEXPS :
EOF
foreach my $appSock (keys %{$self->[sendRegListSrc]}) {
-# my $appName = $self->_getNameByFileDes ($appSock);
- print $fh "POUR l'application $nameByHandle{$appSock} : \n";
+ my $appName = $self->_getNameByFileDes ($appSock);
+# my $ap2 = $self->[cnnxion]{$nameByHandle{$appSock}};
+# $ap2 =~ s/^\004//g;
+ print $fh "POUR l'application ${appName}[$nameByHandle{$appSock}] : \n";
print $fh join ("\n", @{$self->[sendRegListSrc]{$appSock}});
print $fh "\n-----------------------------------\n";
}
@@ -2041,6 +2054,10 @@ sub _univSend ($$$)
{
my ($self, $fd, $msg) = @_;
+ unless (defined $fd) {
+ carp "WARN _univSend fd is undefined, message will not be sent\n" if $^W;
+ afficher la call stack
+ }
my $bufEmiRef = \($self->[bufEmiByCnnx]->{$fd});
my $enCongestion = $$bufEmiRef ? 1 : 0;
if (ref $msg) {
@@ -2355,7 +2372,7 @@ sub _getNameByFileDes ($$)
EXT_LOOP:
foreach my $name (keys %{$self->[appliList]}) {
foreach my $fdp (@{$self->[appliList]{$name}}) {
- if ($fd == $fdp) {
+ if ($fd eq $fdp) {
$appName = $name;
last EXT_LOOP;
}
diff --git a/debian/changelog b/debian/changelog
index 83793bb..8c45f14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+ivy-perl (4.25-11) unstable; urgency=low
+
+ * fix : an internal table used to send direct message was not updated when application disconnects. Add 2 messages on the protocol to permits debug by asking an agent to dump his internal tables.
+
+ -- Alexandre Bustico <bustico@cena.fr> Mon, 4 march 2010 10:35:00 +0200
ivy-perl (4.25-10) unstable; urgency=low
* fix (bad) generation of the paquet for lenny and etch