mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +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>
|
||||
|
||||
* 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"
|
||||
record
|
||||
record (thanks to Jerome Sautret and Mickael Remond)
|
||||
* src/web/ejabberd_http.erl: Likewise
|
||||
|
||||
2007-05-03 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
@ -258,11 +258,20 @@ code_change(_OldVsn, State, _Extra) ->
|
||||
|
||||
activate_socket(#state{socket = Socket,
|
||||
sock_mod = SockMod}) ->
|
||||
case SockMod of
|
||||
gen_tcp ->
|
||||
inet:setopts(Socket, [{active, once}]);
|
||||
_ ->
|
||||
SockMod:setopts(Socket, [{active, once}])
|
||||
PeerName =
|
||||
case SockMod of
|
||||
gen_tcp ->
|
||||
inet: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.
|
||||
|
||||
process_data(Data,
|
||||
|
@ -22,6 +22,7 @@
|
||||
terminate/3,
|
||||
send/2,
|
||||
setopts/2,
|
||||
sockname/1, peername/1,
|
||||
controlling_process/2,
|
||||
close/1,
|
||||
process/2]).
|
||||
@ -76,6 +77,12 @@ setopts({http_poll, FsmRef}, Opts) ->
|
||||
ok
|
||||
end.
|
||||
|
||||
sockname(_Socket) ->
|
||||
{ok, {{0, 0, 0, 0}, 0}}.
|
||||
|
||||
peername(_Socket) ->
|
||||
{ok, {{0, 0, 0, 0}, 0}}.
|
||||
|
||||
controlling_process(_Socket, _Pid) ->
|
||||
ok.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user