2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-13 18:17:49 -04:00

Async creation of child ages

This commit is contained in:
2011-04-23 22:19:35 -04:00
parent 28e8e0c544
commit a921f766d1
3 changed files with 161 additions and 7 deletions

View File

@ -480,6 +480,7 @@ bool plNetLinkingMgr::IProcessVaultNotifyMsg(plVaultNotifyMsg* msg)
RelVaultNode* cVaultLink = nil;
switch (msg->GetType())
{
case plVaultNotifyMsg::kRegisteredChildAgeLink:
case plVaultNotifyMsg::kRegisteredOwnedAge:
case plVaultNotifyMsg::kRegisteredSubAgeLink:
cVaultLink = VaultGetNodeIncRef(msg->GetArgs()->GetInt(plNetCommon::VaultTaskArgs::kAgeLinkNode));
@ -1047,17 +1048,25 @@ UInt8 plNetLinkingMgr::IPreProcessLink(void)
{
plAgeLinkStruct childLink;
wchar parentAgeName[MAX_PATH];
if (link->HasParentAgeFilename()) {
if (link->HasParentAgeFilename())
StrToUnicode(parentAgeName, link->GetParentAgeFilename(), arrsize(parentAgeName));
if(!VaultAgeFindOrCreateChildAgeLinkAndWait(parentAgeName, info, &childLink))
success = kLinkFailed;
}
else {
if(!VaultAgeFindOrCreateChildAgeLinkAndWait(nil, info, &childLink))
switch(VaultAgeFindOrCreateChildAgeLink(
(link->HasParentAgeFilename() ? parentAgeName : nil),
info,
&childLink))
{
case hsFail:
success = kLinkFailed;
break;
case FALSE:
success = kLinkDeferred;
break;
case TRUE:
success = kLinkImmediately;
}
if (success != kLinkFailed)
if (success == kLinkImmediately)
info->CopyFrom(childLink.GetAgeInfo());
}
break;