[gq-commit] gq/src browse.c,1.61,1.62
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2002-10-11 13:47:27
|
Update of /cvsroot/gqclient/gq/src In directory usw-pr-cvs1:/tmp/cvs-serv25108 Modified Files: browse.c Log Message: * Resurrected the "Show relative DN" config setting for browse mode Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** browse.c 27 Sep 2002 00:22:14 -0000 1.61 --- browse.c 11 Oct 2002 13:47:23 -0000 1.62 *************** *** 91,95 **** GtkCTreeNode *node) { ! char **exploded_dn = 0; char *labels[] = { NULL, NULL }; char *dummy[] = { "dummy", NULL }; --- 91,95 ---- GtkCTreeNode *node) { ! char **exploded_dn = NULL; char *labels[] = { NULL, NULL }; char *dummy[] = { "dummy", NULL }; *************** *** 100,116 **** ctx = error_new_context(_("Exploding DN")); ! /* explode DN */ ! exploded_dn = gq_ldap_explode_dn(dn, FALSE); ! ! if (exploded_dn == NULL) { ! /* problem with DN */ ! /* printf("problem dn: %s\n", dn); */ ! error_push(ctx, _("Cannot explode DN. Maybe problems with quoting or special characters. See RFC 2253 for details of DN syntax.")); ! ! goto fail; } - labels[0] = decoded_string(exploded_dn[0]); - new_entry = (dn_browse_entry *) new_dn_browse_entry(dn); --- 100,119 ---- ctx = error_new_context(_("Exploding DN")); ! if (config.show_rdn_only) { ! /* explode DN */ ! exploded_dn = gq_ldap_explode_dn(dn, FALSE); ! ! if (exploded_dn == NULL) { ! /* problem with DN */ ! /* printf("problem dn: %s\n", dn); */ ! error_push(ctx, _("Cannot explode DN. Maybe problems with quoting or special characters. See RFC 2253 for details of DN syntax.")); ! ! goto fail; ! } ! labels[0] = decoded_string(exploded_dn[0]); ! } else { ! labels[0] = decoded_string(dn); } new_entry = (dn_browse_entry *) new_dn_browse_entry(dn); *************** *** 137,141 **** fail: if (labels[0]) free(labels[0]); ! gq_exploded_free(exploded_dn); error_flush(ctx); --- 140,144 ---- fail: if (labels[0]) free(labels[0]); ! if (exploded_dn) gq_exploded_free(exploded_dn); error_flush(ctx); *************** *** 1064,1068 **** g_hash_table_destroy(browsehash); } - void new_browsemode(GHashTable *hash) --- 1067,1070 ---- |