| 1349 | |
| 1350 | template <class Y> |
| 1351 | void done(CheckStatusWrapper* status, YEntry<Y>& entry, Y* y, std::function<void()> newClose, std::function<void()> oldClose) |
| 1352 | { |
| 1353 | if (entry.next()) |
| 1354 | newClose(); |
| 1355 | |
| 1356 | if (!(status->getState() & IStatus::STATE_ERRORS)) |
| 1357 | y->destroy(Y::DF_RELEASE | Y::DF_KEEP_NEXT); |
| 1358 | |
| 1359 | else if (status->getErrors()[1] == isc_interface_version_too_old) |
| 1360 | { |
| 1361 | status->init(); |
| 1362 | if (entry.next()) |
| 1363 | oldClose(); |
| 1364 | |
| 1365 | if (!(status->getState() & IStatus::STATE_ERRORS)) |
| 1366 | y->destroy(Y::DF_RELEASE); |
| 1367 | } |
| 1368 | } |
| 1369 | |
| 1370 | } // namespace Why |
| 1371 | |