Fix coap uri format (#5059)
This commit is contained in:
parent
b92940af29
commit
77a41ea88f
|
@ -1,5 +1,5 @@
|
||||||
{deps,
|
{deps,
|
||||||
[{lwm2m_coap, {git, "https://github.com/emqx/lwm2m-coap", {tag, "v1.1.4"}}}
|
[{lwm2m_coap, {git, "https://github.com/emqx/lwm2m-coap", {tag, "v1.1.5"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{profiles,
|
{profiles,
|
||||||
|
|
|
@ -48,11 +48,11 @@
|
||||||
-define(LOG(Level, Format, Args), logger:Level("LWM2M-RESOURCE: " ++ Format, Args)).
|
-define(LOG(Level, Format, Args), logger:Level("LWM2M-RESOURCE: " ++ Format, Args)).
|
||||||
|
|
||||||
-dialyzer([{nowarn_function, [coap_discover/2]}]).
|
-dialyzer([{nowarn_function, [coap_discover/2]}]).
|
||||||
% we use {'absolute', string(), [{atom(), binary()}]} as coap_uri()
|
% we use {'absolute', list(binary()), [{atom(), binary()}]} as coap_uri()
|
||||||
% https://github.com/emqx/lwm2m-coap/blob/258e9bd3762124395e83c1e68a1583b84718230f/src/lwm2m_coap_resource.erl#L61
|
% https://github.com/emqx/lwm2m-coap/blob/258e9bd3762124395e83c1e68a1583b84718230f/src/lwm2m_coap_resource.erl#L61
|
||||||
% resource operations
|
% resource operations
|
||||||
coap_discover(_Prefix, _Args) ->
|
coap_discover(_Prefix, _Args) ->
|
||||||
[{absolute, "mqtt", []}].
|
[{absolute, [<<"mqtt">>], []}].
|
||||||
|
|
||||||
coap_get(ChId, [?PREFIX], Query, Content, Lwm2mState) ->
|
coap_get(ChId, [?PREFIX], Query, Content, Lwm2mState) ->
|
||||||
?LOG(debug, "~p ~p GET Query=~p, Content=~p", [self(),ChId, Query, Content]),
|
?LOG(debug, "~p ~p GET Query=~p, Content=~p", [self(),ChId, Query, Content]),
|
||||||
|
|
Loading…
Reference in New Issue