[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication windows_connection.c, 1.8, 1.8.2.1
Nathan Kinder (nkinder)
fedora-directory-commits at redhat.com
Thu Oct 6 17:36:23 UTC 2005
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14524
Modified Files:
Tag: Directory71RtmBranch
windows_connection.c
Log Message:
169954 - Winsync initialization would hang with certain entries. Fixed improper use of ldap_get_next.
Index: windows_connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_connection.c,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- windows_connection.c 9 May 2005 20:34:31 -0000 1.8
+++ windows_connection.c 6 Oct 2005 17:36:20 -0000 1.8.2.1
@@ -553,6 +553,9 @@
int ldap_rc = 0;
LDAPMessage *res = NULL;
int not_unique = 0;
+ int nummessages = 0;
+ int numentries = 0;
+ int numreferences = 0;
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_search_entry\n", 0, 0, 0 );
@@ -566,8 +569,14 @@
&conn->timeout, 0 /* sizelimit */, &res);
if (LDAP_SUCCESS == ldap_rc)
{
+ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
+ nummessages = ldap_count_messages(conn->ld, res);
+ numentries = ldap_count_entries(conn->ld, res);
+ numreferences = ldap_count_references(conn->ld, res);
+ LDAPDebug( LDAP_DEBUG_REPL, "windows_search_entry: recieved %d messages, %d entries, %d references\n",
+ nummessages, numentries, numreferences );
+ }
LDAPMessage *message = ldap_first_entry(conn->ld, res);
- LDAPMessage *next_entry = NULL;
if (NULL != entry)
{
*entry = windows_LDAPMessage2Entry(conn->ld,message,0);
@@ -575,7 +584,7 @@
/* See if there are any more entries : if so then that's an error
* but we still need to get them to avoid gumming up the connection
*/
- while (NULL != ( next_entry = ldap_next_entry(conn->ld,res)))
+ while (NULL != ( message = ldap_next_entry(conn->ld,message)))
{
not_unique = 1;
}
More information about the Fedora-directory-commits
mailing list