Merge 0.10->trunk
[prosody.git] / plugins / mod_storage_sql.lua
index 7b810ab854a436c6dd16923aceb802c72f3bf074..a5bb5bfa5cddb621e32a6a6b0c1515e8891fc6ca 100644 (file)
@@ -380,10 +380,10 @@ end
 local driver = {};
 
 function driver:open(store, typ)
-       if not typ then -- default key-value store
-               return setmetatable({ store = store }, keyval_store);
+       if typ and typ ~= "keyval" then
+               return nil, "unsupported-store";
        end
-       return nil, "unsupported-store";
+       return setmetatable({ store = store }, keyval_store);
 end
 
 function driver:stores(username)