summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorUlf Wiger <ulf@feuerlabs.com>2016-01-08 09:07:54 -0800
committerUlf Wiger <ulf@feuerlabs.com>2016-01-08 09:07:54 -0800
commit3be022adca84faa79ec214f1217da8b99a112a0f (patch)
tree6a875a9932a63cbae1b7310c7cdb669bdcac6edf /components
parent438bb0aaea7317f8311f942a2d1718bf1f22c1b7 (diff)
downloadrvi_core-3be022adca84faa79ec214f1217da8b99a112a0f.tar.gz
more debug on finding service
Diffstat (limited to 'components')
-rw-r--r--components/dlink_tls/src/dlink_tls_rpc.erl14
1 files changed, 10 insertions, 4 deletions
diff --git a/components/dlink_tls/src/dlink_tls_rpc.erl b/components/dlink_tls/src/dlink_tls_rpc.erl
index 6acc24f..5d78918 100644
--- a/components/dlink_tls/src/dlink_tls_rpc.erl
+++ b/components/dlink_tls/src/dlink_tls_rpc.erl
@@ -118,7 +118,7 @@ start_connection_manager() ->
setup_persistent_connections_(PersistentConnections, CompSpec),
ok.
-setup_initial_listeners([], CompSpec) ->
+setup_initial_listeners([], _CompSpec) ->
?debug("no initial listeners", []);
setup_initial_listeners([_|_] = TlsOpts, CompSpec) ->
IP = proplists:get_value(ip, TlsOpts, ?DEFAULT_TCP_ADDRESS),
@@ -605,16 +605,22 @@ get_services_by_connection(ConnPid) ->
get_connections_by_service(Service) ->
+ ?debug("get_connections_by_service(~p,~n~p)",
+ [Service, ets:tab2list(?SERVICE_TABLE)]),
case ets:lookup(?SERVICE_TABLE, Service) of
[ #service_entry { connections = Connections } ] ->
+ ?debug("~p found; ~p", [Service, Connections]),
Connections;
- [] -> []
+ [] ->
+ ?debug("~p not found", [Service]),
+ []
end.
add_services(SvcNameList, ConnPid) ->
%% Create or replace existing connection table entry
%% with the sum of new and old services.
+ ?debug("add_services(~p, ~p)", [SvcNameList, ConnPid]),
ets:insert(?CONNECTION_TABLE,
#connection_entry {
connection = ConnPid,
@@ -800,8 +806,8 @@ get_credentials(CompSpec) ->
%% false
%% end.
-term_to_json(Term) ->
- binary_to_list(iolist_to_binary(exo_json:encode(Term))).
+%% term_to_json(Term) ->
+%% binary_to_list(iolist_to_binary(exo_json:encode(Term))).
opt(K, L, Def) ->
case lists:keyfind(K, 1, L) of