diff options
Diffstat (limited to 'inf.pl')
-rwxr-xr-x | inf.pl | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -12,15 +12,16 @@ sub view($$) { my ( $inf, $port ) = @_; $inf->view($port); + $inf->logout; exit(0); } - sub media($$) { my ( $inf, $port ) = @_; $inf->media($port); + $inf->logout; exit(0); } @@ -37,7 +38,6 @@ sub thing($$$$) { my $name = $inf->name_get(); my $port_name = $inf->port_name_get($port); - view( $inf, $port ) if $thing eq 'view'; media( $inf, $port ) if $thing eq 'media'; @@ -83,6 +83,7 @@ sub thing($$$$) { } else { print "Command failed\n"; + $inf->logout; exit(1); } @@ -104,6 +105,8 @@ sub thing($$$$) { and ( not( $s =~ /Pending/ ) ) and ( $s =~ /$looke/i ) ); + $inf->logout; + } sub thing_search($$$$) { @@ -116,7 +119,6 @@ sub thing_search($$$$) { my $n = $inf->port_count(); - for ( my $i = 1 ; $i <= $n ; ++$i ) { my $port = $inf->port_id_get_by_number($i); my $o = $inf->port_name_get($port); |