summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ivy.pm12
-rwxr-xr-xexample/ivyprobe.pl3
2 files changed, 9 insertions, 6 deletions
diff --git a/Ivy.pm b/Ivy.pm
index 5f0b145..ae2bba4 100644
--- a/Ivy.pm
+++ b/Ivy.pm
@@ -46,7 +46,7 @@ use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
# to compute the VERSION from the CVS tag (or if no tag, as the cvs file revision)
my $TAG= q$Name$;
my $REVISION = q$Revision$ ;
-$VERSION = '1.46' ; # for Makefile.PL
+$VERSION = '1.47' ; # for Makefile.PL
($VERSION) = $TAG =~ /^\D*([\d_]+)/ ;
if (defined $VERSION and $VERSION ne "_") {
$VERSION =~ s/_/\./g;
@@ -758,7 +758,7 @@ sub start
# le message de bonjour à envoyer: "no de version no de port"
my $bonjourMsg = sprintf ("%d %d %s %s\n", IVY_PROTOCOLE_VERSION, $connSock->sockport(),
- $self->[appName], $self->[uuid]);
+ $self->[uuid], $self->[appName]);
if (!$self->[useMulticast]) {
# cree la socket de broadcast
@@ -1303,7 +1303,7 @@ sub _getBonjour ($)
my $peerName = _getHostByAddr ($addr);
# on force $peerPort a etre vu comme une valeur numerique
- my ($version, $peerPort, $udpAppName, $uuid) =
+ my ($version, $peerPort, $uuid, $udpAppName) =
# $bonjourMsg =~ /^(\d+)\s+(\d+)\s+(?:(\w+)\s+(.*))?/;
$bonjourMsg =~ /^(\d+)\s+(\d+)(?:\s+(\S+)\s+(.*))?\n/;
@@ -1336,9 +1336,9 @@ sub _getBonjour ($)
# print "DBG> from $self->[appName] DISCARD bonjour de $peerName:$peerPort:$uuid [$udpAppName] DEJA CONNECTE\n" ;
return;
} else {
-# print "DBG> reception de $peerName : bonjour $udpAppName:$peerPort" ;
-# print " uuid=$uuid" if (defined $uuid);
-# print ("\n");
+# print "DBG> reception de $peerName : bonjour $udpAppName:$peerPort" ;
+# print " uuid=$uuid" if (defined $uuid);
+# print ("\n");
# print "DBG> from $self->[appName] ACCEPT bonjour de $peerName:$peerPort:$uuid [$udpAppName]\n" ;
$self->[connectedUuid]->{$uuid} = 1 if (defined $uuid);
}
diff --git a/example/ivyprobe.pl b/example/ivyprobe.pl
index 199c6e9..41efe78 100755
--- a/example/ivyprobe.pl
+++ b/example/ivyprobe.pl
@@ -114,6 +114,9 @@ $Ivyobj->start;
sub cb {
my $line = <STDIN>;
+ unless (defined $line) {
+ die "readline mode problem : try $0 -stdio\n";
+ }
chomp $line;
exit if (&interpret_line ($line));
}