• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/rpc_server/cxx/

Lines Matching defs:ctp

197 	ct_entry *ctp,
201 ctp->ct_timeout = __dbsrv_maxto;
203 ctp->ct_timeout = __dbsrv_defto;
205 ctp->ct_timeout = to;
214 ct_entry *ctp, *nextctp;
239 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL; ctp = nextctp) {
240 nextctp = LIST_NEXT(ctp, entries);
241 switch (ctp->ct_type) {
243 to = *(ctp->ct_activep) + ctp->ct_timeout;
248 ctp->ct_id);
249 (void)((DbTxn *)ctp->ct_anyp)->abort();
250 __dbdel_ctp(ctp);
253 * all sorts of ctp's.
254 * So start over with a guaranteed good ctp.
263 to = *(ctp->ct_activep) + ctp->ct_timeout;
268 ctp->ct_id);
269 (void)__dbc_close_int(ctp);
271 * Start over with a guaranteed good ctp.
286 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL; ctp = nextctp) {
287 nextctp = LIST_NEXT(ctp, entries);
288 if (ctp->ct_type != CT_ENV)
290 to = *(ctp->ct_activep) + ctp->ct_idle;
294 printf("Timing out env id %ld\n", ctp->ct_id);
295 (void)__env_close_int(ctp->ct_id, 0, 1);
298 * all sorts of ctp's (maybe even all of them.
299 * So start over with a guaranteed good ctp.
313 ct_entry *ctp, *nextctp;
315 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
316 ctp = nextctp) {
317 nextctp = LIST_NEXT(ctp, entries);
318 if (ctp->ct_type == 0)
320 if (ctp->ct_parent == parent) {
321 __dbclear_child(ctp);
327 nextctp = LIST_NEXT(ctp, entries);
328 __dbclear_ctp(ctp);
334 __dbclear_ctp(ct_entry *ctp)
336 LIST_REMOVE(ctp, entries);
337 __os_free(NULL, ctp);
351 ct_entry *ctp, *octp;
354 if ((ret = __os_malloc(NULL, sizeof(ct_entry), &ctp)) != 0) {
358 memset(ctp, 0, sizeof(ct_entry));
368 __os_free(NULL, ctp);
374 ctp->ct_id = t;
375 ctp->ct_idle = __dbsrv_idleto;
376 ctp->ct_activep = &ctp->ct_active;
377 ctp->ct_origp = NULL;
378 ctp->ct_refcount = 1;
380 LIST_INSERT_HEAD(&__dbsrv_head, ctp, entries);
381 return (ctp);
387 ct_entry *ctp;
389 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
390 ctp = LIST_NEXT(ctp, entries))
391 if (ctp->ct_id == id)
392 return (ctp);
400 ct_entry *ctp;
405 * Must be a db ctp, obviously.
415 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
416 ctp = LIST_NEXT(ctp, entries)) {
420 if (ctp == db_ctp)
422 if (ctp->ct_type != CT_DB)
424 if (ctp->ct_envparent != db_ctp->ct_envparent)
426 if (type != DB_UNKNOWN && ctp->ct_dbdp.type != type)
428 if (ctp->ct_dbdp.dbflags != LF_ISSET(DB_SERVER_DBFLAGS))
431 ctp->ct_dbdp.setflags != db_ctp->ct_dbdp.setflags)
433 if (name == NULL || ctp->ct_dbdp.db == NULL ||
434 strcmp(name, ctp->ct_dbdp.db) != 0)
436 if (subdb != ctp->ct_dbdp.subdb &&
437 (subdb == NULL || ctp->ct_dbdp.subdb == NULL ||
438 strcmp(subdb, ctp->ct_dbdp.subdb) != 0))
443 ctp->ct_refcount++;
444 return (ctp);
453 ct_entry *ctp;
457 * Must be an env ctp, obviously.
461 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
462 ctp = LIST_NEXT(ctp, entries)) {
466 if (ctp == env_ctp)
468 if (ctp->ct_type != CT_ENV)
470 if (ctp->ct_envdp.home != home)
472 if (ctp->ct_envdp.envflags != flags)
474 if (ctp->ct_envdp.onflags != env_ctp->ct_envdp.onflags)
476 if (ctp->ct_envdp.offflags != env_ctp->ct_envdp.offflags)
484 if (ctp->ct_timeout < env_ctp->ct_timeout)
485 ctp->ct_timeout = env_ctp->ct_timeout;
486 ctp->ct_refcount++;
487 return (ctp);
494 __dbsrv_active(ct_entry *ctp)
499 if (ctp == NULL)
503 *(ctp->ct_activep) = t;
504 if ((envctp = ctp->ct_envparent) == NULL)
515 ct_entry *ctp;
518 ctp = get_tableent(id);
519 if (ctp == NULL)
521 DB_ASSERT(NULL, ctp->ct_type == CT_DB);
522 if (__dbsrv_verbose && ctp->ct_refcount != 1)
524 id, ctp->ct_refcount);
525 if (--ctp->ct_refcount != 0)
527 dbp = ctp->ct_dbp;
532 __dbdel_ctp(ctp);
541 ct_entry *ctp;
551 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
552 ctp = LIST_NEXT(ctp, entries)) {
557 if ((ctp->ct_type & CT_JOIN) &&
558 ctp->ct_activep == &dbc_ctp->ct_active) {
559 ctp->ct_type &= ~CT_JOIN;
560 ctp->ct_activep = ctp->ct_origp;
561 __dbsrv_active(ctp);
574 ct_entry *ctp, *dbctp, *nextctp;
577 ctp = get_tableent(id);
578 if (ctp == NULL)
580 DB_ASSERT(NULL, ctp->ct_type == CT_ENV);
581 if (__dbsrv_verbose && ctp->ct_refcount != 1)
583 id, ctp->ct_refcount);
588 if (--ctp->ct_refcount != 0 && !force)
590 dbenv = ctp->ct_envp;
605 if (dbctp->ct_envparent != ctp)
614 * multiple ctp entries. Start over with a
615 * guaranteed good ctp.
621 __dbdel_ctp(ctp);