diff options
author | martti <martti@pkgsrc.org> | 2009-02-03 12:07:26 +0000 |
---|---|---|
committer | martti <martti@pkgsrc.org> | 2009-02-03 12:07:26 +0000 |
commit | 8cca5e259b5e9f3a88086ee7d69fab898be36f4d (patch) | |
tree | 81a89ecec48abe47ba3fe844f8ccaa762bfce6c2 /chat | |
parent | 9bf5e786d8a2d98a5cf712dca7c9003793034f97 (diff) | |
download | pkgsrc-8cca5e259b5e9f3a88086ee7d69fab898be36f4d.tar.gz |
Updated chat/ejabberd to 2.0.3
* Do not ask certificate for client (c2s)
* Check digest-uri in SASL digest authentication
* Use send timeout to avoid locking on gen_tcp:send
* Fix ejabberd reconnection to database
* HTTP-Bind: handle wrong order of packets
* MUC: Improved traffic regulation management
* PubSub: Several bugfixes and improvements for best coverage of XEP-0060 v1.12
* Shared Roster Groups: push immediately membership changes
* Rotate also sasl.log on "reopen-log" command
Diffstat (limited to 'chat')
-rw-r--r-- | chat/ejabberd/Makefile | 12 | ||||
-rw-r--r-- | chat/ejabberd/PLIST | 4 | ||||
-rw-r--r-- | chat/ejabberd/distinfo | 13 | ||||
-rw-r--r-- | chat/ejabberd/patches/patch-ab | 24 | ||||
-rw-r--r-- | chat/ejabberd/patches/patch-ac | 72 | ||||
-rw-r--r-- | chat/ejabberd/patches/patch-ag | 63 |
6 files changed, 80 insertions, 108 deletions
diff --git a/chat/ejabberd/Makefile b/chat/ejabberd/Makefile index 2534ecce0f8..df9d574f51a 100644 --- a/chat/ejabberd/Makefile +++ b/chat/ejabberd/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2008/11/12 13:13:59 martti Exp $ +# $NetBSD: Makefile,v 1.7 2009/02/03 12:07:26 martti Exp $ -DISTNAME= ejabberd-2.0.2 +DISTNAME= ejabberd-2.0.3 #PKGREVISION= 1 CATEGORIES= chat -MASTER_SITES= http://www.process-one.net/downloads/ejabberd/2.0.2/ +MASTER_SITES= http://www.process-one.net/downloads/ejabberd/2.0.3/ MAINTAINER= martti@NetBSD.org HOMEPAGE= http://www.ejabberd.im/ @@ -49,6 +49,8 @@ BUILD_DEFS+= EJABBERD_EXDIR BUILD_DEFS+= VARBASE PKG_SYSCONFSUBDIR= ejabberd +PKG_DESTDIR_SUPPORT= destdir + .include "../../mk/bsd.prefs.mk" EJABBERD_USER= ejabberd @@ -84,6 +86,9 @@ CONF_FILES= ${EGDIR}/ejabberd.cfg ${PKG_SYSCONFDIR}/ejabberd.cfg CONF_FILES+= ${EGDIR}/ejabberdctl.cfg ${PKG_SYSCONFDIR}/ejabberdctl.cfg CONF_FILES+= ${EGDIR}/inetrc ${PKG_SYSCONFDIR}/inetrc +post-patch: + ${RM} -f ${WRKSRC}/doc/guide.tex.orig + post-install: ${INSTALL_DATA} ${WRKSRC}/doc/*.* ${PREFIX}/share/doc/${PKGNAME_NOREV} ${INSTALL_DATA} ${WRKSRC}/doc/Makefile ${PREFIX}/share/doc/${PKGNAME_NOREV} @@ -95,6 +100,7 @@ SUBST_MESSAGE.paths= Localizing paths SUBST_STAGE.paths= pre-configure SUBST_FILES.paths= src/Makefile.in SUBST_FILES.paths+= src/ejabberdctl.template +SUBST_FILES.paths+= doc/guide.tex SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' SUBST_SED.paths+= -e 's,@JABBERD_LOGDIR@,${EJABBERD_LOGDIR},g' SUBST_SED.paths+= -e 's,@EJABBERD_LOGDIR@,${EJABBERD_LOGDIR},g' diff --git a/chat/ejabberd/PLIST b/chat/ejabberd/PLIST index 83d0cbcd459..cebe97a416b 100644 --- a/chat/ejabberd/PLIST +++ b/chat/ejabberd/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2008/11/12 13:13:59 martti Exp $ +@comment $NetBSD: PLIST,v 1.4 2009/02/03 12:07:26 martti Exp $ ${EJABBERD_EXDIR}/ejabberd.cfg ${EJABBERD_EXDIR}/ejabberdctl.cfg ${EJABBERD_EXDIR}/inetrc @@ -170,7 +170,6 @@ share/doc/${PKGNAME}/features.tex share/doc/${PKGNAME}/flow.dot share/doc/${PKGNAME}/guide.html share/doc/${PKGNAME}/guide.tex -share/doc/${PKGNAME}/guide.tex.orig share/doc/${PKGNAME}/introduction.tex share/doc/${PKGNAME}/logo.png share/doc/${PKGNAME}/mod_http_bind.tex @@ -186,6 +185,7 @@ share/doc/${PKGNAME}/release_notes_1.1.3.txt share/doc/${PKGNAME}/release_notes_1.1.4.txt share/doc/${PKGNAME}/release_notes_2.0.0.txt share/doc/${PKGNAME}/release_notes_2.0.1.txt +share/doc/${PKGNAME}/release_notes_2.0.2.txt share/doc/${PKGNAME}/version.tex share/doc/${PKGNAME}/webadmmain.png share/doc/${PKGNAME}/webadmmainru.png diff --git a/chat/ejabberd/distinfo b/chat/ejabberd/distinfo index 673eb9348ca..58576494491 100644 --- a/chat/ejabberd/distinfo +++ b/chat/ejabberd/distinfo @@ -1,14 +1,13 @@ -$NetBSD: distinfo,v 1.4 2008/11/12 13:13:59 martti Exp $ +$NetBSD: distinfo,v 1.5 2009/02/03 12:07:26 martti Exp $ -SHA1 (ejabberd-2.0.2.tar.gz) = 7c82082b941277fe18aac25ca9b2016f25dc8472 -RMD160 (ejabberd-2.0.2.tar.gz) = b24c1c2d6ce8c56fd26f28a98b89d99890dbad72 -Size (ejabberd-2.0.2.tar.gz) = 1040817 bytes +SHA1 (ejabberd-2.0.3.tar.gz) = ee3a503befea79378c4c8f7ce5be6151209bf474 +RMD160 (ejabberd-2.0.3.tar.gz) = e5f77715a9e74dfed5b9dbdd17ad2255d40f3d13 +Size (ejabberd-2.0.3.tar.gz) = 1089870 bytes SHA1 (patch-aa) = 5b0c2994aad402cf13cc9531465513aad69de1e0 -SHA1 (patch-ab) = a083116beb37cd19a011993e009b57a0a4b202bf -SHA1 (patch-ac) = 32387347e9581500cbdbdec971b0825c4043d1f1 +SHA1 (patch-ac) = 271640b343bdc24f6609fe9c95250a91d514bc28 SHA1 (patch-ad) = a6504e8454878c97e434040a2f9136174b994c0d SHA1 (patch-ae) = c1c615a1d2e28d05d069f2bafa30179437922536 SHA1 (patch-af) = 908ebaaea76de53cc22a53289d3b93189767d40c -SHA1 (patch-ag) = 4cb80b3c530ddb561693a82b55254b322cb41a97 +SHA1 (patch-ag) = c6620ce3018e4c01d8c9edf6242a8cb52a55395d SHA1 (patch-ah) = 29b4440454a138908fe2c6937c65658e4cd689ba SHA1 (patch-ai) = 4b51670e283e7facd3142601d8560821b7829505 diff --git a/chat/ejabberd/patches/patch-ab b/chat/ejabberd/patches/patch-ab deleted file mode 100644 index 5f48ed139ff..00000000000 --- a/chat/ejabberd/patches/patch-ab +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2008/03/10 08:58:32 martti Exp $ - -What is this for? - ---- src/mod_last.erl.orig 2008-01-16 12:33:27.000000000 +0200 -+++ src/mod_last.erl 2008-02-11 13:46:13.000000000 +0200 -@@ -133,7 +133,16 @@ - sub_el = [{xmlelement, "query", - [{"xmlns", ?NS_LAST}, - {"seconds", integer_to_list(Sec)}], -- [{xmlcdata, Status}]}]} -+ [{xmlcdata, Status}]}]}; -+ [{last_activity, _, TimeStamp}] -> -+ {MegaSecs, Secs, _MicroSecs} = now(), -+ TimeStamp2 = MegaSecs * 1000000 + Secs, -+ Sec = TimeStamp2 - TimeStamp, -+ IQ#iq{type = result, -+ sub_el = [{xmlelement, "query", -+ [{"xmlns", ?NS_LAST}, -+ {"seconds", integer_to_list(Sec)}], -+ []}]} - end. - - diff --git a/chat/ejabberd/patches/patch-ac b/chat/ejabberd/patches/patch-ac index b650077f6b4..c10a7e5403e 100644 --- a/chat/ejabberd/patches/patch-ac +++ b/chat/ejabberd/patches/patch-ac @@ -1,10 +1,10 @@ -$NetBSD: patch-ac,v 1.2 2008/11/12 13:13:59 martti Exp $ +$NetBSD: patch-ac,v 1.3 2009/02/03 12:07:26 martti Exp $ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) ---- doc/guide.tex.orig 2008-08-27 12:37:52.000000000 +0300 -+++ doc/guide.tex -@@ -713,34 +713,80 @@ The option \option{listen} defines for w +--- doc/guide.tex.orig 2009-01-14 11:54:15.000000000 +0200 ++++ doc/guide.tex 2009-02-03 13:18:32.000000000 +0200 +@@ -716,34 +716,80 @@ will listen and what services will be run on them. Each element of the list is a tuple with the following elements: \begin{itemize} @@ -62,7 +62,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) \ind{modules!ejabberd\_c2s}\ind{modules!ejabberd\_s2s\_in}\ind{modules!ejabberd\_service}\ind{modules!ejabberd\_http}\ind{protocols!XEP-0114: Jabber Component Protocol} The available modules, their purpose and the options allowed by each one are: \begin{description} - \titem{\texttt{ejabberd\_c2s}} + \titem{\texttt{ejabberd\_c2s}} Handles c2s connections.\\ - Options: \texttt{access}, \texttt{certfile}, \texttt{inet6}, - \texttt{ip}, \texttt{max\_stanza\_size}, \texttt{shaper}, @@ -75,7 +75,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) - Options: \texttt{inet6}, \texttt{ip}, \texttt{max\_stanza\_size} + Options: \texttt{max\_stanza\_size} \titem{\texttt{ejabberd\_service}} - Interacts with \footahref{http://www.ejabberd.im/tutorials-transports}{external components} + Interacts with an \footahref{http://www.ejabberd.im/tutorials-transports}{external component} (as defined in the Jabber Component Protocol (\xepref{0114}).\\ - Options: \texttt{access}, \texttt{hosts}, \texttt{inet6}, - \texttt{ip}, \texttt{shaper}, \texttt{service\_check\_from} @@ -94,22 +94,20 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) This is a detailed description of each option allowed by the listening modules: \begin{description} \titem{\{access, <access rule>\}} \ind{options!access}This option defines -@@ -785,13 +831,7 @@ This is a detailed description of each o +@@ -789,12 +835,6 @@ is also needed in the \Jabber{} client. Remark also that HTTP Polling can be interesting to host a web-based \Jabber{} client such as \footahref{http://jwchat.sourceforge.net/}{JWChat}. - \titem{inet6} \ind{options!inet6}\ind{IPv6}Set up the socket for IPv6 instead of IPv4. - Note: this option is not required for S2S outgoing connections, -- because when ejabberd attempts to establish a S2S outgoing connection +- because when ejabberd attempts to establish a S2S outgoing connection - it first tries IPv4, and if that fails it attempts with IPv6. - \titem{\{ip, IPAddress\}} \ind{options!ip}This option specifies which network - interface to listen for. For example \verb|{ip, {192, 168, 1, 1}}|. -- \titem{\{max\_stanza\_size, Size\}} -+ \titem{\{max\_stanza\_size, Size\}} + \titem{\{max\_stanza\_size, Size\}} \ind{options!max\_stanza\_size}This option specifies an approximate maximum size in bytes of XML stanzas. Approximate, - because it is calculated with the precision of one block of readed -@@ -838,7 +878,7 @@ This is a detailed description of each o +@@ -842,7 +882,7 @@ option will not affect connections (there will be no stream compression). \end{description} @@ -118,7 +116,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) \begin{description} \titem{\{s2s\_use\_starttls, true|false\}} \ind{options!s2s\_use\_starttls}\ind{STARTTLS}This option defines whether to -@@ -859,6 +899,8 @@ There are some additional global options +@@ -863,6 +903,8 @@ Specified in seconds. The default value is 300 seconds (5 minutes). \end{description} @@ -127,8 +125,8 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) For example, the following simple configuration defines: \begin{itemize} \item There are three domains. The default certificate file is \term{server.pem}. -@@ -866,17 +908,17 @@ However, the c2s and s2s connections to - \item Port 5222 listens for c2s connections with STARTTLS, +@@ -870,10 +912,10 @@ + \item Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients. \item Port 5223 listens for c2s connections with the old SSL. -\item Port 5269 listens for s2s connections with STARTTLS. @@ -140,16 +138,19 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) \end{itemize} \begin{verbatim} {hosts, ["example.com", "example.org", "example.net"]}. - {listen, - [ +@@ -882,50 +924,52 @@ {5222, ejabberd_c2s, [ -- {access, c2s}, -+ {access, c2s}, + {access, c2s}, {shaper, c2s_shaper}, - starttls, {certfile, "/etc/ejabberd/server.pem"}, +- starttls, {certfile, "/etc/ejabberd/server.pem"}, ++ starttls, {certfile, "@PKG_SYSCONFDIR@/server.pem"}, {max_stanza_size, 65536} -@@ -887,17 +929,17 @@ However, the c2s and s2s connections to - tls, {certfile, "/etc/ejabberd/server.pem"}, + ]}, + {5223, ejabberd_c2s, [ + {access, c2s}, + {shaper, c2s_shaper}, +- tls, {certfile, "/etc/ejabberd/server.pem"}, ++ tls, {certfile, "@PKG_SYSCONFDIR@/server.pem"}, {max_stanza_size, 65536} ]}, - {5269, ejabberd_s2s_in, [ @@ -169,12 +170,16 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) - ]} + {{5281, "127.0.0.1"}, ejabberd_http, [ + web_admin, -+ tls, {certfile, "/etc/ejabberd/server.pem"}, ++ tls, {certfile, "@PKG_SYSCONFDIR@/server.pem"}, + ]} ] }. {s2s_use_starttls, true}. -@@ -907,21 +949,23 @@ However, the c2s and s2s connections to +-{s2s_certfile, "/etc/ejabberd/server.pem"}. +-{domain_certfile, "example.com", "/etc/ejabberd/example_com.pem"}. ++{s2s_certfile, "@PKG_SYSCONFDIR@/server.pem"}. ++{domain_certfile, "example.com", "@PKG_SYSCONFDIR@/example_com.pem"}. + \end{verbatim} In this example, the following configuration defines that: \begin{itemize} @@ -193,7 +198,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) + in all the IPv4 addresses. Note that it is also possible to serve them on different ports. The second example in section~\ref{webadmin} shows how exactly this can be done. - \item All users except for the administrators have a traffic of limit + \item All users except for the administrators have a traffic of limit 1,000\,Bytes/second \item \ind{transports!AIM}The \footahref{http://www.ejabberd.im/pyaimt}{AIM transport} @@ -204,17 +209,13 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) \item \ind{transports!ICQ}The ICQ transport JIT (\jid{icq.example.org} and \jid{sms.example.org}) is connected to port 5234 with password `\term{jitsecret}'. -@@ -949,13 +993,32 @@ In this example, the following configura +@@ -953,13 +997,32 @@ {access, c2s_shaper, [{none, admin}, {normal, all}]}. {listen, - [{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]}, - {5223, ejabberd_c2s, [{access, c2s}, - ssl, {certfile, "/path/to/ssl.pem"}]}, -- {5269, ejabberd_s2s_in, []}, -- {5280, ejabberd_http, [http_poll, web_admin]}, -- {5233, ejabberd_service, [{hosts, ["aim.example.org"], -- [{password, "aimsecret"}]}]}, + [{5222, ejabberd_c2s, [ + {access, c2s}, + {shaper, c2s_shaper} @@ -228,7 +229,10 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) + {access, c2s}, + ssl, {certfile, "/path/to/ssl.pem"} + ]}, -+ {5269, ejabberd_s2s_in, []}, + {5269, ejabberd_s2s_in, []}, +- {5280, ejabberd_http, [http_poll, web_admin]}, +- {5233, ejabberd_service, [{hosts, ["aim.example.org"], +- [{password, "aimsecret"}]}]}, + {{5280, {0, 0, 0, 0}}, ejabberd_http, [ + http_poll, + web_admin @@ -244,7 +248,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) {5234, ejabberd_service, [{hosts, ["icq.example.org", "sms.example.org"], [{password, "jitsecret"}]}]}, {5235, ejabberd_service, [{hosts, ["msn.example.org"], -@@ -3672,7 +3735,7 @@ Examples: +@@ -3745,7 +3808,7 @@ \item For security reasons, you can serve the Web Admin on a secured connection, on a port differing from the HTTP Polling interface, and bind it to the internal LAN IP. The Web Admin will be accessible by pointing your @@ -253,7 +257,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) \begin{verbatim} {hosts, ["example.org"]}. -@@ -3680,9 +3743,13 @@ Examples: +@@ -3753,9 +3816,13 @@ {listen, [ ... @@ -265,7 +269,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) + ]}, + {{5282, "192.168.1.1"}, ejabberd_http, [ + web_admin, -+ tls, {certfile, "/usr/local/etc/server.pem"} ++ tls, {certfile, "@PKG_SYSCONFDIR@/server.pem"} + ]}, ... ]}. diff --git a/chat/ejabberd/patches/patch-ag b/chat/ejabberd/patches/patch-ag index f07f97aaabe..b1eb395bb14 100644 --- a/chat/ejabberd/patches/patch-ag +++ b/chat/ejabberd/patches/patch-ag @@ -1,9 +1,9 @@ -$NetBSD: patch-ag,v 1.1 2008/11/12 13:13:59 martti Exp $ +$NetBSD: patch-ag,v 1.2 2009/02/03 12:07:26 martti Exp $ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) ---- src/ejabberd_listener.erl.orig 2008-08-27 12:37:52.000000000 +0300 -+++ src/ejabberd_listener.erl +--- src/ejabberd_listener.erl.orig 2009-01-14 11:54:15.000000000 +0200 ++++ src/ejabberd_listener.erl 2009-02-03 08:21:35.000000000 +0200 @@ -32,6 +32,7 @@ init_ssl/4, start_listener/3, @@ -12,7 +12,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) add_listener/3, delete_listener/1 ]). -@@ -47,8 +48,7 @@ init(_) -> +@@ -50,8 +51,7 @@ undefined -> ignore; Ls -> @@ -22,7 +22,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) fun({Port, Module, Opts}) -> {Port, {?MODULE, start, [Port, Module, Opts]}, -@@ -56,7 +56,20 @@ init(_) -> +@@ -59,7 +59,20 @@ brutal_kill, worker, [?MODULE]} @@ -44,7 +44,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) end. -@@ -81,13 +94,16 @@ start(Port, Module, Opts) -> +@@ -84,7 +97,11 @@ end end. @@ -57,13 +57,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) SockOpts = lists:filter(fun({ip, _}) -> true; (inet6) -> true; (inet) -> true; - (_) -> false - end, Opts), -- - Res = gen_tcp:listen(Port, [binary, - {packet, 0}, - {active, false}, -@@ -99,11 +115,77 @@ init(Port, Module, Opts) -> +@@ -103,11 +120,77 @@ {ok, ListenSocket} -> accept(ListenSocket, Module, Opts); {error, Reason} -> @@ -77,8 +71,8 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) + ?ERROR_MSG("Failed to open socket:~n ~p~nReason: ~s", + [{Port, Module, SockOpts}, ReasonT]), + {error, ReasonT} -+ end. -+ + end. + +%% @spec (PortIP, Opts) -> {Port, IPT, IPS, IPV, OptsClean} +%% where +%% PortIP = Port | {Port, IPT | IPS} @@ -132,8 +126,8 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) + {T1, OptsNoIP}; + [] -> + {no_ip_option, OptsNoIP} - end. - ++ end. ++ +get_ip_tuple(no_ip_option, inet) -> + {0, 0, 0, 0}; +get_ip_tuple(no_ip_option, inet6) -> @@ -144,7 +138,7 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) accept(ListenSocket, Module, Opts) -> case gen_tcp:accept(ListenSocket) of {ok, Socket} -> -@@ -178,6 +260,7 @@ accept_ssl(ListenSocket, Module, Opts) - +@@ -182,6 +265,7 @@ end. @@ -152,21 +146,11 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) start_listener(Port, Module, Opts) -> ChildSpec = {Port, {?MODULE, start, [Port, Module, Opts]}, -@@ -191,26 +274,49 @@ stop_listener(Port) -> +@@ -195,26 +279,49 @@ supervisor:terminate_child(ejabberd_listeners, Port), supervisor:delete_child(ejabberd_listeners, Port). -add_listener(Port, Module, Opts) -> -- Ports = case ejabberd_config:get_local_option(listen) of -- undefined -> -- []; -- Ls -> -- Ls -- end, -- Ports1 = lists:keydelete(Port, 1, Ports), -- Ports2 = [{Port, Module, Opts} | Ports1], -- ejabberd_config:add_local_option(listen, Ports2), -- start_listener(Port, Module, Opts). +%% @spec (PortIP, Module, Opts) -> {ok, Pid} | {error, Error} +%% where +%% PortIP = {Port, IPT | IPS} @@ -180,15 +164,18 @@ Modified to use IPv6/v4 patch (https://support.process-one.net/browse/EJAB-389) +add_listener(PortIP, Module, Opts) -> + case start_listener(PortIP, Module, Opts) of + {ok, _Pid} -> -+ Ports = case ejabberd_config:get_local_option(listen) of -+ undefined -> -+ []; -+ Ls -> -+ Ls -+ end, -+ Ports1 = lists:keydelete(PortIP, 1, Ports), -+ Ports2 = [{PortIP, Module, Opts} | Ports1], -+ ejabberd_config:add_local_option(listen, Ports2), + Ports = case ejabberd_config:get_local_option(listen) of + undefined -> + []; + Ls -> + Ls + end, +- Ports1 = lists:keydelete(Port, 1, Ports), +- Ports2 = [{Port, Module, Opts} | Ports1], ++ Ports1 = lists:keydelete(PortIP, 1, Ports), ++ Ports2 = [{PortIP, Module, Opts} | Ports1], + ejabberd_config:add_local_option(listen, Ports2), +- start_listener(Port, Module, Opts). + ok; + {error, {already_started, _Pid}} -> + {error, {already_started, PortIP}}; |