]> granicus.if.org Git - ejabberd/commitdiff
fix error code when unsubscribing from a non-existent ODBC node (EJAB-1227)
authorChristophe Romain <chris.romain@gmail.com>
Fri, 28 May 2010 11:42:35 +0000 (13:42 +0200)
committerChristophe Romain <chris.romain@gmail.com>
Fri, 28 May 2010 11:42:35 +0000 (13:42 +0200)
src/mod_pubsub/node_hometree_odbc.erl

index a3618b78cea8d072bd93c141d2b885cd4032b8d1..5adf24c00f34f95c492e7521ecd6c8b8c24b819d 100644 (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 ->