From: teor Date: Sat, 10 Jan 2015 05:34:10 +0000 (+1100) Subject: Merge branch 'bug14001-clang-warning' into bug13111-empty-key-files-fn-empty X-Git-Tag: tor-0.2.6.3-alpha~165^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c200ab46b85cece87a4bcdbaacd41bc6539d1671;p=thirdparty%2Ftor.git Merge branch 'bug14001-clang-warning' into bug13111-empty-key-files-fn-empty Conflicts: src/or/router.c Choose newer comment. Merge changes to comment and function invocation. --- c200ab46b85cece87a4bcdbaacd41bc6539d1671 diff --cc src/or/router.c index 94ae2e78c4,56bb909952..f0317aa549 --- a/src/or/router.c +++ b/src/or/router.c @@@ -885,9 -880,7 +889,9 @@@ init_keys(void keydir = get_datadir_fname2("keys", "secret_onion_key.old"); if (!lastonionkey && file_status(keydir) == FN_FILE) { - prkey = init_key_from_file(keydir, 1, LOG_ERR, 0); /* XXXX Why 1? */ + /* Load keys from non-empty files only. + * Missing old keys won't be replaced with freshly generated keys. */ - prkey = init_key_from_file(keydir, 0, LOG_ERR); ++ prkey = init_key_from_file(keydir, 0, LOG_ERR, 0); if (prkey) lastonionkey = prkey; }