Remove unused Dns::cancel

This commit is contained in:
Ai Lin Chia
2016-07-25 14:23:49 +02:00
parent 970c04ba05
commit 5904307ddf
2 changed files with 4 additions and 10 deletions

8
Dns.h

@ -178,13 +178,7 @@ class Dns {
RdbCache *getCacheLocal () { return &m_rdbCacheLocal; }
// . pull the hostname out of a dns reply packet's query resource rec.
bool extractHostname ( const char *dgram,
const char *record,
char *hostname );
void cancel ( void *state ) { m_udpServer.cancel ( state , -1 ); }
bool extractHostname ( const char *dgram, const char *record, char *hostname );
// returns true if in cache, and sets *ip
bool isInCache (key_t key , int32_t *ip );

@ -2727,9 +2727,9 @@ void UdpServer::cancel ( void *state , unsigned char msgType ) {
// . but if we're waiting for a reply, don't bother
for ( UdpSlot *slot = m_head2 ; slot ; slot = slot->m_next2 ) {
// skip if not a match
if ( slot->m_state != state ) continue;
// -1 (0xff) means all messages from this state
if ( msgType != 0xff && slot->m_msgType != msgType ) continue;
if (slot->m_state != state || slot->m_msgType != msgType) {
continue;
}
// note it
log(LOG_INFO,"udp: cancelled udp socket. msgType=0x%hhx.",
slot->m_msgType);