diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-05-10 18:51:02 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-05-10 18:51:02 +0000 |
commit | 0105de5aeed6816adc5383c14db47a909308be09 (patch) | |
tree | 68b08547fa62f2358310535a7e32d509e348a269 /code/qcommon | |
parent | ea58233e3370adf79d2830003b9c736716622b9b (diff) | |
download | ioquake3-aero-0105de5aeed6816adc5383c14db47a909308be09.tar.gz ioquake3-aero-0105de5aeed6816adc5383c14db47a909308be09.zip |
* Fix a bunch of compile warnings
* Only call pkg-config if it exists
* Remove cl_consoleHistory from README
git-svn-id: svn://svn.icculus.org/quake3/trunk@1342 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/net_ip.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 862f91a..a2960c4 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -483,7 +483,7 @@ qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ) { if(ip_socket != INVALID_SOCKET) { fromlen = sizeof(from); - ret = recvfrom( ip_socket, net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen ); + ret = recvfrom( ip_socket, (void *)net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen ); if (ret == SOCKET_ERROR) { @@ -527,7 +527,7 @@ qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ) { if(ip6_socket != INVALID_SOCKET) { fromlen = sizeof(from); - ret = recvfrom(ip6_socket, net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen); + ret = recvfrom(ip6_socket, (void *)net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen); if (ret == SOCKET_ERROR) { @@ -555,7 +555,7 @@ qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ) { if(multicast6_socket != INVALID_SOCKET && multicast6_socket != ip6_socket) { fromlen = sizeof(from); - ret = recvfrom(multicast6_socket, net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen); + ret = recvfrom(multicast6_socket, (void *)net_message->data, net_message->maxsize, 0, (struct sockaddr *) &from, &fromlen); if (ret == SOCKET_ERROR) { @@ -835,7 +835,6 @@ int NET_IP6Socket( char *net_interface, int port, struct sockaddr_in6 *bindto, i SOCKET newsocket; struct sockaddr_in6 address; qboolean _true = qtrue; - int i = 1; *err = 0; @@ -865,11 +864,15 @@ int NET_IP6Socket( char *net_interface, int port, struct sockaddr_in6 *bindto, i } #ifdef IPV6_V6ONLY - // ipv4 addresses should not be allowed to connect via this socket. - if(setsockopt(newsocket, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &i, sizeof(i)) == SOCKET_ERROR) { - // win32 systems don't seem to support this anyways. - Com_DPrintf("WARNING: NET_IP6Socket: setsockopt IPV6_V6ONLY: %s\n", NET_ErrorString()); + int i; + + // ipv4 addresses should not be allowed to connect via this socket. + if(setsockopt(newsocket, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &i, sizeof(i)) == SOCKET_ERROR) + { + // win32 systems don't seem to support this anyways. + Com_DPrintf("WARNING: NET_IP6Socket: setsockopt IPV6_V6ONLY: %s\n", NET_ErrorString()); + } } #endif @@ -1074,14 +1077,14 @@ void NET_OpenSocks( int port ) { if ( rfc1929 ) { buf[2] = 2; // method #2 - method id #02: username/password } - if ( send( socks_socket, buf, len, 0 ) == SOCKET_ERROR ) { + if ( send( socks_socket, (void *)buf, len, 0 ) == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } // get the response - len = recv( socks_socket, buf, 64, 0 ); + len = recv( socks_socket, (void *)buf, 64, 0 ); if ( len == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); @@ -1121,14 +1124,14 @@ void NET_OpenSocks( int port ) { } // send it - if ( send( socks_socket, buf, 3 + ulen + plen, 0 ) == SOCKET_ERROR ) { + if ( send( socks_socket, (void *)buf, 3 + ulen + plen, 0 ) == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } // get the response - len = recv( socks_socket, buf, 64, 0 ); + len = recv( socks_socket, (void *)buf, 64, 0 ); if ( len == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); @@ -1151,14 +1154,14 @@ void NET_OpenSocks( int port ) { buf[3] = 1; // address type: IPV4 *(int *)&buf[4] = INADDR_ANY; *(short *)&buf[8] = htons( (short)port ); // port - if ( send( socks_socket, buf, 10, 0 ) == SOCKET_ERROR ) { + if ( send( socks_socket, (void *)buf, 10, 0 ) == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } // get the response - len = recv( socks_socket, buf, 64, 0 ); + len = recv( socks_socket, (void *)buf, 64, 0 ); if( len == SOCKET_ERROR ) { err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); |