PDA

View Full Version : zone crash port jump


opyrus
07-05-2008, 08:47 PM
I been looking at the problem with zone crash port jumping and i think i figured out a way to make it stop. if it where to load each port for each zone from the config file there wouldent be any issue anymore. we could assign each port from the config file wouldent be so bad theres only about 400 zones total and most of us dont even use that many. with this change we would be just a hop skip and a jump away from running zones on multi servers.

trevius
07-06-2008, 03:26 AM
Even better would be to make the port setting in the Launcher_Zones tables to actually work. You are supposed to be able to set a port there for the static zones to use, but it doesn't actually use them.

If you can figure out any way to make port assignment actually work, I think that would resolve the issues with running multiple zone servers on the same LAN. And, if you can get it working, I would gladly write a wiki on how to setup multiple zone servers. Everything is already in place with the exception of how ports are assigned by eqlauncher. From what I have heard, it would take quite a rewrite of the launcher for the zone assignment to actually work in a meaningful way instead of it just using the next available port.

opyrus
07-07-2008, 06:55 PM
if we where to replace the following code.
uint16 ZSList::GetAvailableZonePort()
{
const WorldConfig *Config=WorldConfig::get();
int i;
uint16 port=0;

if (LastAllocatedPort==0)
i=Config->ZonePortLow;
else
i=LastAllocatedPort+1;

while(i!=LastAllocatedPort && port==0) {
if (i>Config->ZonePortHigh)
i=Config->ZonePortLow;

if (!FindByPort(i)) {
port=i;
break;
}
i++;
}
LastAllocatedPort=port;

return port;
}
with something like.
uint16 ZSList::GetAvailableZonePort()
{
const WorldConfig *Config=WorldConfig::get();
int i;
uint16 port=0;

if (LastAllocatedPort==0)
i=Zone7000;
else if (LastAllocatedPort==7000)
i=Zone7001;
else if (LastAllocatedPort==7001)
i=Zone7002;
else if (LastAllocatedPort==7002)
i=Zone7003;
else if (LastAllocatedPort==7003)
i=7004;
else if (LastAllocatedPort==7004)
i=7005;

// this would just keep going till theres 400 zones

while(i!=LastAllocatedPort && port==0) {
if (i>Config->ZonePortHigh)
i=Config->ZonePortLow;

if (!FindByPort(i)) {
port=i;
break;
}
i++;
}
LastAllocatedPort=port;

return port;
}

trevius
07-07-2008, 08:25 PM
Ultimately, it would be nice if it could pull the port information from the config file in this section:

<zones>
<defaultstatus>20</defaultstatus>

<!-- Sets port range for world to use to auto configure zones -->
<ports low="7000" high="7100"/>
</zones>

And, IMO, it would be even better if the config file was changed to allow multiple zone servers. So, the config file could define port ranges for each zone server to use. And, you should only need to add a new field to this part of the config to allow servers to define the zone server name:

<zones>
<defaultstatus>20</defaultstatus>

<!-- Sets port range for world to use to auto configure zones -->
<ports low="7000" high="7100" name="zoneservera"/>
<ports low="7101" high="7200" name="zoneserverb"/>
<ports low="7201" high="7300" name="zoneserverc"/>
<ports low="7301" high="7400" name="zoneserverd"/>
</zones>

The launcher would then need to look at each of the defined port ranges and zone servers and then launch zones based on this config. They could all be set to run dynamic zones, or if the port numbers defined in the Launcher_Zones table was actually working, you could set each zone server to run it's own static zones.

Then, the Launcher and Launcher_Zones tables should just need to have these zone servers added to them.

opyrus
07-07-2008, 09:55 PM
have to stop the port jumping with out it doing multi zone servers would be imposible.

trevius
07-07-2008, 10:00 PM
As long as they are jumping within the specified range of ports for each zone server, it would be fine. Though, it would be nice to have the port assignment a little more organized.

The way you are mentioning would probably work, but it I think it would still need to pull the port ranges from the config file instead of forcing it to load starting at 7000 and up.