Send lock LED state from server to client
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 28f6a62..43e8f3e 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -461,7 +461,17 @@
void VNCServerST::setLEDState(unsigned int state)
{
+ std::list<VNCSConnectionST*>::iterator ci, ci_next;
+
+ if (state == ledState)
+ return;
+
ledState = state;
+
+ for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
+ ci_next = ci; ci_next++;
+ (*ci)->setLEDStateOrClose(state);
+ }
}
// Other public methods