gnutls_record_check_pending() returning non-0 but gnutls_record_recv() gives no data

Wilmer van der Gaast wilmer at gaast.net
Tue Apr 10 00:40:11 CEST 2012


Hello Nikos,

On 09-04-12 13:34, Nikos Mavrogiannopoulos wrote:
>   By checking your log I believe you are right. I see that you receive
> a complete record packet split in many tcp segments and
> gnutls_record_check_pending() deceives you by including the incomplete
> packets to pending data. Would the attached patch solve the issue you
> notice? If it works for you it will be included in the next version.
>
Yes, this works better:

0x995d30 gnutls_record_recv = -28
0x995d30 gnutls_record_check_pending = 0
2 ASSERT: gnutls_buffers.c:510
2 ASSERT: gnutls_record.c:1000
2 ASSERT: gnutls_record.c:1202
0x995d30 gnutls_record_recv = -28
0x995d30 gnutls_record_check_pending = 0
0x995d30 gnutls_record_recv = 2048
0x995d30 gnutls_record_check_pending = 8770
0x995d30 gnutls_record_recv = 2048
0x995d30 gnutls_record_check_pending = 6722
0x995d30 gnutls_record_recv = 2048

I'm getting my data now, without ending up in an almost infinite loop. 
Thank you!

Would you be able to tell me which versions of GnuTLS are affected by 
this by the way? I'm thinking of adding a work-around so BitlBee will 
still work properly with affected GnuTLS versions.


Cheers,

Wilmer van der Gaast.

-- 
+-------- .''`.     - -- ---+  +        - -- --- ---- ----- ------+
| wilmer : :'  :  gaast.net |  | OSS Programmer   www.bitlbee.org |
| lintux `. `~'  debian.org |  | Full-time geek  wilmer.gaast.net |
+--- -- -  ` ---------------+  +------ ----- ---- --- -- -        +




More information about the Gnutls-help mailing list