• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/servers/slapd/back-bdb/

Lines Matching defs:ic

996 	bdb_tool_idl_cache *ic = v1;
1006 if ( !ic->head && ic->count <= BDB_IDL_DB_SIZE ) {
1017 bv2DBT( &ic->kstr, &key );
1025 if ( rc == 0 && ic->count > BDB_IDL_DB_SIZE ) {
1046 BDB_ID2DISK( ic->last, &nid );
1051 } else if ( ic->count > BDB_IDL_DB_SIZE ) {
1056 BDB_ID2DISK( ic->first, &nid );
1059 BDB_ID2DISK( ic->last, &nid );
1071 for ( ice = ic->head, n=0; ice; ice = ice->next, n++ ) {
1076 end = ic->count & (IDBLOCK-1);
1098 if ( ic->head ) {
1100 ic->tail->next = bdb_tool_idl_free_list;
1101 bdb_tool_idl_free_list = ic->head;
1106 if ( ic != db->app_private ) {
1107 ch_free( ic );
1109 ic->head = ic->tail = NULL;
1116 bdb_tool_idl_flush_db( DB *db, bdb_tool_idl_cache *ic )
1121 db->app_private = ic;
1159 bdb_tool_idl_cache *ic, itmp;
1168 ic = avl_find( (Avlnode *)db->app_private, &itmp, bdb_tool_idl_cmp );
1171 if ( !ic ) {
1177 ic = ch_malloc( sizeof( bdb_tool_idl_cache ) + itmp.kstr.bv_len );
1178 ic->kstr.bv_len = itmp.kstr.bv_len;
1179 ic->kstr.bv_val = (char *)(ic+1);
1180 AC_MEMCPY( ic->kstr.bv_val, itmp.kstr.bv_val, ic->kstr.bv_len );
1181 ic->head = ic->tail = NULL;
1182 ic->last = 0;
1183 ic->count = 0;
1184 avl_insert( (Avlnode **)&db->app_private, ic, bdb_tool_idl_cmp,
1197 ic->count = BDB_IDL_DB_SIZE+1;
1202 ic->count = count;
1203 BDB_DISK2ID( &nid, &ic->first );
1209 if ( ic->count > BDB_IDL_DB_SIZE ) {
1210 ic->last = id;
1213 } else if ( ic->count == BDB_IDL_DB_SIZE ) {
1215 for ( ice = ic->head, n=0; ice; ice = ice->next, n++ )
1219 ic->tail->next = bdb_tool_idl_free_list;
1220 bdb_tool_idl_free_list = ic->head;
1224 ic->head = ic->tail = NULL;
1225 ic->last = id;
1226 ic->count++;
1230 if ( !ic->tail || ( ic->count & (IDBLOCK-1)) == 0) {
1235 rc = bdb_tool_idl_flush_db( db, ic );
1238 avl_insert( (Avlnode **)&db->app_private, ic, bdb_tool_idl_cmp,
1252 if ( !ic->head ) {
1253 ic->head = ice;
1255 ic->tail->next = ice;
1257 ic->tail = ice;
1258 if ( !ic->count )
1259 ic->first = id;
1261 ice = ic->tail;
1262 ice->ids[ ic->count & (IDBLOCK-1) ] = id;
1263 ic->count++;