+ yaz_log(YLOG_FATAL, "cf_commit: dirty cache");
+ return -1;
+ }
+ yaz_log(log_level, "cf_commit: state=%d", cf->head.state);
+ if (cf->head.state == CFILE_STATE_HASH)
+ return cf_commit_hash(cf);
+ else if (cf->head.state == CFILE_STATE_FLAT)
+ return cf_commit_flat(cf);
+ else
+ {
+ yaz_log(YLOG_FATAL, "cf_commit: bad state=%d", cf->head.state);
+ return -1;