summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoretienne2007-01-24 15:13:12 +0000
committeretienne2007-01-24 15:13:12 +0000
commit70c6ad5dfce33cb7d1cc11e342e5fa706c8fca6a (patch)
tree0a512d2057f542991929c93f7df5e373002e61f4
parentf73271cbff849e59481986aebc3fafb4daeb1ae9 (diff)
downloadivymon-70c6ad5dfce33cb7d1cc11e342e5fa706c8fca6a.zip
ivymon-70c6ad5dfce33cb7d1cc11e342e5fa706c8fca6a.tar.gz
ivymon-70c6ad5dfce33cb7d1cc11e342e5fa706c8fca6a.tar.bz2
ivymon-70c6ad5dfce33cb7d1cc11e342e5fa706c8fca6a.tar.xz
* a new command (ivyreplay) is dedicated to replay. ivymon does
not provide this functionality anymore. * fixed a bug causing the clients bindings list to be empty when ivy version >= 4.18. * removed additional space char in list of messages to send.
-rwxr-xr-xsrc/ivymon22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/ivymon b/src/ivymon
index 8e584d1..4d7ccc5 100755
--- a/src/ivymon
+++ b/src/ivymon
@@ -1032,6 +1032,7 @@ sub removeIvyBinding {
# Functions related to connected applications management
#----------------------------------------------------------------------------------
sub checkClientsStatus {
+
my $appname = $_[3];
my $status = $_[4];
my $host;
@@ -1046,16 +1047,18 @@ sub checkClientsStatus {
$host = $_[5];
$regexp = $host;
}
+ $host =~ s/:.*//;
+ print "status=$status host=$host regexp=$regexp\n";
$appname =~ s/ /_/g;
if ($status eq 'died') {
&removeClient($appname, $host);
} elsif ($status eq 'new') {
&addClient($appname, $host);
} elsif ($status eq 'subscribing') {
- $clientsBindings{$appname}->{$host}++;
- &newBinding($regexp);
+ $clientsBindings{$appname}->{$regexp}++;
+ &addBindingAndMsgToSend($regexp);
} elsif ($status eq 'unsubscribing') {
- $clientsBindings{$appname}->{$host}--;
+ $clientsBindings{$appname}->{$regexp}--;
} else {
carp "In Ivymon, checkClientsStatus function, unknown status <$status>\n";
}
@@ -1239,7 +1242,7 @@ sub showClientBindings {
$t->tagConfigure('1', -background => '#e5e5e5');
my $i = 0;
for my $regexp (sort keys(%{$clientsBindings{$client}})) {
- print "client=$client regexp=$regexp\n";
+ #print "client=$client regexp=$regexp\n";
$t->insert('end', $regexp."\n", $i % 2)
if $clientsBindings{$client}->{$regexp} > 0;
$i++;
@@ -1515,7 +1518,7 @@ sub addBindingInList {
# add a binding in the bindings list and, after some modifications,
# add a new message in the list of messages to send.
-sub newBinding {
+sub addBindingAndMsgToSend {
my $regexp = shift;
return if $regexp eq '(.*)';
@@ -1567,8 +1570,15 @@ sub newBinding {
&addMsgToSend(undef, $msg);
}
-} # end newBinding
+} # end addBindingAndMsgToSend
+
+
+sub removeBindingAndMsgToSend {
+
+ my $regexp = shift;
+ my $host = shift;
+} # end removeBindingAndMsgToSend
sub selectBinding {