• 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/c/

Lines Matching defs:ctp

200 __dbsrv_settimeout(ctp, to)
201 ct_entry *ctp;
205 ctp->ct_timeout = __dbsrv_maxto;
207 ctp->ct_timeout = __dbsrv_defto;
209 ctp->ct_timeout = to;
222 ct_entry *ctp, *nextctp;
247 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL; ctp = nextctp) {
248 nextctp = LIST_NEXT(ctp, entries);
249 switch (ctp->ct_type) {
251 to = *(ctp->ct_activep) + ctp->ct_timeout;
256 ctp->ct_id);
257 (void)((DB_TXN *)ctp->ct_anyp)->
258 abort((DB_TXN *)ctp->ct_anyp);
259 __dbdel_ctp(ctp);
262 * all sorts of ctp's.
263 * So start over with a guaranteed good ctp.
272 to = *(ctp->ct_activep) + ctp->ct_timeout;
277 ctp->ct_id);
278 (void)__dbc_close_int(ctp);
280 * Start over with a guaranteed good ctp.
295 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL; ctp = nextctp) {
296 nextctp = LIST_NEXT(ctp, entries);
297 if (ctp->ct_type != CT_ENV)
299 to = *(ctp->ct_activep) + ctp->ct_idle;
303 printf("Timing out env id %ld\n", ctp->ct_id);
304 (void)__env_close_int(ctp->ct_id, 0, 1);
307 * all sorts of ctp's (maybe even all of them.
308 * So start over with a guaranteed good ctp.
323 ct_entry *ctp, *nextctp;
325 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
326 ctp = nextctp) {
327 nextctp = LIST_NEXT(ctp, entries);
328 if (ctp->ct_type == 0)
330 if (ctp->ct_parent == parent) {
331 __dbclear_child(ctp);
337 nextctp = LIST_NEXT(ctp, entries);
338 __dbclear_ctp(ctp);
347 __dbclear_ctp(ctp)
348 ct_entry *ctp;
350 LIST_REMOVE(ctp, entries);
351 __os_free(NULL, ctp);
373 ct_entry *ctp, *octp;
376 if ((ret = __os_malloc(NULL, sizeof(ct_entry), &ctp)) != 0) {
380 memset(ctp, 0, sizeof(ct_entry));
390 __os_free(NULL, ctp);
396 ctp->ct_id = (long)t;
397 ctp->ct_idle = __dbsrv_idleto;
398 ctp->ct_activep = &ctp->ct_active;
399 ctp->ct_origp = NULL;
400 ctp->ct_refcount = 1;
402 LIST_INSERT_HEAD(&__dbsrv_head, ctp, entries);
403 return (ctp);
413 ct_entry *ctp;
415 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
416 ctp = LIST_NEXT(ctp, entries))
417 if (ctp->ct_id == id)
418 return (ctp);
433 ct_entry *ctp;
438 * Must be a db ctp, obviously.
448 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
449 ctp = LIST_NEXT(ctp, entries)) {
453 if (ctp == db_ctp)
455 if (ctp->ct_type != CT_DB)
457 if (ctp->ct_envparent != db_ctp->ct_envparent)
459 if (type != DB_UNKNOWN && ctp->ct_dbdp.type != type)
461 if (ctp->ct_dbdp.dbflags != LF_ISSET(DB_SERVER_DBFLAGS))
464 ctp->ct_dbdp.setflags != db_ctp->ct_dbdp.setflags)
466 if (name == NULL || ctp->ct_dbdp.db == NULL ||
467 strcmp(name, ctp->ct_dbdp.db) != 0)
469 if (subdb != ctp->ct_dbdp.subdb &&
470 (subdb == NULL || ctp->ct_dbdp.subdb == NULL ||
471 strcmp(subdb, ctp->ct_dbdp.subdb) != 0))
476 ctp->ct_refcount++;
477 return (ctp);
493 ct_entry *ctp;
497 * Must be an env ctp, obviously.
501 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
502 ctp = LIST_NEXT(ctp, entries)) {
506 if (ctp == env_ctp)
508 if (ctp->ct_type != CT_ENV)
510 if (ctp->ct_envdp.home != home)
512 if (ctp->ct_envdp.envflags != flags)
514 if (ctp->ct_envdp.onflags != env_ctp->ct_envdp.onflags)
516 if (ctp->ct_envdp.offflags != env_ctp->ct_envdp.offflags)
524 if (ctp->ct_timeout < env_ctp->ct_timeout)
525 ctp->ct_timeout = env_ctp->ct_timeout;
526 ctp->ct_refcount++;
527 return (ctp);
537 __dbsrv_active(ctp)
538 ct_entry *ctp;
543 if (ctp == NULL)
547 *(ctp->ct_activep) = t;
548 if ((envctp = ctp->ct_envparent) == NULL)
564 ct_entry *ctp;
566 ctp = get_tableent(id);
567 if (ctp == NULL)
570 if (__dbsrv_verbose && ctp->ct_refcount != 1)
572 id, ctp->ct_refcount);
574 if (--ctp->ct_refcount != 0)
580 dbp = ctp->ct_dbp;
582 if (ctp->ct_dbdp.db != NULL)
583 __os_free(NULL, ctp->ct_dbdp.db);
584 if (ctp->ct_dbdp.subdb != NULL)
585 __os_free(NULL, ctp->ct_dbdp.subdb);
586 __dbdel_ctp(ctp);
599 ct_entry *ctp;
609 for (ctp = LIST_FIRST(&__dbsrv_head); ctp != NULL;
610 ctp = LIST_NEXT(ctp, entries)) {
615 if ((ctp->ct_type & CT_JOIN) &&
616 ctp->ct_activep == &dbc_ctp->ct_active) {
617 ctp->ct_type &= ~CT_JOIN;
618 ctp->ct_activep = ctp->ct_origp;
619 __dbsrv_active(ctp);
638 ct_entry *ctp, *dbctp, *nextctp;
640 ctp = get_tableent(id);
641 if (ctp == NULL)
644 if (__dbsrv_verbose && ctp->ct_refcount != 1)
646 id, ctp->ct_refcount);
651 if (--ctp->ct_refcount != 0 && !force)
653 dbenv = ctp->ct_envp;
668 if (dbctp->ct_envparent != ctp)
677 * multiple ctp entries. Start over with a
678 * guaranteed good ctp.
683 __dbdel_ctp(ctp);