aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Romain <chris.romain@gmail.com>2010-05-28 13:42:35 +0200
committerChristophe Romain <chris.romain@gmail.com>2010-05-28 13:42:35 +0200
commitdb059bdfafb1e2ac412bb5d02a0a0227f2fdfccc (patch)
tree7f3415b6919841b50faaabef20a1b226b2cb1ee3
parentfix error code when unsubscribing from a non-existent node (thanks to Karim G... (diff)
fix error code when unsubscribing from a non-existent ODBC node (EJAB-1227)
-rw-r--r--src/mod_pubsub/node_hometree_odbc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_pubsub/node_hometree_odbc.erl b/src/mod_pubsub/node_hometree_odbc.erl
index a3618b78c..5adf24c00 100644
--- a/src/mod_pubsub/node_hometree_odbc.erl
+++ b/src/mod_pubsub/node_hometree_odbc.erl
@@ -379,7 +379,7 @@ unsubscribe_node(NodeId, Sender, Subscriber, SubId) ->
%% {error, ?ERR_EXTENDED(?ERR_NOT_ACCEPTABLE, "invalid-subid")};
%% Requesting entity is not a subscriber
Subscriptions == [] ->
- {error, ?ERR_EXTENDED(?ERR_UNEXPECTED_REQUEST, "not-subscribed")};
+ {error, ?ERR_EXTENDED(?ERR_UNEXPECTED_REQUEST_CANCEL, "not-subscribed")};
%% Subid supplied, so use that.
SubIdExists ->
Sub = first_in_list(fun(S) ->
@@ -393,7 +393,7 @@ unsubscribe_node(NodeId, Sender, Subscriber, SubId) ->
delete_subscription(SubKey, NodeId, S, Affiliation, Subscriptions),
{result, default};
false ->
- {error, ?ERR_EXTENDED(?ERR_UNEXPECTED_REQUEST, "not-subscribed")}
+ {error, ?ERR_EXTENDED(?ERR_UNEXPECTED_REQUEST_CANCEL, "not-subscribed")}
end;
%% Asking to remove all subscriptions to the given node
SubId == all ->