Browse Source

Tidy up the AddrInfo stuff (not enough though).

Darryl Pogue 14 years ago
parent
commit
e8a0b3f78f
  1. 14
      Sources/Plasma/NucleusLib/pnAddrInfo/pnAddrInfo.cpp
  2. 16
      Sources/Plasma/NucleusLib/pnAddrInfo/pnAddrInfo.h
  3. 2
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp

14
Sources/Plasma/NucleusLib/pnAddrInfo/pnAddrInfo.cpp

@ -29,12 +29,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTypes.h" #include "hsTypes.h"
#include "pnAddrInfo.h" #include "pnAddrInfo.h"
#include <string.h> #include <string.h>
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <unistd.h> # include <unistd.h>
#include <arpa/inet.h> # include <arpa/inet.h>
#include <netinet/in.h> # include <netinet/in.h>
#include <net/if.h> # include <net/if.h>
#include <sys/ioctl.h> # include <sys/ioctl.h>
#endif #endif
const pnAddrInfo* pnAddrInfo::GetInterface() const pnAddrInfo* pnAddrInfo::GetInterface()
@ -138,7 +139,8 @@ void pnAddrInfo::GetLocalAddrs(List& addrslist, bool incLoopBack)
SOCKET s = socket(AF_INET, SOCK_DGRAM, 0); SOCKET s = socket(AF_INET, SOCK_DGRAM, 0);
if (WSAIoctl(s,SIO_GET_INTERFACE_LIST,NULL,NULL,(void*)infos,bufSize,&retSize,NULL,NULL) == 0) if (WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0,
(void*)infos, bufSize, &retSize, NULL, NULL) == 0)
{ {
unsigned int entries = retSize/sizeof(INTERFACE_INFO); unsigned int entries = retSize/sizeof(INTERFACE_INFO);
int i; int i;

16
Sources/Plasma/NucleusLib/pnAddrInfo/pnAddrInfo.h

@ -33,15 +33,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// Unix and XP use native code // Unix and XP use native code
#if HS_BUILD_FOR_UNIX #if HS_BUILD_FOR_UNIX
#include <sys/types.h> # include <sys/types.h>
#include <sys/socket.h> # include <sys/socket.h>
#include <netdb.h> # include <netdb.h>
#elif HS_BUILD_FOR_WIN32 #elif HS_BUILD_FOR_WIN32
#include <winsock2.h> # if (_WIN32_WINNT < 0x0501)
#include <ws2tcpip.h> # define _WIN32_WINNT 0x0501
# endif
# include <winsock2.h>
# include <ws2tcpip.h>
#else #else
#error "pnAddrInfo Not Implemented!" # error "pnAddrInfo Not Implemented!"
#endif #endif
#include "hsTypes.h" #include "hsTypes.h"
#include "hsStlUtils.h" #include "hsStlUtils.h"

2
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp

@ -605,7 +605,7 @@ void CSocket::ProcessQueue () {
// Dispatch it // Dispatch it
switch (command->code) { switch (command->code) {
case command->WRITE: { case Command::WRITE: {
AsyncNotifySocketWrite notify; AsyncNotifySocketWrite notify;
notify.param = command->param; notify.param = command->param;
notify.asyncId = 0; notify.asyncId = 0;

Loading…
Cancel
Save