summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-11 17:17:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:19 -0500
commit279a2b48b488ecb8f0e460c5b230bb57e9aef52d (patch)
tree09ab2d6ad49b2f6ecb6d28e9545a410b2e7a8029 /source3/registry
parent18609ce1af72802accd1e5e85689db69e8b0c914 (diff)
downloadsamba-279a2b48b488ecb8f0e460c5b230bb57e9aef52d.tar.gz
samba-279a2b48b488ecb8f0e460c5b230bb57e9aef52d.tar.bz2
samba-279a2b48b488ecb8f0e460c5b230bb57e9aef52d.zip
r8323: * convert RegSetValue() calls immediately beneath the printer
key to PRINTER_INFO_2 fields. (This used to be commit fadda2f240eb3c8eb08198c702a93e23b14f0fcc)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_printing.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c
index 9a6d672211..c689882d53 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; i<num_values; i++ ) {
- reg_value = regval_ctr_specific_value( values, i );
- value_index = find_valuename_index( regval_name( reg_value ) );
+ val = regval_ctr_specific_value( values, i );
+ value_index = find_valuename_index( regval_name( val ) );
switch( value_index ) {
case REG_IDX_ATTRIBUTES:
+ printer2->attributes = (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 ) ));
}
}