Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Help people upgrade their conf

  • Loading branch information...
commit 18ec3d7c10a1fd5accb7648ba1b39ed469a44350 1 parent fa11045
Caleb James DeLisle authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 cjdroute.c
View
12 cjdroute.c
@@ -574,12 +574,17 @@ static void adminMemory(Dict* input, void* vcontext, String* txid)
static void admin(Dict* mainConf, char* user, struct Log* logger, struct Context* context)
{
Dict* adminConf = Dict_getDict(mainConf, String_CONST("admin"));
+ String* address = Dict_getString(adminConf, String_CONST("bind"));
+ String* password = Dict_getString(adminConf, String_CONST("password"));
- if (!adminConf) {
+ if (!password) {
uint8_t randomPass[32];
randomBase32(randomPass);
Log_critical1(logger, "cjdns now requires you to specify an admin port and password.\n"
- "add this to your configuration:\n"
+ "if you don't have an \"admin\" section in your configuration, "
+ "add this.\n"
+ "Otherwise amend it to add the password field:\n"
+ "\n"
" \"admin\": {\n"
" \"bind\": \"127.0.0.1:11234\",\n"
" \"password\": \"%s\"\n"
@@ -587,9 +592,6 @@ static void admin(Dict* mainConf, char* user, struct Log* logger, struct Context
exit(-1);
}
- String* address = Dict_getString(adminConf, String_CONST("bind"));
- String* password = Dict_getString(adminConf, String_CONST("password"));
-
if (!address) {
Log_critical(logger, "admin.bind not specified.");
exit(-1);
Please sign in to comment.
Something went wrong with that request. Please try again.