void rfbSendBell(void)
{
  rfbClientPtr cl, nextCl;
  rfbBellMsg b;

  for (cl = rfbClientHead; cl; cl = nextCl) {
    nextCl = cl->next;
    if (cl->state != RFB_NORMAL)
      continue;
    b.type = rfbBell;
    if (WriteExact(cl, (char *)&b, sz_rfbBellMsg) < 0) {
      rfbLogPerror("rfbSendBell: write");
      rfbCloseClient(cl);
      continue;
    }
    if (cl->captureFD >= 0)
      WriteCapture(cl->captureFD, (char *)&b, sz_rfbBellMsg);
  }
}
void rfbSendBell(void)
{
  rfbClientPtr cl, nextCl;
  rfbBellMsg b;

  for (cl = rfbClientHead; cl; cl = nextCl) {
    nextCl = cl->next;
    if (cl->state != RFB_NORMAL)
      continue;
    b.type = rfbBell;
    if (WriteExact(cl, (char *)&b, sz_rfbBellMsg) < 0) {
      rfbLogPerror("rfbSendBell: write");
      rfbCloseClient(cl);
      continue;
    }
    if (cl->captureFD >= 0)
      WriteCapture(cl->captureFD, (char *)&b, sz_rfbBellMsg);
  }
}