mirror of
https://github.com/ShaYmez/hblink3.git
synced 2024-11-21 23:45:15 -05:00
Fixed registration packet mangling
This commit is contained in:
parent
90a889ec3b
commit
9ae4704d98
@ -270,14 +270,14 @@ class HBSYSTEM(DatagramProtocol):
|
||||
#logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID'])
|
||||
|
||||
def send_peer(self, _peer, _packet):
|
||||
#if _packet[:4] == 'DMRD':
|
||||
self.transport.write(b''.join([_packet[:11], _peer, _packet[15:]]), self._peers[_peer]['SOCKADDR'])
|
||||
if _packet[:4] == 'DMRD':
|
||||
_packet = b''.join([_packet[:11], _peer, _packet[15:]])
|
||||
self.transport.write(_packet, self._peers[_peer]['SOCKADDR'])
|
||||
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
|
||||
#logger.debug('(%s) TX Packet to %s on port %s: %s', self._peers[_peer]['RADIO_ID'], self._peers[_peer]['IP'], self._peers[_peer]['PORT'], ahex(_packet))
|
||||
|
||||
def send_master(self, _packet):
|
||||
#if _packet[:4] == b'DMRD':
|
||||
# _packet = _packet[:11] + self._config['RADIO_ID'] + _packet[15:]
|
||||
if _packet[:4] == b'DMRD':
|
||||
_packet = b''.join([_packet[:11], self._config['RADIO_ID'], _packet[15:]])
|
||||
self.transport.write(_packet, self._config['MASTER_SOCKADDR'])
|
||||
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
|
||||
|
Loading…
Reference in New Issue
Block a user