Changeset 120eedd in code
- Timestamp:
- Jun 17, 2014, 11:46:35 AM (11 years ago)
- Branches:
- master
- Children:
- e68221b
- Parents:
- 9440414
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
dns.c
r9440414 r120eedd 56 56 icbd_log(is, LOG_WARNING, "dns resolution failed: %s", 57 57 gai_strerror(ar->ar_gai_errno)); 58 59 if (ISSETF(is->flags, ICB_SF_PENDINGDROP)) { 60 free(is); 61 return; 62 } 63 64 CLRF(is->flags, ICB_SF_DNSINPROGRESS); 58 65 } 59 66 … … 65 72 struct addrinfo hints; 66 73 74 if (ISSETF(is->flags, ICB_SF_PENDINGDROP)) { 75 free(is); 76 return; 77 } 78 67 79 if (ar->ar_gai_errno == 0) { 68 80 icbd_log(is, LOG_DEBUG, "reverse dns resolved %s to %s", … … 73 85 as = getaddrinfo_async(is->hostname, NULL, &hints, NULL); 74 86 event_asr_run(as, dns_done_host, is); 75 } else 87 } else { 76 88 icbd_log(is, LOG_WARNING, "reverse dns resolution failed: %s", 77 89 gai_strerror(ar->ar_gai_errno)); 90 CLRF(is->flags, ICB_SF_DNSINPROGRESS); 91 } 78 92 } 79 93 … … 86 100 return; 87 101 102 SETF(is->flags, ICB_SF_DNSINPROGRESS); 103 88 104 if (verbose) 89 105 icbd_log(is, LOG_DEBUG, "resolving: %s", is->host); -
icb.h
r9440414 r120eedd 90 90 #define CLRF(t, f) ((t) &= ~(f)) 91 91 #define ISSETF(t, f) ((t) & (f)) 92 #define ICB_SF_PROTOSENT 0x01 93 #define ICB_SF_LOGGEDIN 0x02 94 #define ICB_SF_NOGROUP 0x08 95 #define ICB_SF_NOBEEP 0x10 96 #define ICB_SF_NOBEEP2 0x20 92 #define ICB_SF_PROTOSENT 0x0001 93 #define ICB_SF_LOGGEDIN 0x0002 94 #define ICB_SF_NOGROUP 0x0008 95 #define ICB_SF_NOBEEP 0x0010 96 #define ICB_SF_NOBEEP2 0x0020 97 98 #define ICB_SF_DNSINPROGRESS 0x1000 99 #define ICB_SF_PENDINGDROP 0x2000 97 100 98 101 /* in-group linkage */ -
icbd.c
r9440414 r120eedd 420 420 (void)close(EVBUFFER_FD(is->bev)); 421 421 bufferevent_free(is->bev); 422 free(is); 422 if (!ISSETF(is->flags, ICB_SF_DNSINPROGRESS)) 423 free(is); 424 else 425 SETF(is->flags, ICB_SF_PENDINGDROP); 423 426 } 424 427
Note:
See TracChangeset
for help on using the changeset viewer.