mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
parent
59b17ff597
commit
485b4ff5ec
@ -2719,40 +2719,6 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
Add a printer. This is called from ADDPRINTER(EX) and also SETPRINTER.
|
|
||||||
We split this out from mod_a_printer as it updates the id's and timestamps.
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
WERROR add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level)
|
|
||||||
{
|
|
||||||
WERROR result;
|
|
||||||
|
|
||||||
dump_a_printer(printer, level);
|
|
||||||
|
|
||||||
switch (level)
|
|
||||||
{
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Update the changestamp. See comments in mod_a_printer()
|
|
||||||
* --jerry
|
|
||||||
*/
|
|
||||||
|
|
||||||
printer.info_2->changeid = rev_changeid();
|
|
||||||
printer.info_2->c_setprinter++;
|
|
||||||
|
|
||||||
result=update_a_printer_2(printer.info_2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
result=WERR_UNKNOWN_LEVEL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Initialize printer devmode & data with previously saved driver init values.
|
Initialize printer devmode & data with previously saved driver init values.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -3923,7 +3889,7 @@ WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul
|
|||||||
* Finally write back to the tdb.
|
* Finally write back to the tdb.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
result = add_a_printer(*printer, 2);
|
result = mod_a_printer(*printer, 2);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
||||||
|
@ -4597,7 +4597,7 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1,
|
|||||||
PI_CHECK_INT(averageppm);
|
PI_CHECK_INT(averageppm);
|
||||||
|
|
||||||
/* Yuck - don't check the printername or servername as the
|
/* Yuck - don't check the printername or servername as the
|
||||||
add_a_printer() code plays games with them. You can't
|
mod_a_printer() code plays games with them. You can't
|
||||||
change the printername or the sharename through this interface
|
change the printername or the sharename through this interface
|
||||||
in Samba. */
|
in Samba. */
|
||||||
|
|
||||||
@ -4735,7 +4735,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update printer info */
|
/* Update printer info */
|
||||||
result = add_a_printer(*printer, 2);
|
result = mod_a_printer(*printer, 2);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
free_a_printer(&printer, 2);
|
free_a_printer(&printer, 2);
|
||||||
@ -5911,7 +5911,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
|
|||||||
set_driver_init(printer, 2);
|
set_driver_init(printer, 2);
|
||||||
|
|
||||||
/* write the ASCII on disk */
|
/* write the ASCII on disk */
|
||||||
err = add_a_printer(*printer, 2);
|
err = mod_a_printer(*printer, 2);
|
||||||
if (!W_ERROR_IS_OK(err)) {
|
if (!W_ERROR_IS_OK(err)) {
|
||||||
free_a_printer(&printer,2);
|
free_a_printer(&printer,2);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user