From ef0e98b757c484f8369fd2ede2fd7356b7b95830 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 18 Jul 2005 14:18:39 +0000 Subject: 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) --- source3/printing/nt_printing.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3') 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 ) { -- cgit