[gq-commit] gq/src util.c,1.76,1.77
Status: Beta
Brought to you by:
sur5r
|
From: <sta...@us...> - 2003-10-20 09:01:06
|
Update of /cvsroot/gqclient/gq/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18037
Modified Files:
util.c
Log Message:
* Fixed a core-dumping bug when looking at schema information for
transient servers.
Index: util.c
===================================================================
RCS file: /cvsroot/gqclient/gq/src/util.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** util.c 20 Oct 2003 08:26:55 -0000 1.76
--- util.c 20 Oct 2003 08:33:38 -0000 1.77
***************
*** 1294,1305 ****
GList *find_oc_by_at(struct ldapserver *server, const char *atname)
{
! GList *list, *srvlist;
LDAPObjectClass *oc;
int i, found;
list = NULL;
! srvlist = server->ss->oc;
! while(srvlist) {
! oc = (LDAPObjectClass *) srvlist->data;
found = 0;
--- 1294,1311 ----
GList *find_oc_by_at(struct ldapserver *server, const char *atname)
{
! GList *list, *oclist;
LDAPObjectClass *oc;
int i, found;
+ struct server_schema *ss = NULL;
list = NULL;
!
! if (server == NULL) return NULL;
! ss = get_schema(server);
! if (ss == NULL) return NULL;
!
! oclist = ss->oc;
! while(oclist) {
! oc = (LDAPObjectClass *) oclist->data;
found = 0;
***************
*** 1333,1337 ****
}
! srvlist = srvlist->next;
}
--- 1339,1343 ----
}
! oclist = oclist->next;
}
|