diff --git a/misc/DHTnodes b/misc/DHTnodes index 12e8a5f..4c4e77d 100644 --- a/misc/DHTnodes +++ b/misc/DHTnodes @@ -1,10 +1,10 @@ 192.254.75.98 33445 951C88B7E75C867418ACDB5D273821372BB5BD652740BCDF623A4FA293E75D2F 37.187.46.132 33445 A9D98212B3F972BD11DA52BEB0658C326FCCC1BFD49F347F9C2D3D8B61E1B927 144.76.60.215 33445 04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F -23.226.230.47 33445 A09162D68618E742FFBCA1C2C70385E6679604B2D80EA6E84AD0996A1AC8A074 -54.199.139.199 33445 7F9C31FE850E97CEFD4C4591DF93FC757C7C12549DDD55F8EEAECC34FE76C029 +23.226.230.47 33445 A09162D68618E742FFBCA1C2C70385E6679604B2D80EA6E84AD0996A1AC8A074 +54.199.139.199 33445 7F9C31FE850E97CEFD4C4591DF93FC757C7C12549DDD55F8EEAECC34FE76C029 192.210.149.121 33445 F404ABAA1C99A9D37D61AB54898F56793E1DEF8BD46B1038B9D822E8460FAB67 37.59.102.176 33445 B98A2CEAA6C6A2FADC2C3632D284318B60FE5375CCB41EFA081AB67F500C1B0B -95.85.13.245 33445 7187969BB10B54C98538BAE94C069CE5C84E650D54F7E596543D8FB1ECF4CF23 178.21.112.187 33445 4B2C19E924972CB9B57732FB172F8A8604DE13EEDA2A6234E348983344B23057 -76.191.23.96 33445 4BA57660DE3E854C530EED601BF8D54B7EFAE960523B6CFC10210CC08E2CB808 +107.161.17.51 33445 7BE3951B97CA4B9ECDDA768E8C52BA19E9E2690AB584787BF4C90E04DBB75111 +63.165.243.15 33445 8CD087E31C67568103E8C2A28653337E90E6B8EDA0D765D57C6B5172B4F1F04C diff --git a/src/toxic.c b/src/toxic.c index 940030a..a2e9940 100644 --- a/src/toxic.c +++ b/src/toxic.c @@ -492,10 +492,7 @@ static int password_prompt(char *buf, int size) /* re-enable terminal echo */ tcsetattr(fileno(stdin), TCSANOW, &oflags); - if (p == NULL) - return 0; - - if (len <= 1) + if (p == NULL || len <= 1) return 0; /* eat overflowed stdin and return error */ @@ -510,7 +507,7 @@ static int password_prompt(char *buf, int size) return len; } -/* Ask user if they would like to encrypt the data file on first usage */ +/* Ask user if they would like to encrypt the data file and set password */ static void first_time_encrypt(const char *msg) { char ch[256] = {0}; @@ -519,9 +516,8 @@ static void first_time_encrypt(const char *msg) system("clear"); printf("%s ", msg); - if (!strcasecmp(ch, "y\n") || !strcasecmp(ch, "n\n") - || !strcasecmp(ch, "yes\n") || !strcasecmp(ch, "no\n") - || !strcasecmp(ch, "q\n")) + if (!strcasecmp(ch, "y\n") || !strcasecmp(ch, "n\n") || !strcasecmp(ch, "yes\n") + || !strcasecmp(ch, "no\n") || !strcasecmp(ch, "q\n")) break; } while (fgets(ch, sizeof(ch), stdin));