summaryrefslogtreecommitdiff
path: root/components/dlink_tcp/src/dlink_tcp_rpc.erl
diff options
context:
space:
mode:
Diffstat (limited to 'components/dlink_tcp/src/dlink_tcp_rpc.erl')
-rw-r--r--components/dlink_tcp/src/dlink_tcp_rpc.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/dlink_tcp/src/dlink_tcp_rpc.erl b/components/dlink_tcp/src/dlink_tcp_rpc.erl
index f094fff..9a8be64 100644
--- a/components/dlink_tcp/src/dlink_tcp_rpc.erl
+++ b/components/dlink_tcp/src/dlink_tcp_rpc.erl
@@ -385,7 +385,7 @@ handle_socket_(FromPid, PeerIP, PeerPort, data, Elems, CompSpec) ->
%% JSON-RPC entry point
%% CAlled by local exo http server
-handle_notification("service_available", Args) ->
+handle_notification(<<"service_available">>, Args) ->
{ok, SvcName} = rvi_common:get_json_element([<<"service">>], Args),
{ok, DataLinkModule} = rvi_common:get_json_element([<<"data_link_module">>], Args),
@@ -394,7 +394,7 @@ handle_notification("service_available", Args) ->
DataLinkModule ]}),
ok;
-handle_notification("service_unavailable", Args) ->
+handle_notification(<<"service_unavailable">>, Args) ->
{ok, SvcName} = rvi_common:get_json_element([<<"service">>], Args),
{ok, DataLinkModule} = rvi_common:get_json_element([<<"data_link_module">>], Args),
@@ -408,7 +408,7 @@ handle_notification(Other, _Args) ->
?info("dlink_tcp:handle_notification(~p): unknown", [ Other ]),
ok.
-handle_rpc("setup_data_link", Args) ->
+handle_rpc(<<"setup_data_link">>, Args) ->
{ ok, Service } = rvi_common:get_json_element([<<"service">>], Args),
{ ok, Opts } = rvi_common:get_json_element([<<"opts">>], Args),
@@ -418,12 +418,12 @@ handle_rpc("setup_data_link", Args) ->
{ok, [ {status, rvi_common:json_rpc_status(Res)} , { timeout, Timeout }]};
-handle_rpc("disconnect_data_link", Args) ->
+handle_rpc(<<"disconnect_data_link">>, Args) ->
{ ok, NetworkAddress} = rvi_common:get_json_element([<<"network_address">>], Args),
[Res] = gen_server:call(?SERVER, { rvi, disconnect_data_link, [NetworkAddress]}),
{ok, [ {status, rvi_common:json_rpc_status(Res)} ]};
-handle_rpc("send_data", Args) ->
+handle_rpc(<<"send_data">>, Args) ->
{ ok, ProtoMod } = rvi_common:get_json_element([<<"proto_mod">>], Args),
{ ok, Service } = rvi_common:get_json_element([<<"service">>], Args),
{ ok, Data } = rvi_common:get_json_element([<<"data">>], Args),
@@ -431,7 +431,7 @@ handle_rpc("send_data", Args) ->
[ Res ] = gen_server:call(?SERVER, { rvi, send_data, [ProtoMod, Service, Data, DataLinkOpts]}),
{ok, [ {status, rvi_common:json_rpc_status(Res)} ]};
-handle_rpc("connections", []) ->
+handle_rpc(<<"connections">>, []) ->
Res = gen_server:call(?SERVER, connections),
{ok, [ {status, ok} | {connections, Res} ]};
@@ -674,7 +674,7 @@ process_authorize(FromPid, PeerIP, PeerPort,
?debug("dlink_tcp:authorize(): Credentials: ~p", [ [authorize_keys:abbrev_bin(C) || C <- Credentials] ]),
F = fun() ->
- process_authorize_(FromPid, PeerIP, PeerPort,
+ process_authorize_(FromPid, PeerIP, PeerPort,
ProtoVersion, Credentials, CompSpec)
end,
case connection_manager:find_connection_by_address(PeerIP, PeerPort) of