# HG changeset patch # User Kim Alvefur # Date 1507219564 -7200 # Node ID 90576b60f2d041f14a75f595a102ca8a36d4a938 # Parent 1ebe590c884937e08c704c1f5f46b061dcb589a9# Parent 34814a908557d7c9029bc0220510e3aed028ab2f Merge 0.10->trunk diff -r 1ebe590c8849 -r 90576b60f2d0 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Wed Oct 04 12:10:55 2017 +0200 +++ b/plugins/mod_storage_sql.lua Thu Oct 05 18:06:04 2017 +0200 @@ -415,8 +415,8 @@ function driver:purge(username) return engine:transaction(function() - local stmt,err = engine:delete("DELETE FROM \"prosody\" WHERE \"host\"=? AND \"user\"=?", host, username); - return true, err; + engine:delete("DELETE FROM \"prosody\" WHERE \"host\"=? AND \"user\"=?", host, username); + engine:delete("DELETE FROM \"prosodyarchive\" WHERE \"host\"=? AND \"user\"=?", host, username); end); end diff -r 1ebe590c8849 -r 90576b60f2d0 util-src/encodings.c --- a/util-src/encodings.c Wed Oct 04 12:10:55 2017 +0200 +++ b/util-src/encodings.c Thu Oct 05 18:06:04 2017 +0200 @@ -216,7 +216,7 @@ */ const char *check_utf8(lua_State *L, int idx, size_t *l) { size_t pos, len; - const char *s = luaL_checklstring(L, 1, &len); + const char *s = luaL_checklstring(L, idx, &len); pos = 0; while(pos <= len) {