diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-05 18:06:04 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-05 18:06:04 +0200 |
commit | 4730aead9e3dcc0096ffb73f9b31f87b0069ad8c (patch) | |
tree | 691fe346b53e4d17c388e45cd54dd15bf8f6bb06 | |
parent | 5970fb161e2c811c59d0b0a512c8f8a756a7814a (diff) | |
parent | 621ee7226fc62b872cb6b74797b97ee509d620c8 (diff) | |
download | prosody-4730aead9e3dcc0096ffb73f9b31f87b0069ad8c.tar.gz prosody-4730aead9e3dcc0096ffb73f9b31f87b0069ad8c.zip |
Merge 0.10->trunk
-rw-r--r-- | plugins/mod_storage_sql.lua | 4 | ||||
-rw-r--r-- | util-src/encodings.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index e53deef3..4c65b4f4 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -415,8 +415,8 @@ end 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 --git a/util-src/encodings.c b/util-src/encodings.c index 465819d5..d85c7cf6 100644 --- a/util-src/encodings.c +++ b/util-src/encodings.c @@ -216,7 +216,7 @@ static const char *utf8_decode(const char *o, int *val) { */ 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) { |