/*
* Read and write the citadel.config file
*
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
config.c_managesieve_port = 2020;
config.c_xmpp_c2s_port = 5222;
config.c_xmpp_s2s_port = 5269;
+ config.c_nntp_port = 119;
+ config.c_nntps_port = 563;
}
void setcfglen(void)
FILE *cfp;
int blocks_written = 0;
- if ((cfp = fopen(file_citadel_config, "w")) != NULL) {
+ cfp = fopen(file_citadel_config, "w");
+ if (cfp != NULL) {
blocks_written = fwrite((char *) &config, sizeof(struct config), 1, cfp);
if (blocks_written == 1) {
- fclose(cfp);
chown(file_citadel_config, CTDLUID, (-1));
chmod(file_citadel_config, 0600);
+ fclose(cfp);
return;
}
+ fclose(cfp);
}
syslog(LOG_EMERG, "%s: %s", file_citadel_config, strerror(errno));
}