keep-alive packet logging set for debug level

This commit is contained in:
Cort Buffington 2014-01-21 10:49:13 -06:00
parent 620d013e92
commit dbe69bb15e

View File

@ -915,6 +915,7 @@ class IPSC(DatagramProtocol):
peer_alive_reply_packet = self.hashed_packet(self._local['AUTH_KEY'], self.PEER_ALIVE_REPLY_PKT) peer_alive_reply_packet = self.hashed_packet(self._local['AUTH_KEY'], self.PEER_ALIVE_REPLY_PKT)
self.transport.write(peer_alive_reply_packet, (host, port)) self.transport.write(peer_alive_reply_packet, (host, port))
self.reset_keep_alive(_peerid) # Might as well reset our own counter, we know it's out there... self.reset_keep_alive(_peerid) # Might as well reset our own counter, we know it's out there...
logger.debug('(%s) Keep-Alive reply sent to Peer %s', self._network, int(h(_peerid), 16))
return return
elif _packettype == PEER_REG_REQ: elif _packettype == PEER_REG_REQ:
@ -926,6 +927,7 @@ class IPSC(DatagramProtocol):
# Packets we receive... # Packets we receive...
elif _packettype == PEER_ALIVE_REPLY: elif _packettype == PEER_ALIVE_REPLY:
self.reset_keep_alive(_peerid) self.reset_keep_alive(_peerid)
logger.debug('(%s) Keep-Alive Reply (we sent the request) Received from Peer %s', self._network, int(h(_peerid), 16))
return return
elif _packettype == PEER_REG_REPLY: elif _packettype == PEER_REG_REPLY:
@ -945,12 +947,14 @@ class IPSC(DatagramProtocol):
if _packettype == MASTER_ALIVE_REPLY: if _packettype == MASTER_ALIVE_REPLY:
self.reset_keep_alive(_peerid) self.reset_keep_alive(_peerid)
logger.debug('(%s) Keep-Alive Reply (we sent the request) Received from the Master %s', self._network, int(h(_peerid), 16))
return return
elif _packettype == PEER_LIST_REPLY: elif _packettype == PEER_LIST_REPLY:
NETWORK[self._network]['MASTER']['STATUS']['PEER_LIST'] = True NETWORK[self._network]['MASTER']['STATUS']['PEER_LIST'] = True
if len(data) > 18: if len(data) > 18:
process_peer_list(data, self._network) process_peer_list(data, self._network)
logger.debug('(%s) Peer List Reply Recieved From Master %s', self._network, int(h(_peerid), 16))
return return
return return
@ -970,6 +974,7 @@ class IPSC(DatagramProtocol):
self._master['FLAGS_DECODE'] = _decoded_flags self._master['FLAGS_DECODE'] = _decoded_flags
self._master_stat['CONNECTED'] = True self._master_stat['CONNECTED'] = True
self._master_stat['KEEP_ALIVES_OUTSTANDING'] = 0 self._master_stat['KEEP_ALIVES_OUTSTANDING'] = 0
logger.debug('(%s) Registration response (we requested reg) from the Master %s', self._network, int(h(_peerid), 16))
return return
# We know about these types, but absolutely don't take an action # We know about these types, but absolutely don't take an action