diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-09-01 06:51:27 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-09-01 06:51:27 +0000 |
commit | 95c8a54c7d4488b5bdd6fb73196bf1463e7556e9 (patch) | |
tree | 4e1af5164ca6e005d57d3f40a57c0749abf14b28 /src/os_unix.c | |
parent | c3f759bd33d4dca9313ece9821a07ac78633249c (diff) | |
download | sqlite-95c8a54c7d4488b5bdd6fb73196bf1463e7556e9.tar.gz sqlite-95c8a54c7d4488b5bdd6fb73196bf1463e7556e9.zip |
Fix for registration of non-default vfs objects. (CVS 4360)
FossilOrigin-Name: 5f48fb95c26a713b3259ee49fd444108030376dc
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index b74e9f1d6..46a176182 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2568,14 +2568,20 @@ static int unixFullPathname(sqlite3_vfs *pVfs, const char *zPath, char *zOut){ static void *unixDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL); } + +/* +** SQLite calls this function immediately after a call to unixDlSym() or +** unixDlOpen() fails (returns a null pointer). If a more detailed error +** message is available, it is written to zBufOut. If no error message +** is available, zBufOut is left unmodified and SQLite uses a default +** error message. +*/ static void unixDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){ char *zErr; enterMutex(); zErr = dlerror(); if( zErr ){ sqlite3_snprintf(nBuf, zBufOut, "%s", zErr); - }else if(nBuf>0) { - zBufOut[0] = '\0'; } leaveMutex(); } |