[padb-devel] [padb] r140 committed - Remove calls to hostname with the caches version if possible.
codesite-noreply at google.com
codesite-noreply at google.com
Sun Aug 23 12:26:16 BST 2009
Revision: 140
Author: apittman
Date: Sun Aug 23 04:25:47 2009
Log: Remove calls to hostname with the caches version if possible.
http://code.google.com/p/padb/source/detail?r=140
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Sun Aug 23 04:19:30 2009
+++ /trunk/src/padb Sun Aug 23 04:25:47 2009
@@ -380,7 +380,7 @@
my $rem_jobid;
# Debug options.
-$conf{verbose} = 0;
+$conf{verbose} = 0;
# Valid values are "none" "missing" or "all". Anything not recognised
# is treated as "all".
@@ -614,7 +614,7 @@
# Valid debug modes, a full list is maintained here so using unexpected
# ones can generate warnings.
$debugModes{full_duplex} = undef;
-$debugModes{show_cmd } = undef;
+$debugModes{show_cmd} = undef;
$debugModes{all} = undef;
$debugModes{tree} = undef;
$debugModes{verbose} = undef;
@@ -6334,18 +6334,10 @@
sub open_find_pids {
my $job = shift;
- # Be careful here, we are the inner process then load data from
- # the outer.
- if ( defined $confInner{orte_data} ) {
- %open_jobs = ();
- $open_jobs{$job} = $confInner{orte_data};
- } else {
- open_get_data();
- }
- my $hostname = hostname();
-
- foreach my $rank ( keys( %{ $open_jobs{$job}{ranks}{$hostname} } ) ) {
- maybe_show_pid( $rank, $open_jobs{$job}{ranks}{$hostname}{$rank} );
+ my $hostname = $confInner{hostname};
+
+ foreach my $rank ( keys( %{ $confInner{orte_data}{ranks}{$hostname} }
) ) {
+ maybe_show_pid( $rank,
$confInner{orte_data}{ranks}{$hostname}{$rank} );
}
}
@@ -6751,7 +6743,7 @@
sub reply_to_parent {
my ( $netdata, $cmd ) = @_;
- $cmd->{host_responce}{ok}{ hostname() } = 1;
+ $cmd->{host_responce}{ok}{ $confInner{hostname} } = 1;
my $reply = my_encode($cmd);
$netdata->{parent}->{socket}->printf("$reply\n");
@@ -6817,7 +6809,7 @@
my $server = create_local_port( $confInner{port_range} );
my $lport = $server->sockport();
- my $hostname = hostname();
+ my $hostname = $confInner{hostname};
my $key = rand();
if ( defined $outerloc ) {
@@ -6860,7 +6852,6 @@
my $ip = inet_ntoa($addr);
my $hostname = gethostbyaddr( $addr, AF_INET );
- #printf "New connection from $hostname ($ip) $port\n";
my %sinfo;
$sinfo{hostname} = $hostname;
$sinfo{trusted} = 0;
@@ -6869,9 +6860,6 @@
$sinfo{socket} = $new;
$sinfo{line_cb} = \&command_from_outer;
$netdata->{connections}{$new} = \%sinfo;
-
- # $new->printf("Hello from padb\n");
- #$new->autoflush();
next;
}
More information about the padb-devel
mailing list