Ignacio R. Morelle
6ca69b2df5
New year copyright update
2012-01-07 02:35:17 +00:00
Alexander van Gessel
a2e3b19256
Revert 2011-11-21T04:32:39Z!ai0867@gmail.com.
...
This restores the race between error messages and disconnections.
2011-11-21 22:28:47 +01:00
Alexander van Gessel
fcb260ad95
Flush buffers when closing a funtioning socket.
...
This fixes a race between error messages and disconnections.
2011-11-21 05:32:39 +01:00
Mark de Wever
bb51354198
Remove an old-style-cast.
2011-10-21 18:59:25 +00:00
Sergey Popov
732f4eb43a
Fixed a gcc warning about strict aliasing rules breakage...
...
...introduced by 2011-09-10T16:13:22Z!koraq@xs4all.nl
2011-09-10 22:17:32 +00:00
Mark de Wever
ed85e86e77
Fixed compilation on all Debian architectures.
...
The #undef was introduced in 2010-10-31T09:00:17Z!guillaume.melquiond@gmail.com, but the commit offers no reason
_why_ the macro was undefined. This patch has been tested by Rhonda on
all Debian architectures and there it caused no build problem, whereas
the 2010-10-31T09:00:17Z!guillaume.melquiond@gmail.com caused several architectures failing to build.
The reason the issue was spotted much later is that before Debian
compiled with the ANA network. It switched to the older network code
while changing the build system from autotools to cmake, so the latter
was thought to be the cause.
Fixes Debian bug #636193 and reverts 2010-10-31T09:00:17Z!guillaume.melquiond@gmail.com.
2011-09-10 16:13:22 +00:00
Mark de Wever
98e3c08f53
Fixes compilation on kfreebsd.
...
Fixes debian bug #626313 . Thanks to Rhonda for testing the patch.
2011-06-16 17:58:03 +00:00
Anonymissimus
202890d24c
fixed a gcc warning about () suggested around && in ||
2011-06-03 21:34:47 +00:00
Mark de Wever
ecbabea838
New year copyright update.
2011-01-01 15:57:50 +00:00
Alexander van Gessel
91428469b4
Remove a binary WML check
2010-11-19 12:55:53 +01:00
Alexander van Gessel
31d5fe3c3b
Remove usage of binary_wml
2010-11-18 22:20:56 +01:00
Alexander van Gessel
9a508b5730
Remove the 'gzipped' parameters from the network API.
...
ANA did not even implement binary WML.
2010-11-17 00:28:08 +01:00
Guillaume Melquiond
46dba2216f
Avoided SDL macro.
2010-10-31 09:00:17 +00:00
Guillaume Melquiond
eeb047de55
Fixed file headers so that they match the content of the COPYING file.
2010-09-01 21:12:38 +00:00
Ali El Gariani
c7c222380d
Clean the use of @todo for Doxygen
...
Use ///@todo bla or /** @todo bla */
with lowercase and no colon after todo
2010-07-26 00:31:55 +00:00
Mark de Wever
92f5f92ce5
New year copyright update.
2010-01-01 13:16:49 +00:00
Mark de Wever
29ae8bf5de
Remove an unneeded include.
2009-11-27 23:00:41 +00:00
Gunter Labes
238954f0c2
removed the NOATIME flag that is probably not useful...
...
...and not available on some (older) systems
fixes bug #14446 : Cannot compile on Linux 2.4
2009-10-06 19:06:02 +00:00
Mark de Wever
9680e5e43d
Fix gcc 4.4 compilation errors.
...
Fixes Debian bug #539546 , after fixing the reported issue fixed more
problems discovered by gcc 4.4.
2009-08-11 18:52:49 +00:00
Tomasz Śniatowski
eb3f0cd9e2
fix windows wesnothd infinite loop issue
2009-06-28 01:10:44 +01:00
Tomasz Śniatowski
7c44587eb1
revert the networking changes from 2009-05-18T15:39:34Z!kailoran@gmail.com and 2009-05-18T20:13:20Z!kailoran@gmail.com
2009-06-27 18:31:11 +01:00
Gunter Labes
1651550b41
tweaked an error message
2009-05-19 19:02:05 +00:00
Tomasz Śniatowski
97a8e86add
in receive_with_timeout, assume an error is fatal...
...
...when no platform-specific checks are available
2009-05-18 22:01:02 +01:00
Tomasz Śniatowski
e18cf1b8fe
add win32-specific error check...
...
...to receive_with_timeout instead of ignroing the error
2009-05-18 21:13:54 +01:00
Tomasz Śniatowski
45b7691bec
remove unused code in send_buffer
2009-05-18 21:13:20 +01:00
Tomasz Śniatowski
3fdfcef63a
Fix a networking problem when trying to send data to a disconnected socket
...
According to SDL docs, SDLNet_TCP_Send is blocking and if the returned
nubmer of bytes sent is less than expected, it's an error. Previous code
could trigger an infinite loop with the function returning zero and our
loop trying to send again and again.
2009-05-18 16:39:34 +01:00
Guillaume Melquiond
789736ac91
Removed specialized domains from log.hpp,
...
...so that adding a new domain no longer forces to recompile the whole
game.
2009-04-24 23:18:31 +00:00
Mark de Wever
f6b3368aac
Strip trailing whitespace.
2009-03-15 16:50:42 +00:00
Guillaume Melquiond
77f33d2270
Added proper detection of round and sendfile.
2009-03-10 13:07:19 +00:00
Mark de Wever
4e7035b5ee
Align all network buffers on 4 bytes.
...
Just to make sure we won't get another SIGBUS on the Sparc.
2009-03-01 07:43:22 +00:00
Tomasz Śniatowski
8f6c11821a
fix two more issues contributing to bug #13059 :
...
* made the network code use two separate timeouts, an idle timeout
that is reset each time data is received, and a total wait counter
(that was already there),
* fixed a rather unpleasant milli-/microsecond confusion
2009-02-26 21:49:06 +01:00
Tomasz Śniatowski
42c7a323f2
fix add-on networking issue in windows...
...
...(and possibly other platforms using select) (bug #13059 )
2009-02-25 23:14:16 +01:00
Tomasz Śniatowski
6faf092d0a
don't define NOMINMAX in win32...
...
...if it's already defined earlier because GCC complains
2009-02-24 18:49:55 +01:00
Tomasz Śniatowski
f8ac880767
fix compilation error on win32 (hello stupid min/max macros in windows.h)
2009-02-22 16:29:31 +01:00
Guillaume Melquiond
99a9556fba
Removed now unused parameter.
2009-02-22 12:19:57 +00:00
Gunter Labes
5f31d9a62f
fix a warning and a debug message
2009-02-22 04:25:25 +00:00
David White
bc0273c41a
attempt to fix crash bug when cancelling a download
2009-02-22 01:27:50 +00:00
Jérémy Rosen
861556bb4b
make the reading-loop in network_worker check to see if the socket...
...
...has been interrupted. A very long read could make the disconnect()
time out before the reading was done, forcing a disconnect(force=true)
which cleans-up everything with little consideration to what is
actually going on. Now the reader thread will leave before the
time-out. Forced disconnect might still cause the crash, but there is
little reason for them to happen now. Sirp I would be gratefull for a
proofreading of that commit
2009-01-07 21:52:44 +00:00
David White
435f87d293
allowed one to set no minimum number of network worker threads
2009-01-04 23:04:48 +00:00
Mark de Wever
973a0a7d5c
Remove trailing whitespace.
2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969
New year copyright update.
2009-01-01 10:27:41 +00:00
Sergey Popov
86b6817687
Fixed container usage error revealed by libstdc++ debug mode.
...
"attempt to subscript container with out-of-bounds index 0, but
container only holds 0 elements" when running unit tests.
2008-12-23 12:22:12 +00:00
Sergey Popov
fd6d9dd86d
Fixed incorrect iterator usage revealed by libstdc++ debug mode.
...
Fixed "error: attempt to dereference a singular iterator" error when
running unit tests compiled with -D_GLIBCXX_DEBUG.
2008-12-23 11:48:25 +00:00
Eric S. Raymond
9223460daa
Remove unused headers.
2008-11-09 04:35:13 +00:00
Pauli Nieminen
527a8f0486
Removed bandwidth monitor perprocessor test, It is now included allways
2008-09-03 01:22:52 +00:00
Pauli Nieminen
98d065c731
Removed null terminations from data send to network
2008-08-27 21:58:41 +00:00
Mark de Wever
81c6a850ab
MSVC 6 cleanup.
...
Now that MSVC 6 is no longer supported start to remove some helper code
to work around problems in that compiler. The first step is to comment
out the code and replace it with new helper code that uses the standard.
The second step is to remove the helper code and fix all callers.
Patch 2/3 for step 2: Remove minimum and maximum and fix all callers.
2008-08-24 16:12:13 +00:00
Sergey Popov
1f30c95bef
Use _WIN32 macro instead of WIN32 to check for windows platform.
2008-08-21 07:12:13 +00:00
Mark de Wever
d438f80f12
Added a MSVC 9 projectfile and some fixes for that compiler (patch #1093 ).
2008-08-17 08:07:54 +00:00
Pauli Nieminen
6254675d84
Added network bandwidth usage statistics collection code for server
2008-08-13 13:02:22 +00:00