From kde-devel Thu Nov 15 15:08:35 2012 From: Dario Freddi Date: Thu, 15 Nov 2012 15:08:35 +0000 To: kde-devel Subject: Re: Async action with helper in KAuth Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=135299213405767 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============6255388289099217410==" --===============6255388289099217410== Content-Type: multipart/alternative; boundary=047d7b2e119f6d4b9404ce8a0699 --047d7b2e119f6d4b9404ce8a0699 Content-Type: text/plain; charset=ISO-8859-1 2012/11/15 Yichao Yu > Filed a bug here[1], hopefully this will help you tracking the bug and > to cherrypick/fix it in other branches. > > [1] https://bugs.kde.org/show_bug.cgi?id=310149 Thanks! > > > On Thu, Nov 15, 2012 at 8:45 AM, Dario Freddi wrote: > > Hello Yichao, > > > > 2012/11/12 Yichao Yu > >> > >> 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. > > > >> > >> 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. > > > >> > >> > >> 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 > >>> << > > > --047d7b2e119f6d4b9404ce8a0699 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/11/15 Yichao= Yu <yyc1992@gmail.com>
Filed a bug here[1], hopefully this will help you tracking the bug and
to cherrypick/fix it in other branches.

[1] https://bugs.kde.org/show_bug.cgi?id=3D310149
Thanks!
=A0


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 line= s
>> in` ActionReply Action::execute(const QString &helperID) const= `
>>
>> =A0 =A0 if (d->async) {
>> =A0 =A0 =A0 =A0 if (hasHelper()) {
>> =A0 =A0 =A0 =A0 =A0 =A0 // It makes no sense
>> =A0 =A0 =A0 =A0 =A0 =A0 return ActionReply::InvalidActionReply; >> =A0 =A0 =A0 =A0 }
>>
>> which gives the right error code and can explain why only the asyn= c
>> action fails. The comment says "makes no sense", but doe= sn't say
>> why.... can anyone explain the reason??
>
>
> Looks like there is a logical error in the code that I forgot to fix i= n the
> 4.x branch. if (!hasHelper()) is the correct line, and if the action h= as no
> helper it doesn't make sense to execute it asynchronously since th= ere is
> actually nothing to do, but only to authorize. Sorry about that, I wil= l
> provide a fix ASAP - my main focus lately has been the framework branc= h,
> where most of the logic actually changed.
>
>>
>> And I cannot found the
>> description for this anywhere in the tutorial (e.g. some backend m= ay
>> not support async action with helper at all.....), if it really >> doesn't make sense to do this (which I really doubt....) I gue= ss it
>> would be better to add it...
>
>
> What you are doing is perfectly supported and the bug is in the librar= y.
>
>>
>>
>> THX.
>>
>>
>> [1] http://forum.kde.org/viewtopic.php?f=3D43&t=3D9= 4801
>>
>> >> Visit http://mail.kde.org/mailman/listinfo/kde-de= vel#unsub to
>> >> unsubscribe <<
>
>
>
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#u= nsub to unsubscribe
>>> <<
>

--047d7b2e119f6d4b9404ce8a0699-- --===============6255388289099217410== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============6255388289099217410==--