diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-22 18:03:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:58 -0500 |
commit | b1f1cb0e7474415b1c75670ec631effb232c0d6c (patch) | |
tree | 6d14887819865a2da7ecfdfedc5ee85767d8a0ef /source3 | |
parent | 864ca4f0510da95cadf5ad449b2ec818a78d8c17 (diff) | |
download | samba-b1f1cb0e7474415b1c75670ec631effb232c0d6c.tar.gz samba-b1f1cb0e7474415b1c75670ec631effb232c0d6c.tar.xz samba-b1f1cb0e7474415b1c75670ec631effb232c0d6c.zip |
r7838: lie about the printer status when doing the queryvalue() registry call. Note that if you migrate a printer to a Windows server, the win spooler will remove any printers that have an invalid status value in the registry
(This used to be commit 0a22ea9eb7fd5aa8c57d2bf1ea2a171b377cab5a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_printing.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index b0fb4ab9d90..1ac91f4b90c 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -639,6 +639,7 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) if ( !new_path ) { char *p; + uint32 printer_status = PRINTER_STATUS_OK; /* we are dealing with the printer itself */ @@ -652,7 +653,10 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) regval_ctr_addvalue( val, "Priority", REG_DWORD, (char*)&info2->priority, sizeof(info2->attributes) ); regval_ctr_addvalue( val, "ChangeID", REG_DWORD, (char*)&info2->changeid, sizeof(info2->changeid) ); regval_ctr_addvalue( val, "Default Priority", REG_DWORD, (char*)&info2->default_priority, sizeof(info2->default_priority) ); - regval_ctr_addvalue( val, "Status", REG_DWORD, (char*)&info2->status, sizeof(info2->status) ); + + /* lie and say everything is ok since we don't want to call print_queue_length() to get the real status */ + regval_ctr_addvalue( val, "Status", REG_DWORD, (char*)&printer_status, sizeof(info2->status) ); + regval_ctr_addvalue( val, "StartTime", REG_DWORD, (char*)&info2->starttime, sizeof(info2->starttime) ); regval_ctr_addvalue( val, "UntilTime", REG_DWORD, (char*)&info2->untiltime, sizeof(info2->untiltime) ); |