summaryrefslogtreecommitdiff
path: root/utils/get-rd-token
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-30 23:05:11 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-09-30 23:05:11 (GMT)
commit6f1943313a0e503189dd9685483a9ecd1bd7cc6e (patch)
tree7461bd743125feb61a7f977a06e7698bb184d333 /utils/get-rd-token
parent88ba274e7841fedffe9ef98b0933c0610ac6997c (diff)
introduced rhrd context
Diffstat (limited to 'utils/get-rd-token')
-rwxr-xr-xutils/get-rd-token8
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;