fixed changing ping domain

This commit is contained in:
Erik Ekman 2006-06-06 17:17:05 +00:00
parent 3440a3f378
commit cbfab201b8
1 changed files with 3 additions and 2 deletions

5
dns.c
View File

@ -183,14 +183,15 @@ dns_handle_tun(int fd, char *data, int len)
void
dns_ping(int dns_fd)
{
char data[3];
char data[2];
if (dns_sending()) {
// printf("No reply on chunk, discarding\n");
lastlen = 0;
packetpos = 0;
packetlen = 0;
}
snprintf(data, 3, "%02X", pingid);
data[0] = (pingid & 0xFF00) >> 8;
data[1] = (pingid & 0xFF);
dns_write(dns_fd, ++pingid, data, 2, 1);
}