initialize_config_system();
validate_config();
- syslog(LOG_INFO, "Acquiring control record");
- get_control();
-
/* Check floor reference counts */
check_ref_counts();
}
}
- release_control();
-
/* Now go away. */
syslog(LOG_NOTICE, "citserver: Exiting with status %d\n", exitcode);
fflush(stdout); fflush(stderr);
long control_highest_user = 0;
-/*
- * lock_control - acquire a lock on the control record file.
- * This keeps multiple citservers from running concurrently.
- */
-void lock_control(void)
-{
-#if defined(LOCK_EX) && defined(LOCK_NB)
- if (flock(fileno(control_fp), (LOCK_EX | LOCK_NB))) {
- syslog(LOG_EMERG, "citserver: unable to lock %s.\n", file_citadel_control);
- syslog(LOG_EMERG, "Is another citserver already running?\n");
- exit(CTDLEXIT_CONTROL);
- }
-#endif
-}
/*
* callback to get highest room number when rebuilding control file
if (control_fp == NULL) {
control_fp = fopen(file_citadel_control, "rb+");
if (control_fp != NULL) {
- lock_control();
rv = fchown(fileno(control_fp), ctdluid, -1);
if (rv == -1)
syslog(LOG_EMERG, "Failed to adjust ownership of: %s [%s]\n",
if (control_fp == NULL) {
control_fp = fopen(file_citadel_control, "wb+");
if (control_fp != NULL) {
- lock_control();
memset(&CitControl, 0, sizeof(struct CitControl));
rv = fchown(fileno(control_fp), ctdluid, -1);
/*
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2015 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.
+ * 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.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void get_control (void);
void put_control (void);
-void release_control(void);
void check_control(void);
long int get_new_message_number (void);
long int get_new_user_number (void);
/*
* Main source module for the client program.
*
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2015 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.
+ * 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.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
#include "sysdep.h"
scr_printf("You are connected to %s (%s) @%s\n", ipc->ServInfo.nodename, ipc->ServInfo.humannode, ipc->ServInfo.fqdn);
scr_printf("running %s with text client v%.2f,\n", ipc->ServInfo.software, (float)CLIENT_VERSION/100);
scr_printf("server build %s,\n", ipc->ServInfo.svn_revision, (float)CLIENT_VERSION/100);
- scr_printf("and located in %s.\n", ipc->ServInfo.site_location);
- scr_printf("Connected users %d / Active users %d / Highest message #%ld\n", mrtg_users, mrtg_active_users, mrtg_himessage);
- scr_printf("Server uptime: %s\n", mrtg_server_uptime);
- scr_printf("Your system administrator is %s.\n", ipc->ServInfo.sysadm);
- scr_printf("Copyright (C)1987-2009 by the Citadel development team\n");
+ scr_printf("and located in %s.\n", ipc->ServInfo.site_location);
+ scr_printf("Connected users %d / Active users %d / Highest message #%ld\n", mrtg_users, mrtg_active_users, mrtg_himessage);
+ scr_printf("Server uptime: %s\n", mrtg_server_uptime);
+ scr_printf("Your system administrator is %s.\n", ipc->ServInfo.sysadm);
}
/*