more fixes - give protobuf the types it wants

This commit is contained in:
Daniel Hiepler 2016-04-12 17:13:18 +02:00
parent 60480d02ea
commit 0574044472

View file

@ -70,7 +70,7 @@ class SpectrumBackend:
vcard.id = ID vcard.id = ID
vcard.fullname = fullName vcard.fullname = fullName
vcard.nickname = nickname vcard.nickname = nickname
vcard.photo = photo vcard.photo = bytes(photo)
message = WRAP(vcard.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_VCARD) message = WRAP(vcard.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_VCARD)
self.send(message) self.send(message)
@ -223,7 +223,7 @@ class SpectrumBackend:
def handleFTData(self, ftID, data): def handleFTData(self, ftID, data):
d = protocol_pb2.FileTransferData() d = protocol_pb2.FileTransferData()
d.ftid = ftID d.ftid = ftID
d.data = data d.data = bytes(data)
message = WRAP(d.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_FT_DATA); message = WRAP(d.SerializeToString(), protocol_pb2.WrapperMessage.TYPE_FT_DATA);
self.send(message) self.send(message)