Use SYS_NET instead of SYS_DEV for networking debug prints.

This commit is contained in:
Bill Currie 2011-07-30 17:44:03 +09:00
parent 28610c08e3
commit 8e140bc97e
4 changed files with 9 additions and 9 deletions

View file

@ -788,7 +788,7 @@ NET_Init (void)
}
if (*my_tcpip_address)
Sys_MaskPrintf (SYS_DEV, "TCP/IP address %s\n", my_tcpip_address);
Sys_MaskPrintf (SYS_NET, "TCP/IP address %s\n", my_tcpip_address);
}
void

View file

@ -309,7 +309,7 @@ Datagram_GetMessage (qsocket_t * sock)
while (1) {
length =
sfunc.Read (sock->socket, (byte *) & packetBuffer, NET_DATAGRAMSIZE,
sfunc.Read (sock->socket, (byte *) &packetBuffer, NET_DATAGRAMSIZE,
&readaddr);
// if ((rand() & 255) > 220)
@ -344,14 +344,14 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_UNRELIABLE) {
if (sequence < sock->unreliableReceiveSequence) {
Sys_MaskPrintf (SYS_DEV, "Got a stale datagram\n");
Sys_MaskPrintf (SYS_NET, "Got a stale datagram\n");
ret = 0;
break;
}
if (sequence != sock->unreliableReceiveSequence) {
count = sequence - sock->unreliableReceiveSequence;
droppedDatagrams += count;
Sys_MaskPrintf (SYS_DEV, "Dropped %u datagram(s)\n", count);
Sys_MaskPrintf (SYS_NET, "Dropped %u datagram(s)\n", count);
}
sock->unreliableReceiveSequence = sequence + 1;
@ -366,15 +366,15 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_ACK) {
if (sequence != (sock->sendSequence - 1)) {
Sys_MaskPrintf (SYS_DEV, "Stale ACK received\n");
Sys_MaskPrintf (SYS_NET, "Stale ACK received\n");
continue;
}
if (sequence == sock->ackSequence) {
sock->ackSequence++;
if (sock->ackSequence != sock->sendSequence)
Sys_MaskPrintf (SYS_DEV, "ack sequencing error\n");
Sys_MaskPrintf (SYS_NET, "ack sequencing error\n");
} else {
Sys_MaskPrintf (SYS_DEV, "Duplicate ACK received\n");
Sys_MaskPrintf (SYS_NET, "Duplicate ACK received\n");
continue;
}
sock->sendMessageLength -= MAX_DATAGRAM;

View file

@ -141,7 +141,7 @@ get_address (int sock)
if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1)
continue;
in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr;
Sys_MaskPrintf (SYS_DEV, "%s: %s\n", ifr[i].ifr_name,
Sys_MaskPrintf (SYS_NET, "%s: %s\n", ifr[i].ifr_name,
inet_ntoa (in_addr->sin_addr));
addr = *(unsigned *)&in_addr->sin_addr;
if (addr != htonl (0x7f000001)) {

View file

@ -202,7 +202,7 @@ WINS_Init (void)
// determine my name
if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) {
Sys_MaskPrintf (SYS_DEV, "Winsock TCP/IP Initialization failed.\n");
Sys_MaskPrintf (SYS_NET, "Winsock TCP/IP Initialization failed.\n");
if (--winsock_initialized == 0)
pWSACleanup ();
return -1;