A friend and I decided to play some Unreal via LAN the other day, but we came across an unusual problem. As the title states, we were trying to run a server on Vista. The game itself runs fine, it's just that when we created a server, we weren't able to see it from any other client on the LAN. I'm quite familiar with port forwading (not needed on LAN) and opening ports on firewalls. All of that checked out, but we still weren't able to see the server on the LAN. I did some investigating and found this in the log file:
Code: Select all
Log: UdpServerQuery DmAriza.UdpServerQuery0 (Function IpServer.UdpServerQuery.PreBeginPlay:002E) BindPort: bind failed
UdpServerQuery: Port failed to bind.I loaded up other games based on UE1 tech (UT99, Rune, and WoT), and the same bug occured with all of them. I also loaded UT2004, but it worked without problems. I did some more digging to find out why UT2004 worked, but the others didn't.
The function responsible for requesting the query port looks like this in Unreal:
Code: Select all
class UdpServerQuery extends UdpLink config;
...
...
// Initialize.
function PreBeginPlay()
{
// Set the Tag
Tag = QueryName;
// Bind the listen socket
if( !BindPort(Level.Game.GetServerPort(), true) )
{
Log("UdpServerQuery: Port failed to bind.");
return;
}
}In UT2004, the function looks like this:
Code: Select all
class UdpGameSpyQuery extends UdpLink config;
...
...
function PreBeginPlay()
{
local int boundport, requestport;
// Set the Tag
Tag = QueryName;
// Bind the listen socket
requestport = Level.Game.GetServerPort()+10;
boundport = BindPort(requestport, true);
if( boundport == 0 )
{
Log("UdpServerQuery: Port failed to bind.");
return;
}
Log("UdpServerQuery(crt): Port "$boundport$" successfully bound.");
...
...
}Notice how 10 is added to Level.Game.GetServerPort() before it's passed to the BindPort() call. I did a little experiment and created a modified version of UdpServerQuery that added 1 to Level.Game.GetServerPort() in the BindPort() call. I ran the server, and lo and behold it worked!! That told me that BindPort() wasn't incrementing like it should.
The gist of my whole speil is to find out if anyone else has had this problem running a server on Vista and if a solution was found. I appreciate any help that is given.
-Later!



