Lines Matching refs:status
90 apr_status_t status; in prep() local
127 if ((status = apr_file_open(&db->dirf, dirname, flags, perms, p)) in prep()
131 if ((status = apr_file_open(&db->pagf, pagname, flags, perms, p)) in prep()
135 if ((status = apr_sdbm_lock(db, (db->flags & SDBM_RDONLY) in prep()
149 if ((status = apr_sdbm_unlock(db)) != APR_SUCCESS) in prep()
168 return status; in prep()
189 apr_status_t status; in apr_sdbm_fetch() local
194 if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS) in apr_sdbm_fetch()
195 return status; in apr_sdbm_fetch()
197 if ((status = getpage(db, exhash(key), 0, 1)) == APR_SUCCESS) { in apr_sdbm_fetch()
204 return status; in apr_sdbm_fetch()
209 apr_status_t status; in write_page() local
212 if ((status = apr_file_seek(db->pagf, APR_SET, &off)) == APR_SUCCESS) in write_page()
213 status = apr_file_write_full(db->pagf, buf, PBLKSIZ, NULL); in write_page()
215 return status; in write_page()
221 apr_status_t status; in apr_sdbm_delete() local
228 if ((status = apr_sdbm_lock(db, APR_FLOCK_EXCLUSIVE)) != APR_SUCCESS) in apr_sdbm_delete()
229 return status; in apr_sdbm_delete()
231 if ((status = getpage(db, exhash(key), 0, 1)) == APR_SUCCESS) { in apr_sdbm_delete()
234 status = APR_EGENERAL; in apr_sdbm_delete()
236 status = write_page(db, db->pagbuf, db->pagbno); in apr_sdbm_delete()
241 return status; in apr_sdbm_delete()
249 apr_status_t status; in apr_sdbm_store() local
262 if ((status = apr_sdbm_lock(db, APR_FLOCK_EXCLUSIVE)) != APR_SUCCESS) in apr_sdbm_store()
263 return status; in apr_sdbm_store()
265 if ((status = getpage(db, (hash = exhash(key)), 0, 1)) == APR_SUCCESS) { in apr_sdbm_store()
274 status = APR_EEXIST; in apr_sdbm_store()
281 if ((status = makroom(db, hash, need)) != APR_SUCCESS) in apr_sdbm_store()
289 status = write_page(db, db->pagbuf, db->pagbno); in apr_sdbm_store()
295 return status; in apr_sdbm_store()
310 apr_status_t status; in makroom() local
331 if ((status = write_page(db, db->pagbuf, db->pagbno)) in makroom()
333 return status; in makroom()
339 if ((status = write_page(db, new, newp)) != APR_SUCCESS) in makroom()
340 return status; in makroom()
343 if ((status = setdbit(db, db->curbit)) != APR_SUCCESS) in makroom()
344 return status; in makroom()
360 if ((status = write_page(db, db->pagbuf, db->pagbno)) in makroom()
362 return status; in makroom()
387 apr_status_t status; in read_from() local
389 if ((status = apr_file_seek(f, APR_SET, &off)) != APR_SUCCESS || in read_from()
390 ((status = apr_file_read_full(f, buf, len, NULL)) != APR_SUCCESS)) { in read_from()
392 if (status == APR_EOF && create) { in read_from()
394 status = APR_SUCCESS; in read_from()
398 return status; in read_from()
408 apr_status_t status; in apr_sdbm_firstkey() local
410 if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS) in apr_sdbm_firstkey()
411 return status; in apr_sdbm_firstkey()
416 if ((status = getpage(db, 0, 1, 1)) == APR_SUCCESS) { in apr_sdbm_firstkey()
419 status = getnext(key, db); in apr_sdbm_firstkey()
424 return status; in apr_sdbm_firstkey()
430 apr_status_t status; in apr_sdbm_nextkey() local
432 if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS) in apr_sdbm_nextkey()
433 return status; in apr_sdbm_nextkey()
435 status = getnext(key, db); in apr_sdbm_nextkey()
439 return status; in apr_sdbm_nextkey()
447 apr_status_t status; in getpage() local
478 if ((status = read_from(db->pagf, db->pagbuf, in getpage()
481 return status; in getpage()
519 apr_status_t status; in setdbit() local
526 if ((status = read_from(db->dirf, db->dirbuf, in setdbit()
529 return status; in setdbit()
542 if ((status = apr_file_seek(db->dirf, APR_SET, &off)) == APR_SUCCESS) in setdbit()
543 status = apr_file_write_full(db->dirf, db->dirbuf, DBLKSIZ, NULL); in setdbit()
545 return status; in setdbit()
554 apr_status_t status; in getnext() local
569 if ((status = getpage(db, db->blkptr, 1, 0)) != APR_SUCCESS) in getnext()
570 return status; in getnext()