]> granicus.if.org Git - ejabberd/commitdiff
Fix errors reported by dialyzer
authorBadlop <badlop@process-one.net>
Wed, 18 May 2011 17:46:35 +0000 (19:46 +0200)
committerBadlop <badlop@process-one.net>
Wed, 18 May 2011 17:46:56 +0000 (19:46 +0200)
src/mod_caps.erl
src/mod_offline.erl

index 7e494bffcd9a8325d39c5e98051360a0e0ff2d84..16b4a69d1ff905dad0c87bd8a20821c5223fb58b 100644 (file)
@@ -186,7 +186,7 @@ user_receive_packet(_JID, _From, _To, _Packet) ->
 
 caps_stream_features(Acc, MyHost) ->
     case make_my_disco_hash(MyHost) of
-       "" ->
+       <<"">> ->
            Acc;
        Hash ->
            [#xmlel{name = c,
@@ -470,7 +470,7 @@ make_my_disco_hash(Host) ->
                      end, Features),
            make_disco_hash(Identities ++ Info ++ Feats, sha1);
        _Err ->
-           ""
+           <<"">>
     end.
 
 -ifdef(HAVE_MD2).
@@ -478,7 +478,7 @@ make_disco_hash(DiscoEls, Algo) ->
     Concat = [concat_identities(DiscoEls),
              concat_features(DiscoEls),
              concat_info(DiscoEls)],
-    base64:encode_to_string(
+    base64:encode(
       if Algo == md2 ->
              sha:md2(Concat);
         Algo == md5 ->
@@ -519,7 +519,7 @@ make_disco_hash(DiscoEls, Algo) ->
     Concat = [concat_identities(DiscoEls),
              concat_features(DiscoEls),
              concat_info(DiscoEls)],
-    base64:encode_to_string(
+    base64:encode(
       if Algo == md5 ->
              crypto:md5(Concat);
         Algo == sha1 ->
index af4ee06f38cfb24256d3c20af0e36c9b1a0730e2..2202a4241bfdf6947a58862d8bd057ad0b0f3b81 100644 (file)
@@ -597,6 +597,7 @@ webadmin_page(_, Host,
 webadmin_page(Acc, _, _) -> Acc.
 
 user_queue(User, Server, Query, Lang) ->
+    ServerB = list_to_binary(Server),
        US0 = {
          exmpp_stringprep:nodeprep(list_to_binary(User)),
          exmpp_stringprep:nameprep(list_to_binary(Server))
@@ -606,11 +607,11 @@ user_queue(User, Server, Query, Lang) ->
          US0,
          user_queue_parse_query(US0, Query),
          lists:keysort(#offline_msg.timestamp,
-                        gen_storage:dirty_read(Server, {offline_msg, US0}))
+                        gen_storage:dirty_read(ServerB, {offline_msg, US0}))
        }
     catch
        _ ->
-           {{"invalid", "invalid"}, [], nothing}
+           {{"invalid", "invalid"}, [], []}
     end,
     Msgs = get_messages_subset(User, Server, MsgsAll),
     FMsgs =