mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
cleanup
This commit is contained in:
parent
fc0c5aa46b
commit
df8c508f77
4
dns.c
4
dns.c
@ -131,7 +131,6 @@ dns_send_chunk(int fd)
|
|||||||
p += packetpos;
|
p += packetpos;
|
||||||
avail = packetlen - packetpos;
|
avail = packetlen - packetpos;
|
||||||
lastlen = dns_write(fd, ++chunkid, p, avail, 0);
|
lastlen = dns_write(fd, ++chunkid, p, avail, 0);
|
||||||
//printf("Sent %d bytes of %d remaining\n", lastlen, avail);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -150,7 +149,6 @@ dns_ping(int dns_fd)
|
|||||||
{
|
{
|
||||||
char data[2];
|
char data[2];
|
||||||
if (dns_sending()) {
|
if (dns_sending()) {
|
||||||
// printf("No reply on chunk, discarding\n");
|
|
||||||
lastlen = 0;
|
lastlen = 0;
|
||||||
packetpos = 0;
|
packetpos = 0;
|
||||||
packetlen = 0;
|
packetlen = 0;
|
||||||
@ -328,7 +326,6 @@ dns_read(int fd, char *buf, int buflen)
|
|||||||
packetpos += lastlen;
|
packetpos += lastlen;
|
||||||
if (packetpos == packetlen) {
|
if (packetpos == packetlen) {
|
||||||
// Packet completed
|
// Packet completed
|
||||||
// printf("IP packet size %d sent successfully!\n", packetlen);
|
|
||||||
packetpos = 0;
|
packetpos = 0;
|
||||||
packetlen = 0;
|
packetlen = 0;
|
||||||
lastlen = 0;
|
lastlen = 0;
|
||||||
@ -497,7 +494,6 @@ dnsd_read(int fd, struct query *q, char *buf, int buflen)
|
|||||||
READSHORT(type, data);
|
READSHORT(type, data);
|
||||||
READSHORT(class, data);
|
READSHORT(class, data);
|
||||||
|
|
||||||
// Store needed info about delayed response
|
|
||||||
strncpy(q->name, name, 256);
|
strncpy(q->name, name, 256);
|
||||||
q->type = type;
|
q->type = type;
|
||||||
q->id = id;
|
q->id = id;
|
||||||
|
Loading…
Reference in New Issue
Block a user