Changeset 4266
- Timestamp:
- 08/21/08 11:25:06 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/libstrongswan/plugins/sqlite/sqlite_database.c
r4193 r4266 19 19 20 20 #include <sqlite3.h> 21 #include <unistd.h> 21 22 #include <library.h> 22 23 #include <debug.h> … … 291 292 292 293 /** 294 * Busy handler implementation 295 */ 296 static int busy_handler(private_sqlite_database_t *this, int count) 297 { 298 /* add an sleep, exponentially longer on every try */ 299 usleep(count * count * 1000); 300 /* always retry */ 301 return 1; 302 } 303 304 /** 293 305 * Implementation of database_t.destroy 294 306 */ … … 334 346 } 335 347 348 sqlite3_busy_handler(this->db, (void*)busy_handler, this); 349 336 350 return &this->public; 337 351 }
