summaryrefslogtreecommitdiffstats
path: root/mdkapplet-restricted-helper
diff options
context:
space:
mode:
Diffstat (limited to 'mdkapplet-restricted-helper')
-rwxr-xr-xmdkapplet-restricted-helper11
1 files changed, 2 insertions, 9 deletions
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index f2737061..55e55265 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -116,17 +116,10 @@ my $error;
sub add_restricted_medium {
my ($email, $password) = @_;
- my $res = get_from("https://my.mandriva.com/rest/authenticate",
+ my $res = get_from("https://my.mandriva.com/rest/authenticate2",
[ 'username', $email, 'password', $password,
'return', 'userdata' ]);
- my $ref = eval { XML::Simple->new->XMLin($res->{_content}) };
- if (my $err = $@) {
- warn ">> XML error: $err\n";
- $ref = {
- code => 1,
- message => $err,
- };
- }
+ my $ref = xml2perl($res);
if ($ref->{code} != 0) {
my $in = interactive->vnew;