From 796937fe75fe81bcc4a5e1e9754836defba7467d Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Thu, 8 Oct 2015 12:33:55 +0900 Subject: [PATCH] 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{