summaryrefslogtreecommitdiff
path: root/source3/registry/reg_frontend.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-24 08:58:03 +0000
committerGerald Carter <jerry@samba.org>2002-07-24 08:58:03 +0000
commita12ed7f506263c6ec34c7df6bbcb3e8434841403 (patch)
treec0eea1d86391e45565e11109b799de5b63cbec79 /source3/registry/reg_frontend.c
parent0cfdb7bbe82cfbce95ea4d8956c9de6f3ab56b94 (diff)
downloadsamba-a12ed7f506263c6ec34c7df6bbcb3e8434841403.tar.gz
samba-a12ed7f506263c6ec34c7df6bbcb3e8434841403.tar.bz2
samba-a12ed7f506263c6ec34c7df6bbcb3e8434841403.zip
done! printer_info_2, devicemode, sec_desc, & printer data all enumerate
and display correctly in regedit.exe. Not sure about REG_SZ values in PrinterDriverData. If we store these in UNICODE, I'll have to fix up a few things. REG_BINARY & REG_DWORD are fine. (This used to be commit 2a30c243ec28734bbc721dfc01b743faa6f73788)
Diffstat (limited to 'source3/registry/reg_frontend.c')
-rw-r--r--source3/registry/reg_frontend.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c
index db612709d1..c0788c1b75 100644
--- a/source3/registry/reg_frontend.c
+++ b/source3/registry/reg_frontend.c
@@ -202,7 +202,19 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx )
}
/***********************************************************************
- Ad a new regostry value to the array
+ Retrive the TALLOC_CTX associated with a REGISTRY_VALUE
+ **********************************************************************/
+
+TALLOC_CTX* regval_ctr_getctx( REGVAL_CTR *val )
+{
+ if ( !val )
+ return NULL;
+
+ return val->ctx;
+}
+
+/***********************************************************************
+ Add a new regostry value to the array
**********************************************************************/
int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type,
@@ -235,25 +247,6 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type,
ctr->values[ctr->num_values]->type = type;
ctr->values[ctr->num_values]->data_p = talloc_memdup( ctr->ctx, data_p, size );
ctr->values[ctr->num_values]->size = size;
-#if 0
- switch ( type )
- {
- case REG_SZ:
- ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p );
- break;
- case REG_MULTI_SZ:
- ctr->values[ctr->num_values]->data.string = talloc_memdup( ctr->ctx, data_p, size );
- break;
- case REG_DWORD:
- ctr->values[ctr->num_values]->data.dword = *(uint32*)data_p;
- break;
- case REG_BINARY:
- ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size );
- break;
-
- }
-#endif
-
ctr->num_values++;
}