]> granicus.if.org Git - ejabberd/commitdiff
typo fix
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 23 Dec 2008 10:53:06 +0000 (10:53 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 23 Dec 2008 10:53:06 +0000 (10:53 +0000)
SVN Revision: 1748

src/mod_caps.erl

index d39deb0f88b13521b09e2e1e969ba3d41db38362..a78ae3fe5ae2f55478060169a03d2e024efe3b4f 100644 (file)
@@ -234,16 +234,16 @@ handle_cast({note_caps, From,
            #state{host = Host, disco_requests = Requests} = State) ->
     %% XXX: this leads to race conditions where ejabberd will send
     %% lots of caps disco requests.
+    {U, S, R} = jlib:jid_tolower(From),
     BJID = list_to_binary(jlib:jid_to_string(From)),
     mnesia:dirty_write(#user_caps{jid = BJID, caps = Caps}),
-    case ejabberd_sm:get_user_resources(LUser, LServer) of
+    case ejabberd_sm:get_user_resources(U, S) of
        [] ->
            ok;
        _ -> 
            % only store default resource of external contacts
-           {_, _, R} = jlib:jid_tolower(From),
            BUID = list_to_binary(jlib:jid_to_string(jlib:jid_remove_resource(From))),
-           mnesia:dirty_write(#user_caps_default{uid = BUID, resource = R}),
+           mnesia:dirty_write(#user_caps_default{uid = BUID, resource = R})
     end,
     SubNodes = [Version | Exts],
     %% Now, find which of these are not already in the database.