svn commit: samba r7343 - in branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3: .

idra at samba.org idra at samba.org
Mon Jun 6 15:19:50 GMT 2005


Author: idra
Date: 2005-06-06 15:19:49 +0000 (Mon, 06 Jun 2005)
New Revision: 7343

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7343

Log:
handle url like ldb_tdb does
Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c	2005-06-06 15:03:16 UTC (rev 7342)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c	2005-06-06 15:19:49 UTC (rev 7343)
@@ -903,11 +903,16 @@
                 ;
         
         /* 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



More information about the samba-cvs mailing list