From 229c24e1f2921f6d3e1ce998ac25ecba33fd0462 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jun 2009 18:24:22 +0000 Subject: [PATCH] Implements sockname and peername for compatibility (thanks to Christohpe Romain) SVN Revision: 2271 --- 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