summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 9 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())
{