• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/sendmail/libsmdb/

Lines Matching refs:sm_cdbmap

129 	SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
131 if (NULL == sm_cdbmap)
134 if (sm_cdbmap->cdbmap_create)
135 result = cdb_make_finish(&sm_cdbmap->cdbmap_map.cdbs_cdb_wr);
137 fd = sm_cdbmap->cdbmap_fd;
141 sm_cdbmap->cdbmap_fd = -1;
144 free(sm_cdbmap);
156 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
158 assert(sm_cdbmap != NULL);
167 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
168 return sm_cdbmap->cdbmap_fd;
175 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
177 return sm_cdbmap->smcdb_lock_fd;
212 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
218 if (NULL == sm_cdbmap )
220 /* SM_ASSERT(!sm_cdbmap->cdbmap_create); */
223 ret = cdb_find(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd,
227 l = cdb_datalen(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd);
229 ret = cdb_read(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd,
231 cdb_datapos(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd));
254 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
256 assert(sm_cdbmap != NULL);
262 r = cdb_make_put(&sm_cdbmap->cdbmap_map.cdbs_cdb_wr,
285 SMDB_CDB_DATABASE *sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
287 assert(sm_cdbmap != NULL);
288 fd = sm_cdbmap->cdbmap_fd;
335 SMDB_CDB_DATABASE *sm_cdbmap;
340 sm_cdbmap = cursor->smdbc_impl;
341 ret = cdb_seqnext(&sm_cdbmap->smcdb_pos, &sm_cdbmap->cdbmap_map.cdbs_cdb_rd);
347 l = cdb_keylen(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd);
350 ret = cdb_read(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd,
352 cdb_keypos(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd));
357 l = cdb_datalen(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd);
360 ret = cdb_read(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd,
362 cdb_datapos(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd));
387 SMDB_CDB_DATABASE *sm_cdbmap;
394 sm_cdbmap = (SMDB_CDB_DATABASE *) database->smdb_impl;
399 (*cursor)->smdbc_impl = sm_cdbmap;
401 cdb_seqinit(&sm_cdbmap->smcdb_pos, &sm_cdbmap->cdbmap_map.cdbs_cdb_rd);
450 SMDB_CDB_DATABASE *sm_cdbmap;
483 sm_cdbmap = smcdb_malloc_database();
484 if (sm_cdbmap == NULL || smdb_db == NULL)
488 if (sm_cdbmap != NULL)
489 free(sm_cdbmap);
493 sm_cdbmap->smcdb_lock_fd = lock_fd;
515 sm_cdbmap->cdbmap_create = (mode != O_RDONLY);
517 result = cdb_init(&sm_cdbmap->cdbmap_map.cdbs_cdb_rd, db_fd);
519 result = cdb_make_start(&sm_cdbmap->cdbmap_map.cdbs_cdb_wr, db_fd);
544 /* smdb_db->smcdb_db = sm_cdbmap; */
555 smdb_db->smdb_impl = sm_cdbmap;
563 if (sm_cdbmap != NULL)
568 smdb_unlock_file(sm_cdbmap->smcdb_lock_fd);
569 free(sm_cdbmap);