mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
* net_udp.c: Changed myAddr type to in_addr_t.
* net_wins.c: Changed myAddr type to u_long. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@199 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
77ac562f2d
commit
6b798a2ffa
3 changed files with 16 additions and 14 deletions
|
@ -39,12 +39,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
static int net_acceptsocket = -1; // socket for fielding new connections
|
||||
static int net_controlsocket;
|
||||
static int net_broadcastsocket = 0;
|
||||
static struct qsockaddr broadcastaddr;
|
||||
static int net_acceptsocket = -1; // socket for fielding new connections
|
||||
static int net_controlsocket;
|
||||
static int net_broadcastsocket = 0;
|
||||
static struct qsockaddr broadcastaddr;
|
||||
|
||||
static unsigned long myAddr;
|
||||
static in_addr_t myAddr;
|
||||
|
||||
#include "net_udp.h"
|
||||
|
||||
|
@ -74,7 +74,7 @@ int UDP_Init (void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
myAddr = *(int *)local->h_addr_list[0];
|
||||
myAddr = *(in_addr_t *)local->h_addr_list[0];
|
||||
|
||||
// if the quake hostname isn't set, set it to the machine name
|
||||
if (Q_strcmp(hostname.string, "UNNAMED") == 0)
|
||||
|
|
|
@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
|
@ -119,3 +120,4 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
|||
};
|
||||
|
||||
int net_numlandrivers = 2;
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
||||
static int net_acceptsocket = -1; // socket for fielding new connections
|
||||
static int net_controlsocket;
|
||||
static int net_broadcastsocket = 0;
|
||||
static struct qsockaddr broadcastaddr;
|
||||
static int net_acceptsocket = -1; // socket for fielding new connections
|
||||
static int net_controlsocket;
|
||||
static int net_broadcastsocket = 0;
|
||||
static struct qsockaddr broadcastaddr;
|
||||
|
||||
static unsigned long myAddr;
|
||||
static u_long myAddr;
|
||||
|
||||
#include "net_wins.h"
|
||||
|
||||
|
@ -70,8 +70,8 @@ static INT_PTR PASCAL FAR BlockingHook (void)
|
|||
static void WINS_GetLocalAddress (void)
|
||||
{
|
||||
struct hostent *local = NULL;
|
||||
char buff[MAXHOSTNAMELEN];
|
||||
unsigned long addr;
|
||||
char buff[MAXHOSTNAMELEN];
|
||||
u_long addr;
|
||||
|
||||
if (myAddr != INADDR_ANY)
|
||||
return;
|
||||
|
@ -86,7 +86,7 @@ static void WINS_GetLocalAddress (void)
|
|||
if (local == NULL)
|
||||
return;
|
||||
|
||||
myAddr = *(int *)local->h_addr_list[0];
|
||||
myAddr = *(u_long *)local->h_addr_list[0];
|
||||
|
||||
addr = ntohl(myAddr);
|
||||
sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
|
||||
|
|
Loading…
Reference in a new issue