This commit is contained in:
Feng Lee 2015-07-25 14:34:02 +08:00
parent 98250313ab
commit 8c7d2ebe1c
2 changed files with 22 additions and 2 deletions

View File

@ -2,6 +2,20 @@
emqttd ChangeLog
==================
0.9.3-alpha (2015-07-25)
-------------------------
Wiki: [Bridge](https://github.com/emqtt/emqttd/wiki/Bridge)
Improve: emqttd_protocol.hrl to define 'QOS_I'
Improve: emqttd_pubsub to add subscribe/2 API
Improve: ./bin/emqttd_ctl to support new bridges command
Bugfix: issue #206 - Cannot bridge two nodes
0.9.2-alpha (2015-07-18)
-------------------------

View File

@ -24,6 +24,7 @@
%%%
%%% @end
%%%-----------------------------------------------------------------------------
-module(emqttd_bridge_sup).
-author("Feng Lee <feng@emqtt.io>").
@ -63,8 +64,13 @@ start_bridge(Node, SubTopic) when is_atom(Node) and is_binary(SubTopic) ->
-spec start_bridge(atom(), binary(), [emqttd_bridge:option()]) -> {ok, pid()} | {error, any()}.
start_bridge(Node, SubTopic, Options) when is_atom(Node) and is_binary(SubTopic) ->
Options1 = emqttd_opts:merge(emqttd_broker:env(bridge), Options),
supervisor:start_child(?MODULE, bridge_spec(Node, SubTopic, Options1)).
case Node =:= node() of
true ->
{error, bridge_to_self};
false ->
Options1 = emqttd_opts:merge(emqttd_broker:env(bridge), Options),
supervisor:start_child(?MODULE, bridge_spec(Node, SubTopic, Options1))
end.
%%------------------------------------------------------------------------------
%% @doc Stop a bridge