diff options
Diffstat (limited to 'utils/get-rd-token')
-rwxr-xr-x | utils/get-rd-token | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/get-rd-token b/utils/get-rd-token index b2b4dce..2c54ea2 100755 --- a/utils/get-rd-token +++ b/utils/get-rd-token @@ -46,14 +46,14 @@ if($num_args == 1) { my $token=''; my $ret = 0; -my ($dbh, undef, $errorstring) = RHRD::rddb::opendb(); -if(defined $dbh) { - ($token, undef, $errorstring) = RHRD::rddb::get_token($dbh, $requsername); +my ($ctx, undef, $errorstring) = RHRD::rddb::init(); +if(defined $ctx) { + ($token, undef, $errorstring) = RHRD::rddb::get_token($ctx, $requsername); unless($token) { print STDERR "$errorstring\n"; $ret = 1; } - RHRD::rddb::closedb($dbh); + RHRD::rddb::destroy($ctx); } else { print STDERR "$errorstring\n"; $ret = 1; |