]> granicus.if.org Git - ejabberd/commitdiff
Don't "forget" listener options
authorHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 4 Jun 2014 17:51:45 +0000 (19:51 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 4 Jun 2014 18:54:26 +0000 (20:54 +0200)
If a listener is started or stopped via ejabberd_listener:add_listener/3
or ejabberd_listener:delete_listener/3, the configuration for all
listener modules is updated using the Module:transform_listen_option/2
function for each listener module that exports such a function.
However, for listener modules that don't provide that function (such as
ejabberd_stun), all but one option was dropped.  This is now fixed.

The issue could be triggered e.g. by enabling mod_proxy65 in the modules
section.

src/ejabberd_listener.erl

index 02a2f3fbd6b731cfdf35aea907261448e66773bc..d2dc0fb739f3bdf5f10e27cd7c1a4658414a8d8d 100644 (file)
@@ -595,7 +595,7 @@ transform_option({{Port, IP, Transport}, Mod, Opts}) ->
                       try
                           Mod:transform_listen_option(Opt, Acc)
                       catch error:undef ->
-                              Acc
+                              [Opt|Acc]
                       end
               end, [], Opts1),
     TransportOpt = if Transport == tcp -> [];