svn commit: samba r8543 - branches/SAMBA_3_0/source/printing trunk/source/printing

jerry at samba.org jerry at samba.org
Mon Jul 18 14:18:40 GMT 2005


Author: jerry
Date: 2005-07-18 14:18:39 +0000 (Mon, 18 Jul 2005)
New Revision: 8543

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

Log:
merge volker's nt_printing_init() fix from trunk (r8526)
but make sure to write the new version to the ntdrivers.tdb.


Modified:
   branches/SAMBA_3_0/source/printing/nt_printing.c
   trunk/source/printing/nt_printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===================================================================
--- branches/SAMBA_3_0/source/printing/nt_printing.c	2005-07-18 13:16:52 UTC (rev 8542)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c	2005-07-18 14:18:39 UTC (rev 8543)
@@ -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,11 @@
 	/* handle a Samba upgrade */
 	
 	vers_id = tdb_fetch_int32(tdb_drivers, vstring);
+	if (vers_id == -1) {
+		DEBUG(10, ("Fresh database\n"));
+		tdb_store_int32( tdb_drivers, vstring, NTDRIVERS_DATABASE_VERSION_5 );
+		vers_id = NTDRIVERS_DATABASE_VERSION_5;
+	}
 
 	if ( vers_id != NTDRIVERS_DATABASE_VERSION_5 ) {
 

Modified: trunk/source/printing/nt_printing.c
===================================================================
--- trunk/source/printing/nt_printing.c	2005-07-18 13:16:52 UTC (rev 8542)
+++ trunk/source/printing/nt_printing.c	2005-07-18 14:18:39 UTC (rev 8543)
@@ -559,6 +559,7 @@
 	vers_id = tdb_fetch_int32(tdb_drivers, vstring);
 	if (vers_id == -1) {
 		DEBUG(10, ("Fresh database\n"));
+		tdb_store_int32( tdb_drivers, vstring, NTDRIVERS_DATABASE_VERSION_5 );
 		vers_id = NTDRIVERS_DATABASE_VERSION_5;
 	}
 



More information about the samba-cvs mailing list