X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fcitserver.c;h=43c0567bf94e1341275adc37dd43e355acf6e159;hb=0f911dcac6e52ee8f86a5429f61fc63d3e293a4a;hp=87f4f6f827d4c65be909a214d6e092a56f77152d;hpb=7c7698836856107cf05908ddb4314a82506ddd76;p=citadel.git diff --git a/citadel/citserver.c b/citadel/citserver.c index 87f4f6f82..43c0567bf 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -175,9 +175,6 @@ void master_cleanup(int exitcode) { lprintf(CTDL_INFO, "Closing databases\n"); close_databases(); - /* flush the networker stuff */ -/* destroy_network_queue_room();*/ - /* Do system-dependent stuff */ sysdep_master_cleanup(); @@ -369,8 +366,9 @@ int is_public_client(void) } else ptr++; } - while (isspace((buf[strlen(buf)-1]))) { - buf[strlen(buf)-1] = 0; + ptr--; + while (ptr>buf && isspace(*ptr)) { + *(ptr--) = 0; } if (hostname_to_dotted_quad(addrbuf, buf) == 0) { if ((strlen(public_clients) +