Browse Source

Limit the scope of callback suppression.

Per testing on Minkata, suppressing callbacks during all vault downloads
has a deleterious effect on imagers. While my high level assumption is
correct, vault downloads can encompass situations where we want
notifications (eg re-downloading imager inbox folders, new age info
vault fragments). Whoops!
tickets/15/15/1
Adam Johnson 3 years ago
parent
commit
d007fac536
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp
  2. 4
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp
  3. 50
      Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp
  4. 8
      Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h

2
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp

@ -385,7 +385,7 @@ bool plNCAgeJoiner::MsgReceive (plMessage * msg) {
}
else if (unsigned ageVaultId = NetCommGetAge()->ageVaultId) {
// Download the age vault
VaultDownload(
VaultDownloadNoCallbacks(
L"AgeJoin",
ageVaultId,
AgeVaultDownloadCallback,

4
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -318,7 +318,7 @@ static void INetCliAuthSetPlayerRequestCallback (
else {
s_needAvatarLoad = true;
VaultDownload(
VaultDownloadNoCallbacks(
L"SetActivePlayer",
s_player->playerInt,
PlayerInitCallback,
@ -374,7 +374,7 @@ static void INetCliAuthLoginSetPlayerRequestCallback (
msg->Send();
}
else {
VaultDownload(
VaultDownloadNoCallbacks(
L"SetActivePlayer",
s_player->playerInt,
LoginPlayerInitCallback,

50
Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp

@ -185,7 +185,6 @@ struct VaultDownloadTrans {
: callback(), cbParam(), progressCallback(), cbProgressParam(),
nodeCount(), nodesLeft(), vaultId(), result(kNetSuccess)
{
VaultSuppressCallbacks();
}
VaultDownloadTrans(const wchar_t* _tag, FVaultDownloadCallback _callback,
@ -195,14 +194,10 @@ struct VaultDownloadTrans {
cbProgressParam(_cbProgressParam), nodeCount(), nodesLeft(),
vaultId(_vaultId), result(kNetSuccess)
{
StrCopy(tag, _tag, MAX_PATH);
VaultSuppressCallbacks();
StrCopy(tag, _tag, arrsize(tag));
}
~VaultDownloadTrans()
{
VaultEnableCallbacks();
}
virtual ~VaultDownloadTrans() { }
static void VaultNodeFetched (
ENetError result,
@ -217,6 +212,28 @@ struct VaultDownloadTrans {
);
};
struct VaultDownloadNoCallbacksTrans : VaultDownloadTrans {
VaultDownloadNoCallbacksTrans()
: VaultDownloadTrans()
{
VaultSuppressCallbacks();
}
VaultDownloadNoCallbacksTrans(const wchar_t* _tag, FVaultDownloadCallback _callback,
void* _cbParam, FVaultProgressCallback _progressCallback,
void* _cbProgressParam, unsigned _vaultId)
: VaultDownloadTrans(_tag, _callback, _cbParam, _progressCallback, _cbProgressParam, _vaultId)
{
VaultSuppressCallbacks();
}
~VaultDownloadNoCallbacksTrans()
{
VaultEnableCallbacks();
}
};
struct VaultAgeInitTrans {
FVaultInitAgeCallback callback;
void * cbState;
@ -4995,6 +5012,25 @@ void VaultDownload (
);
}
//============================================================================
void VaultDownloadNoCallbacks (
const wchar tag[],
unsigned vaultId,
FVaultDownloadCallback callback,
void* cbParam,
FVaultProgressCallback progressCallback,
void* cbProgressParam
) {
VaultDownloadNoCallbacksTrans* trans = new VaultDownloadNoCallbacksTrans(tag, callback,
cbParam, progressCallback, cbProgressParam, vaultId);
NetCliAuthVaultFetchNodeRefs(
vaultId,
VaultDownloadTrans::VaultNodeRefsFetched,
trans
);
}
//============================================================================
struct _DownloadVaultParam {
ENetError result;

8
Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h

@ -488,6 +488,14 @@ void VaultDownload (
FVaultProgressCallback progressCallback,
void * cbProgressParam
);
void VaultDownloadNoCallbacks(
const wchar tag[],
unsigned vaultId,
FVaultDownloadCallback callback,
void* cbParam,
FVaultProgressCallback progressCallback,
void* cbProgressParam
);
void VaultDownloadAndWait (
const wchar tag[],
unsigned vaultId,

Loading…
Cancel
Save