Commit db5a30fb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(dump_connections): Revert the automount workaround attempt introduced

	in revision 0.127.  It didn't work, and it also introduced an
	endless loop.
parent 3cd11724
/*
* $Id: connections.c,v 0.128 2003/08/22 20:33:54 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -606,8 +605,6 @@ dump_connections(void)
Session_no s;
Connection *conn;
FILE *fp;
int retry;
int rv;
if ((fp = i_fopen(param.connection_status_file_tmp, "w")) == NULL)
{
......@@ -636,29 +633,15 @@ dump_connections(void)
strerror(errno));
}
for (retry = 0; ; retry++)
errno = 0;
if (i_rename(param.connection_status_file_tmp,
param.connection_status_file) < 0)
{
rv = i_rename(param.connection_status_file_tmp,
param.connection_status_file);
if (rv == 0)
break;
if (errno != ENOENT || retry > 5)
{
kom_log("dump_connections():"
" can't rename %s to %s: %s (retry=%d)\n",
param.connection_status_file_tmp,
param.connection_status_file,
strerror(errno),
retry);
}
if (retry > 3)
sleep(1);
kom_log("dump_connections(): can't rename %s to %s: %s\n",
param.connection_status_file_tmp,
param.connection_status_file,
strerror(errno));
}
if (retry != 0)
kom_log("dump_connections(): rename OK on try %d\n", retry);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment