(41 . 18)(41 . 16)
36 self.log_outgoing(target_peer)
37
38 def retry(self, requesting_peer):
39 target_peer = self.state.get_peer_by_handle(self.handle)
40
41 if target_peer == None:
42 logging.debug("Aborting message: unknown handle: %s" % self.handle)
43 if requesting_peer == None:
44 logging.debug("Aborting message: unknown peer: %s" % requesting_peer.handles[0])
45 return
46
47 if not target_peer.get_key():
48 logging.debug("No key for peer associated with %s" % self.handle)
49 if not requesting_peer.get_key():
50 logging.debug("No key for peer associated with %s" % requesting_peer.handles[0])
51 return
52
53 # TODO: Figure out how to verify that the requester was the original intended recipient
54 signed_packet_bytes = self.pack(target_peer, self.command, self.bounces, self.message_bytes)
55 target_peer.send(signed_packet_bytes)
56 self.log_outgoing(target_peer)
57 signed_packet_bytes = self.pack(requesting_peer, self.command, self.bounces, self.message_bytes)
58 requesting_peer.send(signed_packet_bytes)
59 self.log_outgoing(requesting_peer)
60