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

List:       kde-devel
Subject:    Re: Async action with helper in KAuth
From:       Dario Freddi <drf54321 () gmail ! com>
Date:       2012-11-15 15:08:35
Message-ID: CAFFVnfPZ0P2LyGKVZRYvW9Xi9oQJ5sh-prVKq6RzSTsc9m-1qA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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=310149


Thanks!


>
>
> 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.
> >
> >>
> >> 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
> >>> <<
> >
>

[Attachment #5 (text/html)]

<div class="gmail_extra"><br><div class="gmail_quote">2012/11/15 Yichao Yu <span \
dir="ltr">&lt;<a href="mailto:yyc1992@gmail.com" \
target="_blank">yyc1992@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Filed a bug \
here[1], hopefully this will help you tracking the bug and<br> to cherrypick/fix it \
in other branches.<br> <br>
[1] <a href="https://bugs.kde.org/show_bug.cgi?id=310149" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=310149</a></blockquote><div><br></div><div>Thanks!</div><div> \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
<div class="im HOEnZb"><br>
On Thu, Nov 15, 2012 at 8:45 AM, Dario Freddi &lt;<a \
href="mailto:drf54321@gmail.com">drf54321@gmail.com</a>&gt; wrote:<br> </div><div \
class="HOEnZb"><div class="h5">&gt; Hello Yichao,<br> &gt;<br>
&gt; 2012/11/12 Yichao Yu &lt;<a \
href="mailto:yyc1992@gmail.com">yyc1992@gmail.com</a>&gt;<br> &gt;&gt;<br>
&gt;&gt; I checkout out the code for KAuth and found out the following lines<br>
&gt;&gt; in` ActionReply Action::execute(const QString &amp;helperID) const`<br>
&gt;&gt;<br>
&gt;&gt;     if (d-&gt;async) {<br>
&gt;&gt;         if (hasHelper()) {<br>
&gt;&gt;             // It makes no sense<br>
&gt;&gt;             return ActionReply::InvalidActionReply;<br>
&gt;&gt;         }<br>
&gt;&gt;<br>
&gt;&gt; which gives the right error code and can explain why only the async<br>
&gt;&gt; action fails. The comment says &quot;makes no sense&quot;, but doesn&#39;t \
say<br> &gt;&gt; why.... can anyone explain the reason??<br>
&gt;<br>
&gt;<br>
&gt; Looks like there is a logical error in the code that I forgot to fix in the<br>
&gt; 4.x branch. if (!hasHelper()) is the correct line, and if the action has no<br>
&gt; helper it doesn&#39;t make sense to execute it asynchronously since there is<br>
&gt; actually nothing to do, but only to authorize. Sorry about that, I will<br>
&gt; provide a fix ASAP - my main focus lately has been the framework branch,<br>
&gt; where most of the logic actually changed.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; And I cannot found the<br>
&gt;&gt; description for this anywhere in the tutorial (e.g. some backend may<br>
&gt;&gt; not support async action with helper at all.....), if it really<br>
&gt;&gt; doesn&#39;t make sense to do this (which I really doubt....) I guess it<br>
&gt;&gt; would be better to add it...<br>
&gt;<br>
&gt;<br>
&gt; What you are doing is perfectly supported and the bug is in the library.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; THX.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; [1] <a href="http://forum.kde.org/viewtopic.php?f=43&amp;t=94801" \
target="_blank">http://forum.kde.org/viewtopic.php?f=43&amp;t=94801</a><br> \
&gt;&gt;<br> &gt;&gt; &gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to<br> \
&gt;&gt; &gt;&gt; unsubscribe &lt;&lt;<br> &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt;&gt; Visit <a href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to \
unsubscribe<br> &gt;&gt;&gt; &lt;&lt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>



>> 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