[Vortex] Crash in vortex_tls_start_negociation_sync

Francis Brosnan Blazquez francis at aspl.es
Tue Mar 4 16:27:51 CET 2008

Hi Jens,

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

Ok. I bit more of documentation would help here ;-)

vortex_channel_send_err is provided to enable sending BEEP ERR frames
which may or may not include XML content, just like RPY or MSG type.
This depends on the profile you are implementing.

Because of this, vortex_channel_send_err can't receive the error code
and the message because it has to provide a more general API, for
example, to send binary error messages.

In other words, if you want to use the error reply format used for BEEP
channel 0 (and some other standard profiles) you would have to use
vortex_frame_get_error_message and then provide the message created to

I've updated vortex_channel_send_err documentation with all these
clarifications. Cheers!

> —Jens
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.

More information about the Vortex mailing list