svn commit: samba r23444 - in branches/SAMBA_3_0_26/source/registry: .

obnox at samba.org obnox at samba.org
Tue Jun 12 16:31:04 GMT 2007


Author: obnox
Date: 2007-06-12 16:31:03 +0000 (Tue, 12 Jun 2007)
New Revision: 23444

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23444

Log:
Merge r20210 from3_0:

* registry_fetch_values is not needed anymore
* fix comment typo

Michael


Modified:
   branches/SAMBA_3_0_26/source/registry/reg_frontend.c
   branches/SAMBA_3_0_26/source/registry/reg_printing.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/registry/reg_frontend.c
===================================================================
--- branches/SAMBA_3_0_26/source/registry/reg_frontend.c	2007-06-12 16:18:19 UTC (rev 23443)
+++ branches/SAMBA_3_0_26/source/registry/reg_frontend.c	2007-06-12 16:31:03 UTC (rev 23444)
@@ -246,63 +246,6 @@
 	return result;
 }
 
-WERROR registry_fetch_values(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key,
-			     uint32 *pnum_values, char ***pnames,
-			     struct registry_value ***pvalues)
-{
-	REGVAL_CTR *ctr;
-	char **names;
-	struct registry_value **values;
-	uint32 i;
-
-	if (!(ctr = TALLOC_ZERO_P(mem_ctx, REGVAL_CTR))) {
-		return WERR_NOMEM;
-	}
-
-	if (fetch_reg_values(key, ctr) == -1) {
-		TALLOC_FREE(ctr);
-		return WERR_INVALID_PARAM;
-	}
-
-	if (ctr->num_values == 0) {
-		*pnum_values = 0;
-		TALLOC_FREE(ctr);
-		return WERR_OK;
-	}
-
-	if ((!(names = TALLOC_ARRAY(ctr, char *, ctr->num_values))) ||
-	    (!(values = TALLOC_ARRAY(ctr, struct registry_value *,
-				     ctr->num_values)))) {
-		TALLOC_FREE(ctr);
-		return WERR_NOMEM;
-	}
-
-	for (i=0; i<ctr->num_values; i++) {
-		REGISTRY_VALUE *val = ctr->values[i];
-		WERROR err;
-
-		if (!(names[i] = talloc_strdup(names, val->valuename))) {
-			TALLOC_FREE(ctr);
-			return WERR_NOMEM;
-		}
-
-		err = registry_pull_value(values, &values[i],
-					  val->type, val->data_p,
-					  val->size, val->size);
-		if (!W_ERROR_IS_OK(err)) {
-			TALLOC_FREE(ctr);
-			return err;
-		}
-	}
-
-	*pnum_values = ctr->num_values;
-	*pnames = talloc_move(mem_ctx, &names);
-	*pvalues = talloc_move(mem_ctx, &values);
-
-	TALLOC_FREE(ctr);
-	return WERR_OK;
-}
-
 /***********************************************************************
  retreive a specific subkey specified by index.  Caller is 
  responsible for freeing memory

Modified: branches/SAMBA_3_0_26/source/registry/reg_printing.c
===================================================================
--- branches/SAMBA_3_0_26/source/registry/reg_printing.c	2007-06-12 16:18:19 UTC (rev 23443)
+++ branches/SAMBA_3_0_26/source/registry/reg_printing.c	2007-06-12 16:31:03 UTC (rev 23444)
@@ -478,7 +478,7 @@
 	/* top level key values stored in the registry has no values */
 	
 	if ( !printers_key ) {
-		/* normalize to the 'HKLM\SOFTWARE\...\Print\Printers' ket */
+		/* normalize to the 'HKLM\SOFTWARE\...\Print\Printers' key */
 		return regdb_fetch_values( KEY_WINNT_PRINTERS, values );
 	}
 	



More information about the samba-cvs mailing list