1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

r7343: handle url like ldb_tdb does

(This used to be commit d36fde5c0c)
This commit is contained in:
Simo Sorce 2005-06-06 15:19:49 +00:00 committed by Gerald (Jerry) Carter
parent f9716b51cd
commit ca7baa3c9f

View File

@ -903,11 +903,16 @@ lsqlite3_initialize(struct lsqlite3_private *lsqlite3,
;
/* Skip protocol indicator of url */
if ((p = strchr(url, ':')) == NULL) {
return SQLITE_MISUSE;
} else {
++p;
}
if (strchr(url, ':')) {
if (strncmp(url, "sqlite://", 9) != 0) {
errno = EINVAL;
return SQLITE_MISUSE;
}
p = url + 9;
} else {
p = url;
}
/*
* See if we'll be creating a new database, or opening an existing one