Skip to content

Commit

Permalink
better error logging in clipboard path (define "handler"), and avoid …
Browse files Browse the repository at this point in the history
…stacktrace for disabled clipboard packets

git-svn-id: https://xpra.org/svn/Xpra/trunk@4846 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 3, 2013
1 parent 8c4d931 commit d0cffe0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,11 +1336,16 @@ def process_packet(self, proto, packet):
if not ss:
#protocol has been dropped!
return
handler = self._clipboard_helper.process_clipboard_packet
assert self._clipboard_client==ss, \
"the clipboard packet '%s' does not come from the clipboard owner!" % packet_type
assert ss.clipboard_enabled, "received a clipboard packet from a source which does not have clipboard enabled!"
if not ss.clipboard_enabled:
#this can happen when we disable clipboard in the middle of transfers
#(especially when there is a clipboard loop)
log.warn("received a clipboard packet from a source which does not have clipboard enabled!")
return
assert self._clipboard_helper, "received a clipboard packet but we do not support clipboard sharing"
self.idle_add(self._clipboard_helper.process_clipboard_packet, packet)
self.idle_add(handler, packet)
return
if proto in self._server_sources:
handlers = self._authenticated_packet_handlers
Expand Down

0 comments on commit d0cffe0

Please sign in to comment.