2
* $Id: client.c,v 5.91 2007/04/02 18:18:58 bryan Exp $
2
* $Id: client.c,v 5.93 2009/09/26 09:20:15 bryan Exp $
4
4
* Copyright conserver.com, 2000
64
CONSCLIENT *pCLfound = (CONSCLIENT *)0;
66
/* make the first guy to have the `want write' bit set the writer
67
* (tell him of the promotion, too) we could look for the
68
* most recent or some such... I guess it doesn't matter that
67
/* make the first guy (last on the list) to have the `want write' bit set
68
* the writer (tell him of the promotion, too) we could look for the most
69
* recent or some such... I guess it doesn't matter that much.
71
71
if (pCE->pCLwr != (CONSCLIENT *)0 || pCE->fronly)
74
74
for (pCL = pCE->pCLon; (CONSCLIENT *)0 != pCL; pCL = pCL->pCLnext) {
75
if (!pCL->fwantwr || pCL->fro)
75
if (pCL->fwantwr && !pCL->fro)
79
if (pCLfound != (CONSCLIENT *)0) {
80
pCLfound->fwantwr = 0;
80
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached (nologging)]\r\n",
83
FileWrite(pCLfound->fd, FLAGFALSE,
84
"\r\n[attached (nologging)]\r\n", -1);
83
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached]\r\n", -1);
86
FileWrite(pCLfound->fd, FLAGFALSE, "\r\n[attached]\r\n", -1);
85
TagLogfileAct(pCE, "%s attached", pCL->acid->string);
88
TagLogfileAct(pCE, "%s attached", pCLfound->acid->string);
89
pCE->pCLwr = pCLfound;