TODO: subscriptions
This commit is contained in:
parent
80117c1e8a
commit
392b008a43
6
TODO
6
TODO
|
@ -5,3 +5,9 @@ TODO 2. emqttd_router, emqttd_pubsub to route message
|
||||||
|
|
||||||
TODO 3. sup, pool_sup, manager......
|
TODO 3. sup, pool_sup, manager......
|
||||||
|
|
||||||
|
TODO 4. route ageing...
|
||||||
|
|
||||||
|
TODO 5. dashboard
|
||||||
|
|
||||||
|
TODO 6. emqttd_ctl
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ handle_call({subscribe, {SubId, SubPid}, TopicTable}, _From, State) ->
|
||||||
%% Add subscriptions
|
%% Add subscriptions
|
||||||
case mnesia:transaction(fun add_topics/1, [TRecords]) of
|
case mnesia:transaction(fun add_topics/1, [TRecords]) of
|
||||||
{atomic, _} ->
|
{atomic, _} ->
|
||||||
%% store subscription
|
%%TODO: store subscription
|
||||||
%% mnesia:async_dirty(fun add_subscriptions/2, [SubId, TopicTable]),
|
%% mnesia:async_dirty(fun add_subscriptions/2, [SubId, TopicTable]),
|
||||||
{reply, {ok, [Qos || {_Topic, Qos} <- TopicTable]}, State};
|
{reply, {ok, [Qos || {_Topic, Qos} <- TopicTable]}, State};
|
||||||
{aborted, Error} ->
|
{aborted, Error} ->
|
||||||
|
|
Loading…
Reference in New Issue