summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-18 14:18:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:08 -0500
commitef0e98b757c484f8369fd2ede2fd7356b7b95830 (patch)
tree7803251ec3b74fa02ff9a014d614a2d48c1b5bd8 /source3
parent235bece8ff56b5174ee898b1bf4ad2bf4bd87ef5 (diff)
downloadsamba-ef0e98b757c484f8369fd2ede2fd7356b7b95830.tar.gz
samba-ef0e98b757c484f8369fd2ede2fd7356b7b95830.tar.bz2
samba-ef0e98b757c484f8369fd2ede2fd7356b7b95830.zip
r8543: merge volker's nt_printing_init() fix from trunk (r8526)
but make sure to write the new version to the ntdrivers.tdb. (This used to be commit 9e50d696c3e101174670c47ecbd6401bec2ab3d3)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index e7f10f4fc1..a7ba46cd51 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -522,7 +522,7 @@ BOOL nt_printing_init(void)
{
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 @@ BOOL nt_printing_init(void)
/* 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 ) {