apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Spinetti <m.spine...@pisa.iol.it>
Subject apr_dbm error
Date Mon, 29 Aug 2005 15:37:12 GMT
Hi all,
as Nick suggested me I tried to use apr_dbm for my purpose.
My target is to use apr_dbm to record some information and then get it 
for serving to my clients.
I'm using two apr_dbm_t which I'm opening as

apr_dbm_open_ex(&db_timeout, dbtype, DBM_FILE_TIMEOUT, APR_DBM_RWCREATE, 
APR_OS_DEFAULT, context);
apr_dbm_open_ex(&db, dbtype, DBM_FILE, APR_DBM_RWCREATE, APR_OS_DEFAULT, 

In the first I'd like to record couples (url, timeout).
In the second, (url, XML).

When a client send me an url, I'd like to get, if exists, its XML, if it 
doesn't fall in timeout.
But when I try to write my xml:


rv = apr_dbm_store(db, key, val);
 if (rv != APR_SUCCESS) {
        apr_size_t length;
        char errbuf[200];      
        apr_strerror(rv, errbuf, sizeof(errbuf));
        fprintf(stderr,"[ERRORE] Errore %d - %s\n", rv, errbuf);
         if (db) {
                apr_dbm_geterror(db, &rv, errbuf, sizeof(errbuf));
                fprintf(stderr, "[ERRORE] APR_DB Error %d - %s\n", rv, 
         if (apr_dbm_exists(db_timeout, key))
             apr_dbm_delete(db_timeout, key);
        goto FINE;

I get this error:

[ERRORE] Errore 20014 - Internal error
[ERRORE] APR_DB Error 22 - I/O error occurred.

What does it mean?
Can I write a XML as content?

My content (key, val) is written using a subpool which is destroyed at 
the end.

Thanks for the support


View raw message