[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Async action with helper in KAuth
From:       Yichao Yu <yyc1992 () gmail ! com>
Date:       2012-11-15 14:46:00
Message-ID: CAMvDr+RSSnh5Lr1bpQE73vnRRM9y7OVJhn97txGbSzvA5W497A () mail ! gmail ! com
[Download RAW message or body]

On Thu, Nov 15, 2012 at 8:45 AM, Dario Freddi <drf54321@gmail.com> wrote:
> Hello Yichao,
>
> 2012/11/12 Yichao Yu <yyc1992@gmail.com>
>>
>> I checkout out the code for KAuth and found out the following lines
>> in` ActionReply Action::execute(const QString &helperID) const`
>>
>>     if (d->async) {
>>         if (hasHelper()) {
>>             // It makes no sense
>>             return ActionReply::InvalidActionReply;
>>         }
>>
>> which gives the right error code and can explain why only the async
>> action fails. The comment says "makes no sense", but doesn't say
>> why.... can anyone explain the reason??
>
>
> Looks like there is a logical error in the code that I forgot to fix in the
> 4.x branch. if (!hasHelper()) is the correct line, and if the action has no
> helper it doesn't make sense to execute it asynchronously since there is
> actually nothing to do, but only to authorize. Sorry about that, I will
> provide a fix ASAP - my main focus lately has been the framework branch,
> where most of the logic actually changed.

Agree, while it should also be better to mention this (async without
helper will fail) somewhere.

>
>>
>> And I cannot found the
>> description for this anywhere in the tutorial (e.g. some backend may
>> not support async action with helper at all.....), if it really
>> doesn't make sense to do this (which I really doubt....) I guess it
>> would be better to add it...
>
>
> What you are doing is perfectly supported and the bug is in the library.

IC, Thank you.

>
>>
>>
>> THX.
>>
>>
>> [1] http://forum.kde.org/viewtopic.php?f=43&t=94801
>>
>> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
>> >> unsubscribe <<
>
>
>
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>>> <<
>

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic