From: Michael Hampton Date: Mon, 18 Sep 2006 09:33:06 +0000 (+0000) Subject: * Fix bug which caused mailing lists to be dropped entirely when editing X-Git-Tag: v7.86~3938 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=cd92b431d7422041f79180bd1c8a9419dd68edff;p=citadel.git * Fix bug which caused mailing lists to be dropped entirely when editing the lists from the text client --- diff --git a/citadel/routines2.c b/citadel/routines2.c index 068cf9bba..5264df344 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -1120,19 +1120,20 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment) } if (file_checksum(filename) == cksum) { - err_printf("*** Not saving changes.\n"); + err_printf("*** No changes to save.\n"); e_ex_code = 1; } if (e_ex_code == 0) { /* Save changes */ changefp = fopen(changefile, "w"); + /* This appears completely unnecessary; why was it here? -IO r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf); if (r / 100 == 1) { while(listing && strlen(listing)) { extract_token(buf, listing, 0, '\n', sizeof buf); remove_token(listing, 0, '\n'); extract_token(instr, buf, 0, '|', sizeof instr); - if (strcasecmp(instr, entrytype)) { + if (!strcasecmp(instr, entrytype)) { fprintf(changefp, "%s\n", buf); } } @@ -1141,6 +1142,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment) free(listing); listing = NULL; } + */ tempfp = fopen(filename, "r"); while (fgets(buf, sizeof buf, tempfp) != NULL) { for (i=0; i