Fixed issues with difftime and removed unused parts of query struct.

This commit is contained in:
frekky 2015-09-28 13:02:34 +08:00
parent 555a3cbfe2
commit c903203a24
2 changed files with 4 additions and 5 deletions

View File

@ -85,14 +85,12 @@ struct query {
char name[QUERY_NAME_SIZE];
unsigned short type;
unsigned short rcode;
unsigned short id;
int id; /* id < 0: unusued */
struct sockaddr_storage destination;
socklen_t dest_len;
struct sockaddr_storage from;
socklen_t fromlen;
unsigned short id2;
struct sockaddr_storage from2;
socklen_t fromlen2;
struct timeval time_recv;
};
enum connection {
@ -118,6 +116,8 @@ void read_password(char*, size_t);
int check_topdomain(char *, char **);
extern double difftime(time_t, time_t);
#if defined(WINDOWS32) || defined(ANDROID)
#ifndef ANDROID
int inet_aton(const char *cp, struct in_addr *inp);

View File

@ -411,7 +411,6 @@ dns_decode(char *buf, size_t buflen, struct query *q, qr_t qr, char *packet, siz
int id;
int rv;
q->id2 = 0;
rv = 0;
header = (HEADER*)packet;