X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e9e8a16d359c900f114853eb0e407a8064e4350c..0d0253c93a64d2b5206e902c648e1e2c6bc5d510:/lib/client.c diff --git a/lib/client.c b/lib/client.c index ccbdf6d..4dfd10c 100644 --- a/lib/client.c +++ b/lib/client.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell + * Copyright (C) 2004-2008 Richard Kettlewell * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -389,9 +389,8 @@ int disorder_connect(disorder_client *c) { return -1; } password = config->password; - if(!password) { - /* Maybe we can read the database */ - /* TODO failure to open the database should not be fatal */ + /* Maybe we can read the database */ + if(!password && trackdb_readable()) { trackdb_init(TRACKDB_NO_RECOVER|TRACKDB_NO_UPGRADE); trackdb_open(TRACKDB_READ_ONLY); password = trackdb_get_password(username);