Options added
This commit is contained in:
		
							parent
							
								
									08f6669bd3
								
							
						
					
					
						commit
						a12b144c7c
					
				| @ -182,7 +182,7 @@ def build_config(_config_file): | |||||||
|                         'SOFTWARE_ID': bytes(config.get(section, 'SOFTWARE_ID').ljust(40)[:40], 'utf-8'), |                         'SOFTWARE_ID': bytes(config.get(section, 'SOFTWARE_ID').ljust(40)[:40], 'utf-8'), | ||||||
|                         'PACKAGE_ID': bytes(config.get(section, 'PACKAGE_ID').ljust(40)[:40], 'utf-8'), |                         'PACKAGE_ID': bytes(config.get(section, 'PACKAGE_ID').ljust(40)[:40], 'utf-8'), | ||||||
|                         'GROUP_HANGTIME': config.getint(section, 'GROUP_HANGTIME'), |                         'GROUP_HANGTIME': config.getint(section, 'GROUP_HANGTIME'), | ||||||
|                         'OPTIONS': bytes(config.get(section, 'OPTIONS'), 'utf-8'), |                         'OPTIONS': b''.join([b'Type=HBlink;', bytes(config.get(section, 'OPTIONS'), 'utf-8')]), | ||||||
|                         'USE_ACL': config.getboolean(section, 'USE_ACL'), |                         'USE_ACL': config.getboolean(section, 'USE_ACL'), | ||||||
|                         'SUB_ACL': config.get(section, 'SUB_ACL'), |                         'SUB_ACL': config.get(section, 'SUB_ACL'), | ||||||
|                         'TG1_ACL': config.get(section, 'TGID_TS1_ACL'), |                         'TG1_ACL': config.get(section, 'TGID_TS1_ACL'), | ||||||
|  | |||||||
| @ -519,6 +519,14 @@ class HBSYSTEM(DatagramProtocol): | |||||||
|                     self.transport.write(b''.join([MSTNAK, _peer_id]), _sockaddr) |                     self.transport.write(b''.join([MSTNAK, _peer_id]), _sockaddr) | ||||||
|                     logger.warning('(%s) Ping from Radio ID that is not logged in: %s', self._system, int_id(_peer_id)) |                     logger.warning('(%s) Ping from Radio ID that is not logged in: %s', self._system, int_id(_peer_id)) | ||||||
| 
 | 
 | ||||||
|  |         elif _command == RPTO: | ||||||
|  |             _peer_id = _data[4:8] | ||||||
|  |             if _peer_id in self._peers \ | ||||||
|  |                         and self._peers[_peer_id]['CONNECTION'] == 'YES' \ | ||||||
|  |                         and self._peers[_peer_id]['SOCKADDR'] == _sockaddr: | ||||||
|  |                 logger.info('(%s) Peer %s (%s) has send options: %s', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id), _data[8:]) | ||||||
|  |                 self.transport.write(b''.join([RPTACK, _peer_id]), _sockaddr) | ||||||
|  | 
 | ||||||
|         else: |         else: | ||||||
|             logger.error('(%s) Unrecognized command. Raw HBP PDU: %s', self._system, ahex(_data)) |             logger.error('(%s) Unrecognized command. Raw HBP PDU: %s', self._system, ahex(_data)) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user