ref: 693828adb286b6c1ec6d0b90f49c6947e6c6dd6e
parent: febe55b72786c0fe95c27682fefb87e4f51d4db0
author: Simon Howard <fraggle@gmail.com>
date: Mon Jan 2 15:11:49 EST 2006
Rename i_net_module -> net_sdl_module. Fix the AddrToString method. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 244
--- a/src/net_sdl.c
+++ b/src/net_sdl.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_sdl.c 231 2005-12-29 17:47:47Z fraggle $
+// $Id: net_sdl.c 244 2006-01-02 20:11:49Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.3 2006/01/02 20:11:49 fraggle
+// Rename i_net_module -> net_sdl_module. Fix the AddrToString method.
+//
// Revision 1.2 2005/12/29 17:47:47 fraggle
// Automatically initialise the address table
//
@@ -37,7 +40,6 @@
#include <string.h>
#include <stdio.h>
-#include "i_net.h"
#include "i_system.h"
#include "m_argv.h"
#include "net_defs.h"
@@ -141,7 +143,7 @@
new_entry->sdl_addr = *addr;
new_entry->net_addr.handle = &new_entry->sdl_addr;
- new_entry->net_addr.module = &i_net_module;
+ new_entry->net_addr.module = &net_sdl_module;
addr_table[empty_entry] = new_entry;
@@ -258,10 +260,10 @@
snprintf(buffer, buffer_len,
"%i.%i.%i.%i",
- (ip->host >> 24) & 0xff,
- (ip->host >> 16) & 0xff,
+ ip->host & 0xff,
(ip->host >> 8) & 0xff,
- ip->host & 0xff);
+ (ip->host >> 16) & 0xff,
+ (ip->host >> 24) & 0xff);
}
net_addr_t *NET_SDL_ResolveAddress(char *address)
@@ -280,7 +282,7 @@
// Complete module
-net_module_t i_net_module =
+net_module_t net_sdl_module =
{
NET_SDL_InitClient,
NET_SDL_InitServer,
--- a/src/net_sdl.h
+++ b/src/net_sdl.h
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_sdl.h 229 2005-10-30 19:56:15Z fraggle $
+// $Id: net_sdl.h 244 2006-01-02 20:11:49Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.2 2006/01/02 20:11:49 fraggle
+// Rename i_net_module -> net_sdl_module. Fix the AddrToString method.
+//
// Revision 1.1 2005/10/30 19:56:15 fraggle
// Add foundation code for the new networking system
//
@@ -35,7 +38,7 @@
#include "net_defs.h"
-extern net_module_t i_net_module;
+extern net_module_t net_sdl_module;
#endif /* #ifndef NET_SDL_H */