fix error code when unsubscribing from a non-existent ODBC node (EJAB-1227)

This commit is contained in:
Christophe Romain 2010-05-28 13:42:35 +02:00
parent 2291a6afea
commit db059bdfaf
1 changed files with 2 additions and 2 deletions

View File

@ -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 ->