svn commit: samba r8526 - in trunk/source/printing: .

vlendec at samba.org vlendec at samba.org
Sun Jul 17 12:57:01 GMT 2005


Author: vlendec
Date: 2005-07-17 12:57:00 +0000 (Sun, 17 Jul 2005)
New Revision: 8526

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

Log:
Jerry, without this patch my smbd will not start up without an existing
ntdrivers.tdb. tdb_fetch_int32 will return -1 and the check for the existing
version number fails. You might want to merge this to 3_0.

Volker


Modified:
   trunk/source/printing/nt_printing.c


Changeset:
Modified: trunk/source/printing/nt_printing.c
===================================================================
--- trunk/source/printing/nt_printing.c	2005-07-17 12:23:40 UTC (rev 8525)
+++ trunk/source/printing/nt_printing.c	2005-07-17 12:57:00 UTC (rev 8526)
@@ -522,7 +522,7 @@
 {
 	const char *vstring = "INFO/version";
 	WERROR win_rc;
-	uint32 vers_id;
+	int32 vers_id;
 
 	if ( tdb_drivers && tdb_printers && tdb_forms )
 		return True;
@@ -557,6 +557,10 @@
 	/* handle a Samba upgrade */
 	
 	vers_id = tdb_fetch_int32(tdb_drivers, vstring);
+	if (vers_id == -1) {
+		DEBUG(10, ("Fresh database\n"));
+		vers_id = NTDRIVERS_DATABASE_VERSION_5;
+	}
 
 	if ( vers_id != NTDRIVERS_DATABASE_VERSION_5 ) {
 



More information about the samba-cvs mailing list