mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/xml_stream.erl: Removed "link" which cause not improper
closing of xml connections SVN Revision: 89
This commit is contained in:
parent
8df97cfdce
commit
9921b1c1d8
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2003-03-15 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/xml_stream.erl: Removed "link" which cause not improper
|
||||||
|
closing of xml connections
|
||||||
|
|
||||||
|
2003-03-14 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/jlib.hrl: Added "invalid-namespace" error
|
||||||
|
* src/ejabberd_c2s.erl: Likewise
|
||||||
|
|
||||||
2003-03-12 Alexey Shchepin <alexey@sevcom.net>
|
2003-03-12 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/ejabberd_s2s_out.erl: Fixed ports leak
|
* src/ejabberd_s2s_out.erl: Fixed ports leak
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
pres_timestamp,
|
pres_timestamp,
|
||||||
pres_invis = false}).
|
pres_invis = false}).
|
||||||
|
|
||||||
%-define(DBGFSM, true).
|
-define(DBGFSM, true).
|
||||||
|
|
||||||
-ifdef(DBGFSM).
|
-ifdef(DBGFSM).
|
||||||
-define(FSMOPTS, [{debug, [trace]}]).
|
-define(FSMOPTS, [{debug, [trace]}]).
|
||||||
@ -64,7 +64,8 @@
|
|||||||
|
|
||||||
-define(STREAM_TRAILER, "</stream:stream>").
|
-define(STREAM_TRAILER, "</stream:stream>").
|
||||||
|
|
||||||
-define(INVALID_NS_ERR, "<stream:error>Invalid Namespace</stream:error>").
|
-define(INVALID_NS_ERR,
|
||||||
|
xml:element_to_string(?SERR_INVALID_NAMESPACE)).
|
||||||
%-define(INVALID_XML_ERR,
|
%-define(INVALID_XML_ERR,
|
||||||
% "<stream:error code='400'>Invalid XML</stream:error>").
|
% "<stream:error code='400'>Invalid XML</stream:error>").
|
||||||
-define(INVALID_XML_ERR,
|
-define(INVALID_XML_ERR,
|
||||||
@ -144,7 +145,7 @@ wait_for_stream({xmlstreamstart, Name, Attrs}, StateData) ->
|
|||||||
?STREAM_HEADER,
|
?STREAM_HEADER,
|
||||||
[StateData#state.streamid, ?MYNAME, ""]),
|
[StateData#state.streamid, ?MYNAME, ""]),
|
||||||
send_text(StateData#state.socket,
|
send_text(StateData#state.socket,
|
||||||
Header ++ ?INVALID_NS_ERR ?STREAM_TRAILER),
|
Header ++ ?INVALID_NS_ERR ++ ?STREAM_TRAILER),
|
||||||
{stop, normal, StateData}
|
{stop, normal, StateData}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@
|
|||||||
?STREAM_ERROR("address", "host-unknown")).
|
?STREAM_ERROR("address", "host-unknown")).
|
||||||
-define(SERR_INTERNAL_SERVER_ERROR,
|
-define(SERR_INTERNAL_SERVER_ERROR,
|
||||||
?STREAM_ERROR("server", "internal-server-error")).
|
?STREAM_ERROR("server", "internal-server-error")).
|
||||||
|
-define(SERR_INVALID_NAMESPACE,
|
||||||
|
?STREAM_ERROR("format", "invalid-namespace")).
|
||||||
-define(SERR_RESOURSE_CONSTRAINT,
|
-define(SERR_RESOURSE_CONSTRAINT,
|
||||||
?STREAM_ERROR("server", "resource-constraint")).
|
?STREAM_ERROR("server", "resource-constraint")).
|
||||||
% TODO: include hostname or IP
|
% TODO: include hostname or IP
|
||||||
|
@ -16,7 +16,6 @@ start(CallbackPid) ->
|
|||||||
spawn(?MODULE, init, [CallbackPid]).
|
spawn(?MODULE, init, [CallbackPid]).
|
||||||
|
|
||||||
init(CallbackPid) ->
|
init(CallbackPid) ->
|
||||||
link(CallbackPid),
|
|
||||||
Port = open_port({spawn, expat_erl}, [binary]),
|
Port = open_port({spawn, expat_erl}, [binary]),
|
||||||
loop(CallbackPid, Port, []).
|
loop(CallbackPid, Port, []).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user