mirror of
https://github.com/samba-team/samba.git
synced 2025-09-16 01:44:21 +03:00
r21862: add the cups comment and location lookup to get_a_printer_2_default() as well
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
e859e1fdcd
commit
5b47c4e5c2
@@ -3743,9 +3743,7 @@ static void map_to_os2_driver(fstring drivername)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info, const char *servername, const char* sharename)
|
static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info, const char *servername, const char* sharename)
|
||||||
{
|
{
|
||||||
int snum;
|
int snum = lp_servicenumber(sharename);
|
||||||
|
|
||||||
snum = lp_servicenumber(sharename);
|
|
||||||
|
|
||||||
slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", servername);
|
slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", servername);
|
||||||
slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
|
slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
|
||||||
@@ -3769,6 +3767,15 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info, const char
|
|||||||
fstrcpy(info->printprocessor, "winprint");
|
fstrcpy(info->printprocessor, "winprint");
|
||||||
fstrcpy(info->datatype, "RAW");
|
fstrcpy(info->datatype, "RAW");
|
||||||
|
|
||||||
|
#ifdef HAVE_CUPS
|
||||||
|
if ( (enum printing_types)lp_printing(snum) == PRINT_CUPS ) {
|
||||||
|
/* Pull the location and comment strings from cups if we don't
|
||||||
|
already have one */
|
||||||
|
if ( !strlen(info->location) || !strlen(info->comment) )
|
||||||
|
cups_pull_comment_location( info );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
info->attributes = PRINTER_ATTRIBUTE_SAMBA;
|
info->attributes = PRINTER_ATTRIBUTE_SAMBA;
|
||||||
|
|
||||||
info->starttime = 0; /* Minutes since 12:00am GMT */
|
info->starttime = 0; /* Minutes since 12:00am GMT */
|
||||||
|
Reference in New Issue
Block a user