summaryrefslogtreecommitdiff
path: root/components/proto_json
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2015-09-23 11:25:34 -0700
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2015-09-23 11:25:34 -0700
commitff78205abe7c50c3c0b2ce35ee8bb09e3f172502 (patch)
tree05a11b10b9db6625150d516a28935b733f81660c /components/proto_json
parent29365b45d1911d42cae9ca7fb9f05829d77c4bb7 (diff)
downloadrvi_core-ff78205abe7c50c3c0b2ce35ee8bb09e3f172502.tar.gz
mfeuer_json_param: Fixed message invocation to use single JSON object instead of array of objects as parameters structure.
Passed tests: Local WS -> WS ok Local HTTP -> WS ok Local WS -> HTTP ok Local HTTP -> HTTP ok RVI1:WS -> proto_json -> RVI2:WS ok RVI1:WS -> proto_json -> RVI2:HTTP ok RVI1:HTTP -> proto_json -> RVI2:WS ok RVI1HTTP -> proto_json -> RVI2:HTTP ok
Diffstat (limited to 'components/proto_json')
-rw-r--r--components/proto_json/src/proto_json_rpc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/proto_json/src/proto_json_rpc.erl b/components/proto_json/src/proto_json_rpc.erl
index 54ed2d3..7fd6b77 100644
--- a/components/proto_json/src/proto_json_rpc.erl
+++ b/components/proto_json/src/proto_json_rpc.erl
@@ -127,7 +127,7 @@ handle_call({rvi, send_message,
[
{ "service", ServiceName },
{ "timeout", Timeout },
- { "parameters", {array, Parameters} },
+ { "parameters", Parameters },
{ "signature", Signature }
]
}),
@@ -148,7 +148,7 @@ handle_cast({rvi, receive_message, [Payload, IP, Port]}, St) when is_binary(Payl
handle_cast({rvi, receive_message, [Payload, IP, Port]}, St) ->
{ok, {struct, Elems}} = exo_json:decode_string(Payload),
- [ ServiceName, Timeout, {array, Parameters}, Signature ] =
+ [ ServiceName, Timeout, Parameters, Signature ] =
opts(["service", "timeout", "parameters", "signature"], Elems, undefined),
?debug(" protocol:rcv(): service name: ~p~n", [ServiceName]),