Author: jdsn Date: Thu May 20 20:23:21 2010 New Revision: 62053 URL: http://svn.opensuse.org/viewcvs/yast?rev=62053&view=rev Log: delete the context upon a registration server error to make the next registration attempt a clean one Modified: branches/SuSE-Code-11-Branch/registration/src/modules/YSR.pm Modified: branches/SuSE-Code-11-Branch/registration/src/modules/YSR.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/registration/src/modules/YSR.pm?rev=62053&r1=62052&r2=62053&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/registration/src/modules/YSR.pm (original) +++ branches/SuSE-Code-11-Branch/registration/src/modules/YSR.pm Thu May 20 20:23:21 2010 @@ -303,26 +303,35 @@ ${$regret}{'error'} = 'Registration did not succeed due to invalid data.'; ${$regret}{'invaliddataerror'} = '1'; ${$regret}{'invaliddataerrormessage'} = $self->get_errormsg(); + # to be on the safe side for a following registration request, we need to delete the context data + $self->del_ctx(); } elsif ( $exitcode == 3 ) { ${$regret}{'error'} = 'Conflicting registration data'; ${$regret}{'conflicterror'} = '1'; + # to be on the safe side for a following registration request, we need to delete the context data + $self->del_ctx(); } elsif ( $exitcode == 4 ) { ${$regret}{'missinginfo'} = 'Missing Information'; my $margs = $self->get_args() || {}; ${$regret}{'missingarguments'} = XMLout($margs, rootname => 'missingarguments'); + # keep the context, do not delete it } elsif ( $exitcode == 100 || $exitcode == 101 ) { ${$regret}{'error'} = 'No products to register'; ${$regret}{'noproducterror'} = '1'; + # to be on the safe side for a following registration request, we need to delete the context data + $self->del_ctx(); } else { ${$regret}{'error'} = 'Registration was not successful'; + # to be on the safe side for a following registration request, we need to delete the context data + $self->del_ctx(); } return $regret; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org