read all data fetched by sqlite3
This commit is contained in:
parent
263f0b11d8
commit
b6811cfe5a
1 changed files with 9 additions and 0 deletions
|
@ -236,6 +236,8 @@ bool SQLite3Backend::getUser(const std::string &barejid, UserInfo &user) {
|
|||
user.encoding = (const char *) sqlite3_column_text(m_getUser, 4);
|
||||
user.language = (const char *) sqlite3_column_text(m_getUser, 5);
|
||||
user.vip = sqlite3_column_int(m_getUser, 6) != 0;
|
||||
while((ret = sqlite3_step(m_getUser)) == SQLITE_ROW) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -390,6 +392,9 @@ bool SQLite3Backend::getBuddies(long id, std::list<BuddyInfo> &roster) {
|
|||
roster.push_back(b);
|
||||
}
|
||||
|
||||
while((ret = sqlite3_step(m_getBuddiesSettings)) == SQLITE_ROW) {
|
||||
}
|
||||
|
||||
if (ret != SQLITE_DONE) {
|
||||
LOG4CXX_ERROR(logger, "getBuddies query"<< (sqlite3_errmsg(m_db) == NULL ? "" : sqlite3_errmsg(m_db)));
|
||||
return false;
|
||||
|
@ -446,6 +451,10 @@ void SQLite3Backend::getUserSetting(long id, const std::string &variable, int &t
|
|||
type = GET_INT(m_getUserSetting);
|
||||
value = GET_STR(m_getUserSetting);
|
||||
}
|
||||
|
||||
int ret;
|
||||
while((ret = sqlite3_step(m_getUserSetting)) == SQLITE_ROW) {
|
||||
}
|
||||
}
|
||||
|
||||
void SQLite3Backend::updateUserSetting(long id, const std::string &variable, const std::string &value) {
|
||||
|
|
Loading…
Add table
Reference in a new issue