diff options
author | Simon Howard | 2006-01-02 20:11:49 +0000 |
---|---|---|
committer | Simon Howard | 2006-01-02 20:11:49 +0000 |
commit | 693828adb286b6c1ec6d0b90f49c6947e6c6dd6e (patch) | |
tree | 94e053f9c0f4c33f4bdff304791f7987fa612670 | |
parent | febe55b72786c0fe95c27682fefb87e4f51d4db0 (diff) | |
download | chocolate-doom-693828adb286b6c1ec6d0b90f49c6947e6c6dd6e.tar.gz chocolate-doom-693828adb286b6c1ec6d0b90f49c6947e6c6dd6e.tar.bz2 chocolate-doom-693828adb286b6c1ec6d0b90f49c6947e6c6dd6e.zip |
Rename i_net_module -> net_sdl_module. Fix the AddrToString method.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 244
-rw-r--r-- | src/net_sdl.c | 16 | ||||
-rw-r--r-- | src/net_sdl.h | 7 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/net_sdl.c b/src/net_sdl.c index c202673f..98730dd8 100644 --- 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 @@ static net_addr_t *NET_SDL_FindAddress(IPaddress *addr) 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 @@ void NET_SDL_AddrToString(net_addr_t *addr, char *buffer, int buffer_len) 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 @@ net_addr_t *NET_SDL_ResolveAddress(char *address) // Complete module -net_module_t i_net_module = +net_module_t net_sdl_module = { NET_SDL_InitClient, NET_SDL_InitServer, diff --git a/src/net_sdl.h b/src/net_sdl.h index edc3c000..43430962 100644 --- 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 */ |