[gq-commit] gq/src formfill.c,1.28,1.29 formfill.h,1.18,1.19 ldif.c,1.11,1.12 browse.c,1.52,1.53
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2002-07-13 07:04:23
|
Update of /cvsroot/gqclient/gq/src In directory usw-pr-cvs1:/tmp/cvs-serv16794 Modified Files: formfill.c formfill.h ldif.c browse.c Log Message: * Made LDIF exports work for referral objects Index: formfill.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** formfill.c 12 Jul 2002 20:27:52 -0000 1.28 --- formfill.c 13 Jul 2002 07:04:20 -0000 1.29 *************** *** 53,56 **** --- 53,70 ---- } + gboolean isInternalAttr(const char *attr) { + GList *filterout; + gboolean filtered = FALSE; + + for (filterout = internalAttrs ; filterout ; + filterout = filterout->next) { + if (strcasecmp(attr, filterout->data) == 0) { + filtered = TRUE; + break; + } + } + return filtered; + } + struct formfill *new_formfill(void) { *************** *** 200,216 **** /* filter out some internal attributes... */ - GList *filterout = NULL; - gboolean filtered = FALSE; c = attr_strip(attr); if (server->hide_internal) { ! for (filterout = internalAttrs ; filterout ; ! filterout = filterout->next) { ! if (strcasecmp(c, filterout->data) == 0) { ! filtered = TRUE; ! break; ! } ! } ! if (filtered) { ldap_memfree(attr); if (c) g_free(c); --- 214,221 ---- /* filter out some internal attributes... */ c = attr_strip(attr); if (server->hide_internal) { ! if (isInternalAttr(c)) { ldap_memfree(attr); if (c) g_free(c); *************** *** 437,441 **** if (at && at->at_no_user_mod) { - printf("no user mod\n"); form->flags |= FLAG_NO_USER_MOD; } --- 442,445 ---- Index: formfill.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** formfill.h 12 Jul 2002 20:27:52 -0000 1.18 --- formfill.h 13 Jul 2002 07:04:20 -0000 1.19 *************** *** 96,99 **** --- 96,100 ---- void init_internalAttrs(); + gboolean isInternalAttr(const char *attr); struct formfill *new_formfill(void); Index: ldif.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ldif.c 8 Jun 2002 05:46:44 -0000 1.11 --- ldif.c 13 Jul 2002 07:04:20 -0000 1.12 *************** *** 22,25 **** --- 22,26 ---- */ + /* $Id$ */ #include <stdlib.h> *************** *** 37,40 **** --- 38,42 ---- #include "util.h" #include "ldif.h" + #include "formfill.h" /* isInternalAttr() */ *************** *** 81,93 **** attr = ldap_next_attribute(ld, msg, berptr)) { ! vals = ldap_get_values_len(ld, msg, attr); ! if(vals) { ! for(i = 0; vals[i]; i++) { ! /* should work for ;binary as-is */ ! value = vals[i]; ! ldif_line_out(out, attr, value->bv_val, value->bv_len); ! g_string_append(out, "\n"); } - ldap_value_free_len(vals); } ldap_memfree(attr); --- 83,98 ---- attr = ldap_next_attribute(ld, msg, berptr)) { ! if (!isInternalAttr(attr)) { ! vals = ldap_get_values_len(ld, msg, attr); ! if(vals) { ! for(i = 0; vals[i]; i++) { ! /* should work for ;binary as-is */ ! value = vals[i]; ! ldif_line_out(out, attr, ! value->bv_val, value->bv_len); ! g_string_append(out, "\n"); ! } ! ldap_value_free_len(vals); } } ldap_memfree(attr); *************** *** 286,287 **** --- 291,298 ---- } } + + /* + Local Variables: + c-basic-offset: 5 + End: + */ Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** browse.c 21 Jun 2002 00:34:32 -0000 1.52 --- browse.c 13 Jul 2002 07:04:20 -0000 1.53 *************** *** 1103,1106 **** --- 1103,1107 ---- int written; char message[128]; + char *attrs[] = { "*", "+", NULL }; entry = gtk_object_get_data(GTK_OBJECT(filesel), "entry"); *************** *** 1159,1163 **** msg = ldap_search_s(ld, (char *) I->data, LDAP_SCOPE_SUBTREE, ! "(objectclass=*)", NULL, 0, &res); if(msg == LDAP_SUCCESS) { for(e = ldap_first_entry(ld, res); e; e = ldap_next_entry(ld, e)) { --- 1160,1164 ---- msg = ldap_search_s(ld, (char *) I->data, LDAP_SCOPE_SUBTREE, ! "(objectclass=*)", attrs, 0, &res); if(msg == LDAP_SUCCESS) { for(e = ldap_first_entry(ld, res); e; e = ldap_next_entry(ld, e)) { |