[Vortex] Crash in vortex_tls_start_negociation_sync
Jens Alfke
jens at mooseyard.com
Tue Mar 4 02:26:35 CET 2008
On 3 Mar '08, at 5:04 PM, Jens Alfke wrote:
> CRITICAL: (vortex-channel) unable to parse err reply, we have a
> buggy remote peer: Error found (stream size: 7, at byte 0 (global
> index: 0), near to ...Refused..., while reading: Refused): expected
> an non empty content for the node name not found.
I got this again, and found what's causing it. When Vortex _sends_ an
error reply (in vortex_channel_send_err), it just copies the error
message string into the frame and sends it.
But when Vortex _receives_ an error reply, it interprets the frame
contents as XML and tries to parse out an error code and message.
Because of this inconsistency, Vortex can't parse the error replies
that it itself generates!
After some searching through the source code, I found the function
vortex_frame_get_error_message. It looks like the client is supposed
to call this to generate the XML error document, then pass that to
vortex_channel_send_err.
I think it would make the API simpler and clearer if
vortex_channel_send_err took the error number and message directly,
and then called vortex_frame_get_error_message. If the BEEP protocol
requires error frames to contain XML, there's no reason to expose a
low-level function that lets you send raw data in an error. What do
you think?
—Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20080303/e4549a98/attachment-0001.bin
More information about the Vortex
mailing list