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);
|
||||
|
||||
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()));
|
||||
|
||||
// forward
|
||||
|
@ -567,10 +571,6 @@ ServerProxy::setClipboard()
|
|||
|
||||
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
|
||||
|
|
|
@ -79,8 +79,13 @@ ClientProxy1_6::recvClipboard()
|
|||
|
||||
int r = ClipboardChunk::assemble(getStream(), dataCached, id, seq);
|
||||
|
||||
if (r == kFinish) {
|
||||
LOG((CLOG_DEBUG "received client \"%s\" clipboard %d seqnum=%d, size=%d", getName().c_str(), id, seq, dataCached.size()));
|
||||
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 client \"%s\" clipboard %d seqnum=%d, size=%d",
|
||||
getName().c_str(), id, seq, dataCached.size()));
|
||||
// save clipboard
|
||||
m_clipboard[id].m_clipboard.unmarshall(dataCached, 0);
|
||||
m_clipboard[id].m_sequenceNumber = seq;
|
||||
|
@ -92,10 +97,6 @@ ClientProxy1_6::recvClipboard()
|
|||
m_events->addEvent(Event(m_events->forClipboard().clipboardChanged(),
|
||||
getEventTarget(), info));
|
||||
}
|
||||
else if (r == kStart) {
|
||||
size_t size = ClipboardChunk::getExpectedSize();
|
||||
LOG((CLOG_DEBUG "receiving clipboard %d size=%d", id, size));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue