aboutsummaryrefslogtreecommitdiff
path: root/src/test6.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-08-25 12:29:30 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-08-25 12:29:30 +0000
commit0e87b7010022d5a1512c52f6f53f72d00dbaaebe (patch)
treec82aee92d4bbe3e7b45eb5817ade5566df70ef90 /src/test6.c
parentdc3060fea3d533358fb9f0b276a8f9cc324384e1 (diff)
downloadsqlite-0e87b7010022d5a1512c52f6f53f72d00dbaaebe.tar.gz
sqlite-0e87b7010022d5a1512c52f6f53f72d00dbaaebe.zip
Make the test_async backend work again. (CVS 4293)
FossilOrigin-Name: 04167483aad42d319393e8caf470d8de11e468d8
Diffstat (limited to 'src/test6.c')
-rw-r--r--src/test6.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/test6.c b/src/test6.c
index 860e8730d..6747fb613 100644
--- a/src/test6.c
+++ b/src/test6.c
@@ -517,8 +517,7 @@ struct crashAppData {
};
/*
-** Open a crash-file file handle. The vfs pVfs is used to open
-** the underlying real file.
+** Open a crash-file file handle.
**
** The caller will have allocated pVfs->szOsFile bytes of space
** at pFile. This file uses this space for the CrashFile structure
@@ -585,6 +584,18 @@ static void *cfDlOpen(sqlite3_vfs *pCfVfs, const char *zPath){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
return pVfs->xDlOpen(pVfs, zPath);
}
+static void cfDlError(sqlite3_vfs *pCfVfs, int nByte, char *zErrMsg){
+ sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
+ pVfs->xDlError(pVfs, nByte, zErrMsg);
+}
+static void *cfDlSym(sqlite3_vfs *pCfVfs, void *pHandle, const char *zSymbol){
+ sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
+ return pVfs->xDlSym(pVfs, pHandle, zSymbol);
+}
+static void cfDlClose(sqlite3_vfs *pCfVfs, void *pHandle){
+ sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
+ pVfs->xDlClose(pVfs, pHandle);
+}
static int cfRandomness(sqlite3_vfs *pCfVfs, int nByte, char *zBufOut){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
return pVfs->xRandomness(pVfs, nByte, zBufOut);
@@ -732,9 +743,9 @@ static int crashParamsObjCmd(
cfGetTempName, /* xGetTempName */
cfFullPathname, /* xFullPathname */
cfDlOpen, /* xDlOpen */
- 0, /* xDlError */
- 0, /* xDlSym */
- 0, /* xDlClose */
+ cfDlError, /* xDlError */
+ cfDlSym, /* xDlSym */
+ cfDlClose, /* xDlClose */
cfRandomness, /* xRandomness */
cfSleep, /* xSleep */
cfCurrentTime /* xCurrentTime */
@@ -743,9 +754,6 @@ static int crashParamsObjCmd(
if( crashVfs.pAppData==0 ){
sqlite3_vfs *pOriginalVfs = sqlite3_vfs_find(0);
- crashVfs.xDlError = pOriginalVfs->xDlError;
- crashVfs.xDlSym = pOriginalVfs->xDlSym;
- crashVfs.xDlClose = pOriginalVfs->xDlClose;
crashVfs.mxPathname = pOriginalVfs->mxPathname;
crashVfs.pAppData = (void *)pOriginalVfs;
crashVfs.szOsFile = sizeof(CrashFile) + pOriginalVfs->szOsFile;