[Psi-devel] [Delta] QCA 2.0 Beta 7

Norman Rasmussen norman at rasmussen.co.za
Tue Jul 10 03:43:33 PDT 2007


The patch works-for-me :-)

pending_write is now always zero after the decrement:
 - holding down enter in the service disco window I couldn't get it to go
non-zero.
 - even a 160kb message was encrypted in a single block, so pending_write
didn't go non-zero. (it took far longer to add it to the appendText to the
log than encrypt and transmit the message)

On 7/9/07, Justin Karneges <justin-psi2 at affinix.com> wrote:
>
> I think both bugs are related to the problem of QCA using the provider's
> encoded() function when no data has actually been encoded (e.g., returned
> in
> to_net(), which is held in the 'a' variable).  A bogus return value here
> should be okay, since the value would be undefined within this context.
>
> Here's a patch to try:
>
> --- src/qca_securelayer.cpp     (revision 685765)
> +++ src/qca_securelayer.cpp     (working copy)
> @@ -599,9 +599,12 @@
>                         bool more = false;
>                         if(mode == TLS::Stream)
>                         {
> -                               pending_write -= enc;
> -                               if(pending_write > 0)
> -                                       more = true;
> +                               if(!a.isEmpty())
> +                               {
> +                                       pending_write -= enc;
> +                                       if(pending_write > 0)
> +                                               more = true;
> +                               }
>                         }
>                         else
>                         {
>



-- 
- Norman Rasmussen
- Email: norman at rasmussen.co.za
- Home page: http://norman.rasmussen.co.za/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20070710/9344bf54/attachment.htm 


More information about the psi-devel mailing list