From 0054445f134f7774c18e2340ed865c3307808be2 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Wed, 7 Oct 2015 18:52:24 +0900 Subject: [PATCH 1/2] Delete spammy message from fitness servers every 5 seconds --- src/machi_fitness.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machi_fitness.erl b/src/machi_fitness.erl index 67cf21b..82d18a6 100644 --- a/src/machi_fitness.erl +++ b/src/machi_fitness.erl @@ -185,7 +185,7 @@ handle_info({adjust_down_list, FLU}, #state{active_unfit=ActiveUnfit}=S) -> handle_info(dump, #state{my_flu_name=MyFluName,active_unfit=ActiveUnfit, pending_map=Map}=S) -> %% io:format(user, "DUMP: ~w/~w: ~p ~W\n", [MyFluName, self(), ActiveUnfit, map_value(Map), 13]), - io:format(user, "DUMP ~w: ~w, ", [MyFluName, ActiveUnfit]), + %% io:format(user, "DUMP ~w: ~w, ", [MyFluName, ActiveUnfit]), {noreply, S}; handle_info(_Info, S) -> {noreply, S}. From 796937fe75fe81bcc4a5e1e9754836defba7467d Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Thu, 8 Oct 2015 12:33:55 +0900 Subject: [PATCH 2/2] Add LL generic error PB response decoding --- src/machi_pb_translate.erl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/machi_pb_translate.erl b/src/machi_pb_translate.erl index 89128d6..bbb9951 100644 --- a/src/machi_pb_translate.erl +++ b/src/machi_pb_translate.erl @@ -190,10 +190,17 @@ from_pb_request(_Else) -> from_pb_response(#mpb_ll_response{ req_id=ReqID, + % There is no separate LL error response record + generic=#mpb_errorresp{code=Code, msg=Msg}}) -> + {ReqID, {error, {Code, Msg}}}; +from_pb_response(#mpb_ll_response{ + req_id=ReqID, + % There is no separate LL echo response record echo=#mpb_echoresp{message=Msg}}) -> {ReqID, Msg}; from_pb_response(#mpb_ll_response{ req_id=ReqID, + % There is no separate LL auth response record auth=#mpb_authresp{code=Code}}) -> {ReqID, Code}; from_pb_response(#mpb_ll_response{