Add extra debugging output
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
49bc744846
commit
7871ebe32b
|
@ -837,9 +837,6 @@ static char *parse_FTLconf(FILE *fp, const char *key)
|
|||
// Go to beginning of file
|
||||
fseek(fp, 0L, SEEK_SET);
|
||||
|
||||
if(config.debug & DEBUG_EXTRA)
|
||||
logg("initial: conflinebuffer = %p, keystr = %p, size = %zu", conflinebuffer, keystr, size);
|
||||
|
||||
// Set size to zero if conflinebuffer is not available here
|
||||
// This causes getline() to allocate memory for the buffer itself
|
||||
if(conflinebuffer == NULL && size != 0)
|
||||
|
@ -848,11 +845,6 @@ static char *parse_FTLconf(FILE *fp, const char *key)
|
|||
errno = 0;
|
||||
while(getline(&conflinebuffer, &size, fp) != -1)
|
||||
{
|
||||
if(config.debug & DEBUG_EXTRA)
|
||||
{
|
||||
logg("conflinebuffer = %p, keystr = %p, size = %zu", conflinebuffer, keystr, size);
|
||||
logg(" while reading line \"%s\" looking for \"%s\"", conflinebuffer, keystr);
|
||||
}
|
||||
// Check if memory allocation failed
|
||||
if(conflinebuffer == NULL)
|
||||
break;
|
||||
|
|
|
@ -2089,7 +2089,7 @@ static int tcp_key_recurse(time_t now, int status, struct dns_header *header, si
|
|||
unsigned char *packet = NULL;
|
||||
struct dns_header *new_header = NULL;
|
||||
|
||||
FTL_header_analysis(header->hb4, 0, server, daemon->log_display_id);
|
||||
FTL_header_analysis(header->hb4, RCODE(header), server, daemon->log_display_id);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
|
@ -2614,7 +2614,12 @@ void _FTL_header_analysis(const unsigned char header4, const unsigned int rcode,
|
|||
{
|
||||
memcpy(&last_server, &server->addr, sizeof(last_server));
|
||||
if(config.debug & DEBUG_EXTRA)
|
||||
logg("Got forward address: YES");
|
||||
{
|
||||
char ip[ADDRSTRLEN+1] = { 0 };
|
||||
in_port_t port = 0;
|
||||
mysockaddr_extract_ip_port(&last_server, ip, &port);
|
||||
logg("Got forward address: %s#%u (%s:%i)", ip, port, short_path(file), line);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue