QueryParser: Don't send notifications if the node's been deleted.
Gets rid of redundant messages under B_QUERY_WATCH_ALL.
This commit is contained in:
@@ -283,6 +283,11 @@ struct Query::QueryPolicy {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool NodeIsDeleted(Node* node)
|
||||
{
|
||||
return node->IsDeleted();
|
||||
}
|
||||
|
||||
// Volume interface
|
||||
|
||||
static dev_t ContextGetVolumeID(Context* context)
|
||||
|
||||
@@ -220,6 +220,11 @@ struct Query::QueryPolicy {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool NodeIsDeleted(Node* node)
|
||||
{
|
||||
return node->GetParentUnchecked() == NULL;
|
||||
}
|
||||
|
||||
// Volume interface
|
||||
|
||||
static dev_t ContextGetVolumeID(Context* context)
|
||||
|
||||
@@ -276,6 +276,11 @@ struct Query::QueryPolicy {
|
||||
return node->GetNextReferrer(entry);
|
||||
}
|
||||
|
||||
static bool NodeIsDeleted(Node* node)
|
||||
{
|
||||
return node->GetFirstReferrer() == NULL;
|
||||
}
|
||||
|
||||
// Volume interface
|
||||
|
||||
static dev_t ContextGetVolumeID(Context* context)
|
||||
|
||||
Reference in New Issue
Block a user