From f5e1479afedc2aa12678e306f7bcac8d4dfd5aff Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 27 Jan 2010 18:53:43 +0000 Subject: [PATCH] exmpp fixes in receiver (thanks to Karim Gemayel) SVN Revision: 2932 --- src/ejabberd_receiver.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ejabberd_receiver.erl b/src/ejabberd_receiver.erl index 5179efa24..d0c464d30 100644 --- a/src/ejabberd_receiver.erl +++ b/src/ejabberd_receiver.erl @@ -288,14 +288,14 @@ activate_socket(#state{socket = Socket, ok end. -%% Data processing for connectors directly generating xmlelement in +%% Data processing for connectors directly generating xmlel in %% Erlang data structure. %% WARNING: Shaper does not work with Erlang data structure. process_data([], State) -> activate_socket(State), State; process_data([Element|Els], #state{c2s_pid = C2SPid} = State) - when element(1, Element) == xmlelement; + when element(1, Element) == xmlel; element(1, Element) == xmlstreamstart; element(1, Element) == xmlstreamelement; element(1, Element) == xmlstreamend -> @@ -330,12 +330,12 @@ process_data(Data, shaper_state = NewShaperState}, HibTimeout}. %% Element coming from XML parser are wrapped inside xmlstreamelement -%% When we receive directly xmlelement tuple (from a socket module +%% When we receive directly xmlel tuple (from a socket module %% speaking directly Erlang XML), we wrap it inside the same %% xmlstreamelement coming from the XML parser. -element_wrapper(XMLElement) - when element(1, XMLElement) == xmlelement -> - {xmlstreamelement, XMLElement}; +element_wrapper(XmlEl) + when element(1, XmlEl) == xmlel -> + {xmlstreamelement, XmlEl}; element_wrapper(Element) -> Element.