diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-24 08:58:03 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-24 08:58:03 +0000 |
commit | a12ed7f506263c6ec34c7df6bbcb3e8434841403 (patch) | |
tree | c0eea1d86391e45565e11109b799de5b63cbec79 /source3/registry/reg_frontend.c | |
parent | 0cfdb7bbe82cfbce95ea4d8956c9de6f3ab56b94 (diff) | |
download | samba-a12ed7f506263c6ec34c7df6bbcb3e8434841403.tar.gz samba-a12ed7f506263c6ec34c7df6bbcb3e8434841403.tar.xz 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.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index db612709d10..c0788c1b753 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++; } |