Changeset d8c7cf4 in mod_gnutls for src/gnutls_cache.c


Ignore:
Timestamp:
Sep 24, 2010, 2:51:52 AM (9 years ago)
Author:
Nikos Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
be90561
Parents:
771ca63
Message:

Only allow two options for DB. Berkeley DB and gdbm. The other options
such as SDBM had serious limitations. Thanks to Hardy Griech for pointing out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.c

    r771ca63 rd8c7cf4  
    297297const char* db_type(mgs_srvconf_rec * sc)
    298298{
    299         if (sc->cache_type == mgs_cache_sdbm)
    300                 return "sdbm";
     299        if (sc->cache_type == mgs_cache_gdbm)
     300                return "gdbm";
    301301        else
    302                 return "default";
     302                return "db";
    303303}
    304304
     
    556556                                 mgs_srvconf_rec *sc)
    557557{
    558     if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_sdbm) {
     558    if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_gdbm) {
    559559        return dbm_cache_post_config(p, s, sc);
    560560    }
     
    565565                                mgs_srvconf_rec *sc)
    566566{
    567     if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_sdbm) {
     567    if (sc->cache_type == mgs_cache_dbm || sc->cache_type == mgs_cache_gdbm) {
    568568        return 0;
    569569    }
     
    580580int mgs_cache_session_init(mgs_handle_t *ctxt)
    581581{
    582     if (ctxt->sc->cache_type == mgs_cache_dbm || ctxt->sc->cache_type == mgs_cache_sdbm) {
     582    if (ctxt->sc->cache_type == mgs_cache_dbm || ctxt->sc->cache_type == mgs_cache_gdbm) {
    583583        gnutls_db_set_retrieve_function(ctxt->session, dbm_cache_fetch);
    584584        gnutls_db_set_remove_function(ctxt->session, dbm_cache_delete);
Note: See TracChangeset for help on using the changeset viewer.