svn commit: samba r23835 - in branches: SAMBA_3_2/source/libads SAMBA_3_2_0/source/libads

gd at samba.org gd at samba.org
Wed Jul 11 13:23:57 GMT 2007


Author: gd
Date: 2007-07-11 13:23:56 +0000 (Wed, 11 Jul 2007)
New Revision: 23835

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

Log:
Pass down a struct GUID to ads_get_attrname_by_guid() directly.

Guenther

Modified:
   branches/SAMBA_3_2/source/libads/ldap_schema.c
   branches/SAMBA_3_2_0/source/libads/ldap_schema.c


Changeset:
Modified: branches/SAMBA_3_2/source/libads/ldap_schema.c
===================================================================
--- branches/SAMBA_3_2/source/libads/ldap_schema.c	2007-07-11 13:21:32 UTC (rev 23834)
+++ branches/SAMBA_3_2/source/libads/ldap_schema.c	2007-07-11 13:23:56 UTC (rev 23835)
@@ -109,25 +109,20 @@
 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
 				     const char *schema_path, 
 				     TALLOC_CTX *mem_ctx, 
-				     const char *schema_guid)
+				     const struct GUID *schema_guid)
 {
 	ADS_STATUS rc;
 	LDAPMessage *res = NULL;
 	char *expr = NULL;
 	const char *attrs[] = { "lDAPDisplayName", NULL };
 	const char *result = NULL;
-	struct GUID guid;
 	char *guid_bin = NULL;
 
 	if (!ads || !mem_ctx || !schema_guid) {
 		goto done;
 	}
 
-	if (!NT_STATUS_IS_OK(GUID_from_string(schema_guid, &guid))) {
-		goto done;
-	}
-
-	guid_bin = guid_binstring(&guid);
+	guid_bin = guid_binstring(schema_guid);
 	if (!guid_bin) {
 		goto done;
 	}

Modified: branches/SAMBA_3_2_0/source/libads/ldap_schema.c
===================================================================
--- branches/SAMBA_3_2_0/source/libads/ldap_schema.c	2007-07-11 13:21:32 UTC (rev 23834)
+++ branches/SAMBA_3_2_0/source/libads/ldap_schema.c	2007-07-11 13:23:56 UTC (rev 23835)
@@ -109,25 +109,20 @@
 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
 				     const char *schema_path, 
 				     TALLOC_CTX *mem_ctx, 
-				     const char *schema_guid)
+				     const struct GUID *schema_guid)
 {
 	ADS_STATUS rc;
 	LDAPMessage *res = NULL;
 	char *expr = NULL;
 	const char *attrs[] = { "lDAPDisplayName", NULL };
 	const char *result = NULL;
-	struct GUID guid;
 	char *guid_bin = NULL;
 
 	if (!ads || !mem_ctx || !schema_guid) {
 		goto done;
 	}
 
-	if (!NT_STATUS_IS_OK(GUID_from_string(schema_guid, &guid))) {
-		goto done;
-	}
-
-	guid_bin = guid_binstring(&guid);
+	guid_bin = guid_binstring(schema_guid);
 	if (!guid_bin) {
 		goto done;
 	}



More information about the samba-cvs mailing list