[gq-commit] gq/src util.c,1.39,1.40
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2002-06-27 08:20:27
|
Update of /cvsroot/gqclient/gq/src In directory usw-pr-cvs1:/tmp/cvs-serv19332 Modified Files: util.c Log Message: * Some error-reporting related fixes * Drop the call to clear_server_schema when disconnecting - otherwise schema browse mode would reference an already freed schema! This is not optimal, as changes to the schema might go unnoticed. This must be an ancient bug, and I wonder why it hasn't raised its ugly head before (or has nobody noticed)? Related bug reported by Stephan Duehr <ste...@su...>. Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** util.c 21 Jun 2002 00:32:42 -0000 1.39 --- util.c 27 Jun 2002 08:20:23 -0000 1.40 *************** *** 105,111 **** &version) == LDAP_OPT_SUCCESS) { server->version = LDAP_VERSION3; ! } else { ! error_push(open_context, message); ! push_ldap_addl_error(ld, open_context); } } --- 105,111 ---- &version) == LDAP_OPT_SUCCESS) { server->version = LDAP_VERSION3; ! /* } else { */ ! /* error_push(open_context, message); */ ! /* push_ldap_addl_error(ld, open_context); */ } } *************** *** 119,123 **** _("Couldn't set protocol version to LDAPv3.")); error_push(open_context, message); - push_ldap_addl_error(ld, open_context); } } --- 119,122 ---- *************** *** 175,179 **** _("GQ was compiled without Kerberos support.\n" "Run 'configure --help' for more information\n")); - push_ldap_addl_error(ld, open_context); statusbar_msg(""); ldap_unbind(ld); --- 174,177 ---- *************** *** 188,192 **** _("GQ was compiled without SASL support.\n" "Run 'configure --help' for more information\n")); - push_ldap_addl_error(ld, open_context); statusbar_msg(""); ldap_unbind(ld); --- 186,189 ---- *************** *** 325,330 **** || always) ) { clear_server_schema(server); ! /* definitely close this connection */ ldap_unbind(server->connection); --- 322,340 ---- || always) ) { + #if 0 + /* + * DO NOT clear the schema - we might be disconnecting + * because we are not caching the connection. + * + * This fixes a bug reported by Stephan Duehr <ste...@su...> + * + * BUT: FIXME: Think about how to deal with schema changes + * due to server restarts (Popup menu on the schema top + * nodes [ie. resurrect the refresh popup already there]?) + * + */ + clear_server_schema(server); ! #endif /* definitely close this connection */ ldap_unbind(server->connection); |