Changeset 365dd59


Ignore:
Timestamp:
2019-05-23T08:57:02Z (5 years ago)
Author:
Ævar Arnfjörð Bjarmason <avarab@…>
Branches:
master
Children:
10b3683
Parents:
fe122f3
git-author:
Ævar Arnfjörð Bjarmason <avarab@…> (22-05-19 20:56:41)
git-committer:
Ævar Arnfjörð Bjarmason <avarab@…> (23-05-19 08:57:02)
Message:

conf: support AccountStorage as well as Account_Storage

These variables added way back in b73ac9c3 ("Add support for 'primary'
and 'migrate' account storages. [...]", 2005-12-14). I think that
these have never been used by anyone, I think Dennis's out-of-tree
MySQL backend is the only storage backend anyone bothered to write.

That backend uses "AccountStorage" in the config, not
"Account_Storage". Let's support that, we could just change this over,
but *maybe* someone uses it out of tree, and supporting their config
in that case is easy.

I'm forward-porting https://github.com/bitlbee/bitlbee/pull/67 there's
production code that uses the CamelCase variant, and it would be handy
if it worked as-is without needing to fiddle with the config.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • conf.c

    rfe122f3 r365dd59  
    277277                                g_free(conf->motdfile);
    278278                                conf->motdfile = g_strdup(ini->value);
    279                         } else if (g_strcasecmp(ini->key, "account_storage") == 0) {
     279                        } else if (g_strcasecmp(ini->key, "accountstorage") == 0 ||
     280                                   g_strcasecmp(ini->key, "account_storage") == 0) {
    280281                                g_free(conf->primary_storage);
    281282                                conf->primary_storage = g_strdup(ini->value);
    282                         } else if (g_strcasecmp(ini->key, "account_storage_migrate") == 0) {
     283                        } else if (g_strcasecmp(ini->key, "accountstoragemigrate") == 0 ||
     284                                   g_strcasecmp(ini->key, "account_storage_migrate") == 0) {
    283285                                g_strfreev(conf->migrate_storage);
    284286                                conf->migrate_storage = g_strsplit_set(ini->value, " \t,;", -1);
Note: See TracChangeset for help on using the changeset viewer.