Maucaub Newbie
Joined: Apr 15 2004 Posts: 12 Offline
|
Posted: Mon Aug 30, 2004 9:07 pm Post subject: PATCH: TCP Billing on Windows |
|
|
|
|
As I logged in to post the other patches, I noticed 2dragons' post (http://forums.minegoboom.com/viewtopic.php?t=3418) about the TCP billing module not working properly. Disclaimer: I have not spent alot of time working with the TCP billing protocol/module (yet), so there may be still other bugs present. However, this patch addresses the issue of the zone being unable to establish a connection on Windows. There may yet be a better solution, but at least for now this patch will do the job.
@Grelminar: Windows sockets DO NOT use errno to report errors. The socket functions report SOCKET_ERROR, but the specific error must be retrieved using WSAGetLastError(). Since the sockets are set to be non-blocking, connect() returns SOCKET_ERROR and sets WSAEWOULDBLOCK. This is the windows equivalent of the EINPROGRESS check for *nix that you've already included.
I've attached both the diff patch (diff -u) and the complete file, for those who don't have patch-ability on Windows. The patch is derived from the 1.2.0 source distribution.
billing_patch.zip - 8.12 KB
File downloaded or viewed 51 time(s)
|
|