0.1.5 bug fix
This commit is contained in:
parent
3979c83550
commit
3626979e31
7
CHANGES
7
CHANGES
|
@ -1,3 +1,10 @@
|
|||
Changes with emqtt 0.1.5 05 Jan 2012
|
||||
|
||||
*) Bugfix: remove QOS_1 match when handle PUBREL request
|
||||
|
||||
*) Bugfix: reverse word in emqtt_topic:words/1 function
|
||||
|
||||
|
||||
Changes with emqtt 0.1.4 04 Jan 2012
|
||||
|
||||
*) Bugfix: fix "mosquitto_sub -q 2 ......" bug
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{lib_dirs, ["../..", "../lib", "../plugins"]},
|
||||
{erts, [{mod_cond, derived}, {app_file, strip}]},
|
||||
{app_file, strip},
|
||||
{rel, "emqtt", "0.1.2",
|
||||
{rel, "emqtt", "0.1.5",
|
||||
[
|
||||
kernel,
|
||||
stdlib,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{application, emqtt,
|
||||
[
|
||||
{description, "erlang mqtt broker"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{modules, [
|
||||
emqtt,
|
||||
emqtt_app,
|
||||
|
|
|
@ -291,7 +291,6 @@ process_request(?PUBREC, #mqtt_frame{
|
|||
|
||||
process_request(?PUBREL,
|
||||
#mqtt_frame{
|
||||
fixed = #mqtt_frame_fixed{ qos = ?QOS_1 },
|
||||
variable = #mqtt_frame_publish{message_id = MsgId}},
|
||||
State=#state{socket=Sock}) ->
|
||||
erase({msg, MsgId}),
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
%%
|
||||
-module(emqtt_topic).
|
||||
|
||||
-import(lists, [reverse/1]).
|
||||
|
||||
-import(string, [rchr/2, substr/2, substr/3]).
|
||||
|
||||
%% ------------------------------------------------------------------------
|
||||
|
@ -113,13 +115,13 @@ words(Topic) when is_list(Topic) ->
|
|||
words(Topic, [], []).
|
||||
|
||||
words([], Word, ResAcc) ->
|
||||
lists:reverse([Word|ResAcc]);
|
||||
reverse([reverse(W) || W <- [Word|ResAcc]]);
|
||||
|
||||
words([$/|Topic], Word, ResAcc) ->
|
||||
words(Topic, [], [Word|ResAcc]);
|
||||
|
||||
words([C|Topic], Word, ResAcc) ->
|
||||
words(Topic, lists:reverse([C|Word]), ResAcc).
|
||||
words(Topic, [C|Word], ResAcc).
|
||||
|
||||
valid([""|Words]) -> valid2(Words);
|
||||
valid(Words) -> valid2(Words).
|
||||
|
|
Loading…
Reference in New Issue