From 3dbfd827bb275dea68b798529507f8c72205cb97 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jun 2009 17:44:25 +0000 Subject: [PATCH] Implements sockname and peername for compatibility (thanks to Christohpe Romain) SVN Revision: 2208 --- src/web/ejabberd_http_bind.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/web/ejabberd_http_bind.erl b/src/web/ejabberd_http_bind.erl index d16a5d0c4..5ac3f96d3 100644 --- a/src/web/ejabberd_http_bind.erl +++ b/src/web/ejabberd_http_bind.erl @@ -22,6 +22,7 @@ terminate/3, send/2, setopts/2, + sockname/1, peername/1, controlling_process/2, close/1, process_request/1]). @@ -99,6 +100,11 @@ controlling_process(_Socket, _Pid) -> close({http_bind, FsmRef}) -> catch gen_fsm:sync_send_all_state_event(FsmRef, close). +sockname(_Socket) -> + {ok, {{0, 0, 0, 0}, 0}}. + +peername(_Socket) -> + {ok, {{0, 0, 0, 0}, 0}}. process_request(Data) -> case catch parse_request(Data) of