Make store watch work on the root collection somewhat.

This commit is contained in:
alexhudson
2008-09-14 14:40:47 +00:00
parent 6cb1793be7
commit 3d4dc3e9db
+11 -11
View File
@@ -31,17 +31,17 @@ StoreWatcherFindWatchItem(StoreClient *client, uint64_t collection)
WatchItem *to_watch = NULL;
for (i = 0; i < MAX_STORE_WATCH; i++) {
WatchItem *item = &global_watch_list[i];
if ((item->collection == collection) &&(strcmp(item->store, client->storeName)==0)) {
// found the watch item for this collection in the right store
to_watch = item;
}
if ((to_watch == NULL) && (item->store == NULL)) {
// found the first free entry (overridden by above)
to_watch = item;
}
}
return to_watch;
WatchItem *item = &global_watch_list[i];
if ((item->collection == collection) && (item->store != NULL) && (strcmp(item->store, client->storeName)==0)) {
// found the watch item for this collection in the right store
to_watch = item;
}
if ((to_watch == NULL) && (item->store == NULL)) {
// found the first free entry (overridden by above)
to_watch = item;
}
}
return to_watch;
}
/** \internal