Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2010-01-15 15:02:15 +0300
committerBadlop <badlop@process-one.net>2010-01-15 15:02:15 +0300
commita9fba750fa3018e510957a28847005491ed705cf (patch)
treea65c37a67b7b8034c0a7c70009909354468cd7f2 /src/ejabberd_c2s.erl
parent13220d44f44bd76c06298fdb2b610d06122dfd52 (diff)
Improve functions calls when closing client connection.
SVN Revision: 2905
Diffstat (limited to 'src/ejabberd_c2s.erl')
-rw-r--r--src/ejabberd_c2s.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl
index 181186c6a..e11873cab 100644
--- a/src/ejabberd_c2s.erl
+++ b/src/ejabberd_c2s.erl
@@ -132,8 +132,6 @@
"id='~s' from='~s'~s~s>"
).
--define(STREAM_TRAILER, "</stream:stream>").
-
-define(INVALID_NS_ERR, exmpp_stream:error('invalid-namespace')).
-define(INVALID_XML_ERR, exmpp_stream:error('xml-not-well-formed')).
-define(HOST_UNKNOWN_ERR, exmpp_stream:error('host-unknown')).
@@ -1263,11 +1261,11 @@ handle_info(system_shutdown, StateName, StateData) ->
wait_for_stream ->
send_header(StateData#state.streamid, ?MYNAME, "1.0", ""),
send_element(StateData, exmpp_stream:error('system-shutdown')),
- send_text(StateData, ?STREAM_TRAILER),
+ send_trailer(StateData),
ok;
_ ->
send_element(StateData, exmpp_stream:error('system-shutdown')),
- send_text(StateData, ?STREAM_TRAILER),
+ send_trailer(StateData),
ok
end,
{stop, normal, StateData};