Test code for tracing zone crashes (stage 2)

This commit is contained in:
Uleat 2018-03-19 20:58:13 -04:00
parent d58e88a2f7
commit 70922975cf
2 changed files with 21 additions and 6 deletions

View File

@ -7578,7 +7578,27 @@ void Client::JoinGroupXTargets(Group *g)
if (!g) if (!g)
return; return;
// test code for merge crashes - hopefully gcc won't optimize these out...
auto c1 = GetXTargetAutoMgr()->get_list().empty();
auto c2 = GetXTargetAutoMgr()->get_list().size();
auto c3 = GetXTargetAutoMgr()->get_list().begin();
auto c4 = GetXTargetAutoMgr()->get_list().end();
auto c5 = GetXTargetAutoMgr()->get_list().rbegin();
auto c6 = GetXTargetAutoMgr()->get_list().rend();
auto g1 = g->GetXTargetAutoMgr()->get_list().empty();
auto g2 = g->GetXTargetAutoMgr()->get_list().size();
auto g3 = g->GetXTargetAutoMgr()->get_list().begin();
auto g4 = g->GetXTargetAutoMgr()->get_list().end();
auto g5 = g->GetXTargetAutoMgr()->get_list().rbegin();
auto g6 = g->GetXTargetAutoMgr()->get_list().rend();
if (!GetXTargetAutoMgr()->empty()) { if (!GetXTargetAutoMgr()->empty()) {
Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X",
(c1?"true":"false"), c2, c3, c4, c5, c6);
Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X",
(g1?"true":"false"), g2, g3, g4, g5, g6);
g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr()); g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr());
GetXTargetAutoMgr()->clear(); GetXTargetAutoMgr()->clear();
RemoveAutoXTargets(); RemoveAutoXTargets();

View File

@ -6728,12 +6728,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app)
// Inviter and Invitee are in the same zone // Inviter and Invitee are in the same zone
if (inviter != nullptr && inviter->IsClient()) if (inviter != nullptr && inviter->IsClient())
{ {
if (!inviter->CastToClient()->Connected()) if (GroupFollow(inviter->CastToClient()))
{
Log(Logs::General, Logs::Error, "%s attempted to join group while leader %s was zoning.", GetName(), inviter->GetName());
Message(13, "Bubba said you can't follow him.");
}
else if (GroupFollow(inviter->CastToClient()))
{ {
strn0cpy(gf->name1, inviter->GetName(), sizeof(gf->name1)); strn0cpy(gf->name1, inviter->GetName(), sizeof(gf->name1));
strn0cpy(gf->name2, GetName(), sizeof(gf->name2)); strn0cpy(gf->name2, GetName(), sizeof(gf->name2));