mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
Patch to only set SV_TYPE_PRINTQ_SERVER in default_server_announce if a
print share is exported. Needs some more testing.
This commit is contained in:
parent
793d9306e2
commit
92b36482fd
@ -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())
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user