X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-monitor%2Foperational.c;h=75ca5e69d283799a44caba19b469e864833bace8;hb=44abcdfa2fd10362ea5bf46fdc6acd6875fcc0b8;hp=f174eecda8cddb3c89c556d82ae73bb7c2c7651d;hpb=0bc23d571e8ab5b42032a0abccb31fbd4714bc7c;p=openldap diff --git a/servers/slapd/back-monitor/operational.c b/servers/slapd/back-monitor/operational.c index f174eecda8..75ca5e69d2 100644 --- a/servers/slapd/back-monitor/operational.c +++ b/servers/slapd/back-monitor/operational.c @@ -2,7 +2,8 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2003 The OpenLDAP Foundation. + * Copyright 2001-2006 The OpenLDAP Foundation. + * Portions Copyright 2001-2003 Pierangelo Masarati. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,28 +37,29 @@ int monitor_back_operational( Operation *op, - SlapReply *rs, - int opattrs, - Attribute **a ) + SlapReply *rs ) { - Attribute **aa = a; + Attribute **ap; - assert( rs->sr_entry ); + assert( rs->sr_entry != NULL ); - if ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, - rs->sr_attrs ) ) { + for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next ) + /* just count */ ; + + if ( SLAP_OPATTRS( rs->sr_attr_flags ) || + ad_inlist( slap_schema.si_ad_hasSubordinates, rs->sr_attrs ) ) + { int hs; - struct monitorentrypriv *mp; + monitor_entry_t *mp; - mp = ( struct monitorentrypriv * )rs->sr_entry->e_private; + mp = ( monitor_entry_t * )rs->sr_entry->e_private; - assert( mp ); + assert( mp != NULL ); hs = MONITOR_HAS_CHILDREN( mp ); - *aa = slap_operational_hasSubordinate( hs ); - if ( *aa != NULL ) { - aa = &(*aa)->a_next; - } + *ap = slap_operational_hasSubordinate( hs ); + assert( *ap != NULL ); + ap = &(*ap)->a_next; } return 0;