mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/ejabberd_receiver.erl: Workaround for inet_drv bug
* src/web/ejabberd_http_poll.erl: Added sockname/1 and peername/1 stubs SVN Revision: 763
This commit is contained in:
parent
32613987a8
commit
396b945d20
@ -1,7 +1,12 @@
|
|||||||
2007-05-07 Alexey Shchepin <alexey@sevcom.net>
|
2007-05-07 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/ejabberd_receiver.erl: Workaround for inet_drv bug
|
||||||
|
|
||||||
|
* src/web/ejabberd_http_poll.erl: Added sockname/1 and peername/1
|
||||||
|
stubs
|
||||||
|
|
||||||
* src/web/ejabberd_http.hrl: Added "ip" field in the "request"
|
* src/web/ejabberd_http.hrl: Added "ip" field in the "request"
|
||||||
record
|
record (thanks to Jerome Sautret and Mickael Remond)
|
||||||
* src/web/ejabberd_http.erl: Likewise
|
* src/web/ejabberd_http.erl: Likewise
|
||||||
|
|
||||||
2007-05-03 Alexey Shchepin <alexey@sevcom.net>
|
2007-05-03 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
@ -258,11 +258,20 @@ code_change(_OldVsn, State, _Extra) ->
|
|||||||
|
|
||||||
activate_socket(#state{socket = Socket,
|
activate_socket(#state{socket = Socket,
|
||||||
sock_mod = SockMod}) ->
|
sock_mod = SockMod}) ->
|
||||||
case SockMod of
|
PeerName =
|
||||||
gen_tcp ->
|
case SockMod of
|
||||||
inet:setopts(Socket, [{active, once}]);
|
gen_tcp ->
|
||||||
_ ->
|
inet:setopts(Socket, [{active, once}]),
|
||||||
SockMod:setopts(Socket, [{active, once}])
|
inet:peername(Socket);
|
||||||
|
_ ->
|
||||||
|
SockMod:setopts(Socket, [{active, once}]),
|
||||||
|
SockMod:peername(Socket)
|
||||||
|
end,
|
||||||
|
case PeerName of
|
||||||
|
{error, _Reason} ->
|
||||||
|
self() ! {tcp_closed, Socket};
|
||||||
|
{ok, _} ->
|
||||||
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
process_data(Data,
|
process_data(Data,
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
terminate/3,
|
terminate/3,
|
||||||
send/2,
|
send/2,
|
||||||
setopts/2,
|
setopts/2,
|
||||||
|
sockname/1, peername/1,
|
||||||
controlling_process/2,
|
controlling_process/2,
|
||||||
close/1,
|
close/1,
|
||||||
process/2]).
|
process/2]).
|
||||||
@ -76,6 +77,12 @@ setopts({http_poll, FsmRef}, Opts) ->
|
|||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
sockname(_Socket) ->
|
||||||
|
{ok, {{0, 0, 0, 0}, 0}}.
|
||||||
|
|
||||||
|
peername(_Socket) ->
|
||||||
|
{ok, {{0, 0, 0, 0}, 0}}.
|
||||||
|
|
||||||
controlling_process(_Socket, _Pid) ->
|
controlling_process(_Socket, _Pid) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user