X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fcontrol.c;h=230b8d3df9d787cff61a6cfff4dbbb08a8caa9ee;hp=2b2721d04a31e1bca930bff66e5a29ba9f0eee74;hb=d7fd95a3ec0da47dbbdeabc3bee0dfb01a8dde61;hpb=20eee946957c3754bd90a0e9a997508b40396feb diff --git a/citadel/control.c b/citadel/control.c index 2b2721d04..230b8d3df 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -26,20 +26,6 @@ FILE *control_fp = NULL; 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 @@ -131,7 +117,6 @@ void get_control(void) 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", @@ -145,7 +130,6 @@ void get_control(void) 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);