summaryrefslogtreecommitdiffstats
path: root/inf.pl
diff options
context:
space:
mode:
Diffstat (limited to 'inf.pl')
-rwxr-xr-xinf.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/inf.pl b/inf.pl
index fe9d4a1..6c6481d 100755
--- a/inf.pl
+++ b/inf.pl
@@ -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);