Merge branch 'dev' into dev-hd

This commit is contained in:
huangdan 2015-06-29 21:12:16 +08:00
commit f7cf49a17f
3 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@
"plugins/*/"]}.
{deps, [
{gproc, "0.4.*", {git, "git://github.com/uwiger/gproc.git", {branch, "master"}}},
{gproc, ".*", {git, "git://github.com/uwiger/gproc.git", {branch, "master"}}},
{lager, ".*", {git, "git://github.com/basho/lager.git", {branch, "master"}}},
{esockd, "2.*", {git, "git://github.com/emqtt/esockd.git", {branch, "master"}}},
{mochiweb, ".*", {git, "git://github.com/emqtt/mochiweb.git", {branch, "master"}}}

View File

@ -106,15 +106,15 @@ handle_info({stop, duplicate_id, _NewPid}, State=#state{proto_state = ProtoState
[emqttd_protocol:clientid(ProtoState), ConnName]),
stop({shutdown, duplicate_id}, State);
handle_info({deliver, Message}, #state{proto_state = ProtoState} = State) ->
handle_info({deliver, Message}, State = #state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:send(Message, ProtoState),
{noreply, State#state{proto_state = ProtoState1}};
handle_info({redeliver, {?PUBREL, PacketId}}, #state{proto_state = ProtoState} = State) ->
handle_info({redeliver, {?PUBREL, PacketId}}, State = #state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:redeliver({?PUBREL, PacketId}, ProtoState),
{noreply, State#state{proto_state = ProtoState1}};
handle_info({subscribe, TopicTable}, #state{proto_state = ProtoState} = State) ->
handle_info({subscribe, TopicTable}, State = #state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:handle({subscribe, TopicTable}, ProtoState),
{noreply, State#state{proto_state = ProtoState1}};

View File

@ -127,19 +127,19 @@ handle_cast({received, Packet}, State = #client_state{proto_state = ProtoState})
handle_cast(_Msg, State) ->
{noreply, State}.
handle_info({deliver, Message}, #client_state{proto_state = ProtoState} = State) ->
handle_info({deliver, Message}, State = #client_state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:send(Message, ProtoState),
{noreply, State#client_state{proto_state = ProtoState1}};
handle_info({redeliver, {?PUBREL, PacketId}}, #client_state{proto_state = ProtoState} = State) ->
handle_info({redeliver, {?PUBREL, PacketId}}, State = #client_state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:redeliver({?PUBREL, PacketId}, ProtoState),
{noreply, State#client_state{proto_state = ProtoState1}};
handle_info({subscribe, TopicTable}, #client_state{proto_state = ProtoState} = State) ->
handle_info({subscribe, TopicTable}, State = #client_state{proto_state = ProtoState}) ->
{ok, ProtoState1} = emqttd_protocol:handle({subscribe, TopicTable}, ProtoState),
{noreply, State#client_state{proto_state = ProtoState1}};
handle_info({stop, duplicate_id, _NewPid}, State=#client_state{proto_state = ProtoState}) ->
handle_info({stop, duplicate_id, _NewPid}, State = #client_state{proto_state = ProtoState}) ->
lager:error("Shutdown for duplicate clientid: ~s", [emqttd_protocol:clientid(ProtoState)]),
stop({shutdown, duplicate_id}, State);