diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-09-30 23:22:00 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-09-30 23:22:00 (GMT) |
commit | 3d4e3c745e98462c96e6a998857c3ce03a5b3e96 (patch) | |
tree | 75acb685b7ca2c308519044530661e7e44f9f0e4 /rh-bin/listdropboxes.cgi | |
parent | bdccabf320e960534d34a09aa4c98b91218f2833 (diff) |
upgraded to new context base handling for rhrd-libs
Diffstat (limited to 'rh-bin/listdropboxes.cgi')
-rwxr-xr-x | rh-bin/listdropboxes.cgi | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rh-bin/listdropboxes.cgi b/rh-bin/listdropboxes.cgi index 0a65105..f00e28e 100755 --- a/rh-bin/listdropboxes.cgi +++ b/rh-bin/listdropboxes.cgi @@ -36,14 +36,13 @@ my $q = CGI->new; my $username = $q->param('LOGIN_NAME'); my $token = $q->param('PASSWORD'); -my $dbh; -($dbh, $status, $errorstring) = RHRD::rddb::opendb(); -if(defined $dbh) { +(my $ctx, $status, $errorstring) = RHRD::rddb::init(); +if(defined $ctx) { my $result; - ($result, $status, $errorstring) = RHRD::rddb::check_token($dbh, $username, $token); + ($result, $status, $errorstring) = RHRD::rddb::check_token($ctx, $username, $token); if($result == 1) { $responsecode = 200; - @dropboxes = RHRD::rddb::get_dropboxes($dbh, $username); + @dropboxes = RHRD::rddb::get_dropboxes($ctx, $username); if(!defined $dropboxes[0] && defined $dropboxes[1]) { $responsecode = 500; $status = $dropboxes[1]; @@ -54,7 +53,7 @@ if(defined $dbh) { } else { $responsecode = 500; } - RHRD::rddb::closedb($dbh); + RHRD::rddb::destroy($ctx); } print "Content-type: application/xml; charset=UTF-8\n"; |