1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-22 17:57:46 +03:00

Use default Sqlite error codes

This commit is contained in:
Ruben S. Montero 2010-09-02 23:57:54 +02:00
parent 1ad45c3f26
commit 20ab7f02a2

View File

@ -99,7 +99,7 @@ int SqliteDB::exec(ostringstream& cmd, Callbackable* obj)
rc = sqlite3_exec(db, c_str, callback, arg, &err_msg);
if (rc == SQLITE_BUSY || rc == SQLITE_IOERR_BLOCKED)
if (rc == SQLITE_BUSY || rc == SQLITE_IOERR)
{
struct timeval timeout;
fd_set zero;
@ -110,7 +110,7 @@ int SqliteDB::exec(ostringstream& cmd, Callbackable* obj)
select(0, &zero, &zero, &zero, &timeout);
}
}while( (rc == SQLITE_BUSY || rc == SQLITE_IOERR_BLOCKED) &&
}while( (rc == SQLITE_BUSY || rc == SQLITE_IOERR) &&
(counter < 10));
unlock();