From 279a2b48b488ecb8f0e460c5b230bb57e9aef52d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Jul 2005 17:17:50 +0000 Subject: [PATCH] r8323: * convert RegSetValue() calls immediately beneath the printer key to PRINTER_INFO_2 fields. (This used to be commit fadda2f240eb3c8eb08198c702a93e23b14f0fcc) --- source3/registry/reg_printing.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 9a6d672211a..c689882d532 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -533,7 +533,7 @@ struct { { "UntilTime", REG_IDX_UNTILTIME }, { "Name", REG_IDX_NAME }, { "Location", REG_IDX_LOCATION }, - { "Descrioption", REG_IDX_DESCRIPTION }, + { "Description", REG_IDX_DESCRIPTION }, { "Parameters", REG_IDX_PARAMETERS }, { "Port", REG_IDX_PORT }, { "Share Name", REG_IDX_SHARENAME }, @@ -566,56 +566,70 @@ static void convert_values_to_printer_info_2( NT_PRINTER_INFO_LEVEL_2 *printer2, { int num_values = regval_ctr_numvals( values ); uint32 value_index; - REGISTRY_VALUE *reg_value; + REGISTRY_VALUE *val; int i; for ( i=0; iattributes = (uint32)(*regval_data_p(val)); break; case REG_IDX_PRIORITY: + printer2->priority = (uint32)(*regval_data_p(val)); break; case REG_IDX_DEFAULT_PRIORITY: + printer2->default_priority = (uint32)(*regval_data_p(val)); break; case REG_IDX_CHANGEID: - break; - case REG_IDX_STATUS: + printer2->changeid = (uint32)(*regval_data_p(val)); break; case REG_IDX_STARTTIME: + printer2->starttime = (uint32)(*regval_data_p(val)); break; case REG_IDX_UNTILTIME: + printer2->untiltime = (uint32)(*regval_data_p(val)); break; case REG_IDX_NAME: + rpcstr_pull( printer2->printername, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_LOCATION: + rpcstr_pull( printer2->location, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_DESCRIPTION: + rpcstr_pull( printer2->comment, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_PARAMETERS: + rpcstr_pull( printer2->parameters, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_PORT: + rpcstr_pull( printer2->portname, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_SHARENAME: + rpcstr_pull( printer2->sharename, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_DRIVER: + rpcstr_pull( printer2->drivername, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_SEP_FILE: + rpcstr_pull( printer2->sepfile, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_PRINTPROC: + rpcstr_pull( printer2->printprocessor, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_DATATYPE: + rpcstr_pull( printer2->datatype, regval_data_p(val), sizeof(fstring), regval_size(val), 0 ); break; case REG_IDX_DEVMODE: break; case REG_IDX_SECDESC: break; default: - /* unsupported value...what to do here ? */ - DEBUG(0,("convert_values_to_printer_info_2: Unsupported registry value [%s]\n", - regval_name( reg_value ) )); + /* unsupported value...throw away */ + DEBUG(8,("convert_values_to_printer_info_2: Unsupported registry value [%s]\n", + regval_name( val ) )); } }