Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-03-17 13:53:17 (GMT)
committer Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-03-17 13:53:17 (GMT)
commitac602a7e76622e4650030c20879e15c8bfaf9c1f (patch)
treeb6f5cb8c9a8a878e4893f04c226bbb3c057eb2b5
parentd8b638e22934e10a489f7ec228d0f1bcb4224851 (diff)
pass byte_arrays=True to {Accept,Provide}Filefix-ft
The unix socket address is supposed to be an 'ay' and not a 's' according to the spec. This change make the code works with both so it can be used with old bugged CM's and new ones.
-rw-r--r--src/jarabe/model/filetransfer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/model/filetransfer.py b/src/jarabe/model/filetransfer.py
index 964b6b4..ab5cd4f 100644
--- a/src/jarabe/model/filetransfer.py
+++ b/src/jarabe/model/filetransfer.py
@@ -204,7 +204,7 @@ class IncomingFileTransfer(BaseFileTransfer):
channel_ft = self.channel[CHANNEL_TYPE_FILE_TRANSFER]
self._socket_address = channel_ft.AcceptFile(SOCKET_ADDRESS_TYPE_UNIX,
- SOCKET_ACCESS_CONTROL_LOCALHOST, '', 0)
+ SOCKET_ACCESS_CONTROL_LOCALHOST, '', 0, byte_arrays=True)
def __notify_state_cb(self, file_transfer, pspec):
logging.debug('__notify_state_cb %r' % self.props.state)
@@ -266,7 +266,8 @@ class OutgoingFileTransfer(BaseFileTransfer):
channel_file_transfer = self.channel[CHANNEL_TYPE_FILE_TRANSFER]
self._socket_address = channel_file_transfer.ProvideFile(
- SOCKET_ADDRESS_TYPE_UNIX, SOCKET_ACCESS_CONTROL_LOCALHOST, '')
+ SOCKET_ADDRESS_TYPE_UNIX, SOCKET_ACCESS_CONTROL_LOCALHOST, '',
+ byte_arrays=True)
def _get_buddy_handle(self):
object_path = self.buddy.object_path()