Bug in get_conn_type since SVN r1194 crashes http-bind and http-poll (thanks to Brian Cully) (EJAB-526)

SVN Revision: 1197
This commit is contained in:
Christophe Romain 2008-02-18 09:55:06 +00:00
parent a021731c09
commit 56e9971435
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2008-02-18 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberd_c2s.erl: Bug in get_conn_type since SVN r1194 crashes
http-bind and http-poll (thanks to Brian Cully) (EJAB-526)
2008-02-15 Badlop <badlop@process-one.net>
* doc/release_notes_2.0.0.txt: Describe in the Release Notes the
@ -6,7 +11,7 @@
2008-02-15 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberd_sm.erl: Retreive connection type in
sm_register_connection_hook
sm_register_connection_hook
* src/ejabberd_c2s.erl: Likewise
* src/ejabberd_auth_anonymous.erl: Likewise

View File

@ -1374,15 +1374,13 @@ get_auth_tags([], U, P, D, R) ->
{U, P, D, R}.
get_conn_type(StateData) ->
case StateData#state.sockmod of
case (StateData#state.sockmod):get_sockmod(StateData#state.socket) of
gen_tcp -> c2s;
tls -> c2s_tls;
ejabberd_zlib -> c2s_compressed;
ejabberd_http_poll -> http_poll;
ejabberd_http_bind -> http_bind;
_ ->
case (StateData#state.sockmod):get_sockmod(StateData#state.socket) of
ejabberd_zlib -> c2s_compressed;
tls -> c2s_tls;
gen_tcp -> c2s
end
_ -> unknown
end.
process_presence_probe(From, To, StateData) ->