summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/param/loadparm.c10
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ff32bdca64..0df45392e6 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1984,6 +1984,8 @@ BOOL lp_add_printer(char *pszPrintername, int iDefaultService)
DEBUG(3, ("adding printer service %s\n", pszPrintername));
+ update_server_announce_as_printserver();
+
return (True);
}
@@ -3355,6 +3357,13 @@ void lp_add_one_printer(char *name, char *comment)
}
}
+/* Announce ourselves as a print server */
+
+void update_server_announce_as_printserver(void)
+{
+ default_server_announce |= SV_TYPE_PRINTQ_SERVER;
+}
+
/***************************************************************************
Have we loaded a services file yet?
***************************************************************************/
@@ -3666,7 +3675,6 @@ static void set_default_server_announce_type(void)
default_server_announce |= SV_TYPE_WORKSTATION;
default_server_announce |= SV_TYPE_SERVER;
default_server_announce |= SV_TYPE_SERVER_UNIX;
- default_server_announce |= SV_TYPE_PRINTQ_SERVER;
switch (lp_announce_as())
{
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 8419152cf2..c4a8d3917c 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4848,6 +4848,9 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
}
file_lines_free(qlines);
+
+ update_server_announce_as_printserver();
+
return True;
}