Refactored code order to make it more readable
This commit is contained in:
parent
9800bec857
commit
a44e9832c5
|
@ -557,7 +557,11 @@ ServerProxy::setClipboard()
|
||||||
|
|
||||||
int r = ClipboardChunk::assemble(m_stream, dataCached, id, seq);
|
int r = ClipboardChunk::assemble(m_stream, dataCached, id, seq);
|
||||||
|
|
||||||
if (r == kFinish) {
|
if (r == kStart) {
|
||||||
|
size_t size = ClipboardChunk::getExpectedSize();
|
||||||
|
LOG((CLOG_DEBUG "receiving clipboard %d size=%d", id, size));
|
||||||
|
}
|
||||||
|
else if (r == kFinish) {
|
||||||
LOG((CLOG_DEBUG "received clipboard %d size=%d", id, dataCached.size()));
|
LOG((CLOG_DEBUG "received clipboard %d size=%d", id, dataCached.size()));
|
||||||
|
|
||||||
// forward
|
// forward
|
||||||
|
@ -567,10 +571,6 @@ ServerProxy::setClipboard()
|
||||||
|
|
||||||
LOG((CLOG_INFO "clipboard was updated"));
|
LOG((CLOG_INFO "clipboard was updated"));
|
||||||
}
|
}
|
||||||
else if (r == kStart) {
|
|
||||||
size_t size = ClipboardChunk::getExpectedSize();
|
|
||||||
LOG((CLOG_DEBUG "receiving clipboard %d size=%d", id, size));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -79,8 +79,13 @@ ClientProxy1_6::recvClipboard()
|
||||||
|
|
||||||
int r = ClipboardChunk::assemble(getStream(), dataCached, id, seq);
|
int r = ClipboardChunk::assemble(getStream(), dataCached, id, seq);
|
||||||
|
|
||||||
if (r == kFinish) {
|
if (r == kStart) {
|
||||||
LOG((CLOG_DEBUG "received client \"%s\" clipboard %d seqnum=%d, size=%d", getName().c_str(), id, seq, dataCached.size()));
|
size_t size = ClipboardChunk::getExpectedSize();
|
||||||
|
LOG((CLOG_DEBUG "receiving clipboard %d size=%d", id, size));
|
||||||
|
}
|
||||||
|
else if (r == kFinish) {
|
||||||
|
LOG((CLOG_DEBUG "received client \"%s\" clipboard %d seqnum=%d, size=%d",
|
||||||
|
getName().c_str(), id, seq, dataCached.size()));
|
||||||
// save clipboard
|
// save clipboard
|
||||||
m_clipboard[id].m_clipboard.unmarshall(dataCached, 0);
|
m_clipboard[id].m_clipboard.unmarshall(dataCached, 0);
|
||||||
m_clipboard[id].m_sequenceNumber = seq;
|
m_clipboard[id].m_sequenceNumber = seq;
|
||||||
|
@ -92,10 +97,6 @@ ClientProxy1_6::recvClipboard()
|
||||||
m_events->addEvent(Event(m_events->forClipboard().clipboardChanged(),
|
m_events->addEvent(Event(m_events->forClipboard().clipboardChanged(),
|
||||||
getEventTarget(), info));
|
getEventTarget(), info));
|
||||||
}
|
}
|
||||||
else if (r == kStart) {
|
|
||||||
size_t size = ClipboardChunk::getExpectedSize();
|
|
||||||
LOG((CLOG_DEBUG "receiving clipboard %d size=%d", id, size));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue