X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/810b8083772d8f82e589ed70fa5e7d6d5292ccd8..05dcfac6f90b695d4e238f9f15fab1cb5d011967:/lib/configuration.c diff --git a/lib/configuration.c b/lib/configuration.c index bcce6c7..5c1d4ce 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -946,6 +946,8 @@ static const struct conf conf[] = { { C(multicast_loop), &type_boolean, validate_any }, { C(multicast_ttl), &type_integer, validate_non_negative }, { C(namepart), &type_namepart, validate_any }, + { C(new_bias), &type_integer, validate_positive }, + { C(new_bias_age), &type_integer, validate_positive }, { C(new_max), &type_integer, validate_positive }, { C2(nice, nice_rescan), &type_integer, validate_non_negative }, { C(nice_rescan), &type_integer, validate_non_negative }, @@ -1195,6 +1197,8 @@ static struct config *config_default(void) { c->smtp_server = xstrdup("127.0.0.1"); c->new_max = 100; c->reminder_interval = 600; /* 10m */ + c->new_bias_age = 7 * 86400; /* 1 week */ + c->new_bias = 9000000; /* 100 times the base weight */ /* Default stopwords */ if(config_set(&cs, (int)NDEFAULT_STOPWORDS, (char **)default_stopwords)) exit(1); @@ -1280,17 +1284,8 @@ static void config_postdefaults(struct config *c, c->api = BACKEND_COMMAND; else if(c->broadcast.n) c->api = BACKEND_NETWORK; - else { -#if HAVE_ALSA_ASOUNDLIB_H - c->api = BACKEND_ALSA; -#elif HAVE_SYS_SOUNDCARD_H - c->api = BACKEND_OSS; -#elif HAVE_COREAUDIO_AUDIOHARDWARE_H - c->api = BACKEND_COREAUDIO; -#else - c->api = BACKEND_COMMAND; -#endif - } + else + c->api = DEFAULT_BACKEND; } if(server) { if(c->api == BACKEND_COMMAND && !c->speaker_command)