lib: fixed state machine bug in Restore::SkipCurrentDB()
commit5d5c13fd54cd7e0a738b66c71cd8a9f11d4e6ebc
authorChris Frey <cdfrey@foursquare.net>
Tue, 10 Jan 2012 05:10:50 +0000 (10 00:10 -0500)
committerChris Frey <cdfrey@foursquare.net>
Tue, 10 Jan 2012 05:10:50 +0000 (10 00:10 -0500)
treee972ac8888c113268a9e4d129c58d1553fa1a39a
parentf4cbc2d04887ef15f273f91877d189ff496b9514
lib: fixed state machine bug in Restore::SkipCurrentDB()

If for some reason, the user wishes to skip a database, and then call
GetNextMeta() right after it to process the next database, the old code
would have the state stuck in RS_DBEND, which would only get cleared in
the BuildRecord() callback.

The barrybackup GUI hit this bug... it uses SkipCurrentDB() in the
exception handler to clear an errored database, but if the state wasn't
reset, it got stuck in an endless loop of EoF checks and GetNextMeta().
src/restore.cc