aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2013-06-24 13:42:34 +0200
committerChristophe Romain <christophe.romain@process-one.net>2013-06-24 13:42:34 +0200
commit222a94300bdd0ce7b3b0c876d1bb30569ce3974b (patch)
tree084e0412441efedea0fe4452e738e41fd021fbb0 /src
parentImprove the "dialyzer" target (diff)
fix decode function for binaryzed data
Diffstat (limited to 'src')
-rw-r--r--src/node_hometree_odbc.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node_hometree_odbc.erl b/src/node_hometree_odbc.erl
index 36d6c8866..216b5fcbe 100644
--- a/src/node_hometree_odbc.erl
+++ b/src/node_hometree_odbc.erl
@@ -68,7 +68,7 @@
set_item/1, get_item_name/3, get_last_items/3,
path_to_node/1, node_to_path/1]).
--export([decode_jid/1, decode_node/1,
+-export([decode_jid/1,
decode_affiliation/1, decode_subscriptions/1,
encode_jid/1, encode_affiliation/1,
encode_subscriptions/1]).
@@ -1612,10 +1612,10 @@ update_subscription(NodeId, JID, Subscription) ->
S, <<"');">>])
end.
-decode_jid(SJID) ->
- jlib:jid_tolower(jlib:string_to_jid(SJID)).
-
-decode_node(N) -> (?PUBSUB):string_to_node(N).
+decode_jid(SJID) when is_list(SJID) ->
+ jlib:jid_tolower(jlib:string_to_jid(SJID));
+decode_jid(BJID) when is_binary(BJID) ->
+ decode_jid(binary_to_list(BJID)).
decode_affiliation(<<"o">>) -> owner;
decode_affiliation(<<"p">>) -> publisher;