From 6e11a98d28611da7655b4641649a534c550c62b9 Mon Sep 17 00:00:00 2001
From: "Predrag \"Pele\" Balorda" <pele@openldap.org>
Date: Fri, 7 Jan 2000 09:07:59 +0000
Subject: [PATCH] added cn=schema to gtk-tool

---
 contrib/gtk-tool/ChangeLog           | 3 +++
 contrib/gtk-tool/Gtk_LdapServer.cc   | 1 +
 contrib/gtk-tool/Gtk_LdapTreeItem.cc | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/contrib/gtk-tool/ChangeLog b/contrib/gtk-tool/ChangeLog
index 9eec313150..cfbf97fd62 100644
--- a/contrib/gtk-tool/ChangeLog
+++ b/contrib/gtk-tool/ChangeLog
@@ -1,4 +1,7 @@
 ChangeLog for gtk-tool
+06/01/2000 - Pele
+	* Added cn=schema
+
 03/01/2000 - Pele
 	* Fixed localtime() bug in Linux ?;)
 
diff --git a/contrib/gtk-tool/Gtk_LdapServer.cc b/contrib/gtk-tool/Gtk_LdapServer.cc
index fe51dbc1f2..85011b5f1e 100644
--- a/contrib/gtk-tool/Gtk_LdapServer.cc
+++ b/contrib/gtk-tool/Gtk_LdapServer.cc
@@ -137,6 +137,7 @@ int Gtk_LdapServer::getConfig() {
 				}
 			this->databases = g_list_append(this->databases, "ldbm : cn=config");
 			this->databases = g_list_append(this->databases, "ldbm : cn=monitor");
+			this->databases = g_list_append(this->databases, "ldbm : cn=schema");
 				ldap_value_free(t);
 				debug("databases loaded\n");
 				GList *t;
diff --git a/contrib/gtk-tool/Gtk_LdapTreeItem.cc b/contrib/gtk-tool/Gtk_LdapTreeItem.cc
index 7add7b0954..3851d432eb 100644
--- a/contrib/gtk-tool/Gtk_LdapTreeItem.cc
+++ b/contrib/gtk-tool/Gtk_LdapTreeItem.cc
@@ -41,7 +41,7 @@ Gtk_LdapTree* Gtk_LdapTreeItem::getSubtree(LDAP *ld, int counter) {
 	int entriesCount = 0, error;
 
 	this->ld = ld;
-	if (this->dn == "cn=config" || this->dn == "cn=monitor") error = ldap_search_s(this->ld, this->dn, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, &r_i);
+	if (this->dn == "cn=config" || this->dn == "cn=monitor" || this->dn == "cn=schema") error = ldap_search_s(this->ld, this->dn, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, &r_i);
 	else {
 		if (strcasecmp(this->objectClass,"alias") == 0) error = ldap_search_s(this->ld, this->getAttribute("aliasedobjectname"), LDAP_SCOPE_ONELEVEL, "objectclass=*", NULL, 0, &r_i);
 		else error = ldap_search_s(this->ld, this->dn, LDAP_SCOPE_ONELEVEL, "objectclass=*", NULL, 0, &r_i);
@@ -57,7 +57,7 @@ Gtk_LdapTree* Gtk_LdapTreeItem::getSubtree(LDAP *ld, int counter) {
 		entry = ldap_first_entry(this->ld, r_i);
 	//	float i = 1;
 		gfloat percent = 100/entriesCount;
-		cout << "percent is " << percent << endl;
+		debug("percent is %f\n", percent);
 	//	this->par->progress.set_percentage(percent/100);
 	//	this->par->progress.show();
 		while (entry != NULL) {
-- 
GitLab