Fixed bugster 7007407. Do not clear stat info until a node is really

deleted.
This commit is contained in:
Lin Ma 2011-02-17 14:57:37 +08:00
parent 48dbfb425d
commit 237df47c5f
3 changed files with 5 additions and 8 deletions

View File

@ -35,8 +35,7 @@
#endif
#ifdef GIO_COMPILATION
#define FH_W if (fh_debug_enabled) g_debug
static gboolean fh_debug_enabled = FALSE;
#define FH_W if (FALSE) g_debug
#else
#include "gam_error.h"
#define FH_W(...) GAM_DEBUG(DEBUG_INFO, __VA_ARGS__)

View File

@ -33,8 +33,7 @@
#include "fen-dump.h"
#ifdef GIO_COMPILATION
#define FK_W if (fk_debug_enabled) g_debug
static gboolean fk_debug_enabled = FALSE;
#define FK_W if (FALSE) g_debug
#else
#include "gam_error.h"
#define FK_W(...) GAM_DEBUG(DEBUG_INFO, __VA_ARGS__)

View File

@ -40,8 +40,7 @@
#endif
#ifdef GIO_COMPILATION
#define FN_W if (fn_debug_enabled) g_debug
static gboolean fn_debug_enabled = FALSE;
#define FN_W if (FALSE) g_debug
#else
#include "gam_error.h"
#define FN_W(...) GAM_DEBUG(DEBUG_INFO, __VA_ARGS__)
@ -145,7 +144,6 @@ node_find(node_t* node, const gchar* filename, gboolean create_on_missing)
for (token = strtok_r (str, G_DIR_SEPARATOR_S, &lasts);
token != NULL && child != NULL;
token = strtok_r (NULL, G_DIR_SEPARATOR_S, &lasts)) {
FN_W ("%s %s + %s\n", __func__, NODE_NAME(parent), token);
child = node_get_child(parent, token);
if (child) {
parent = child;
@ -282,7 +280,6 @@ node_try_delete(node_t* node)
if (!NODE_NEED_MONITOR(node)) {
/* Clean some flags. */
/* NODE_CLE_FLAG(node, NODE_FLAG_HAS_SNAPSHOT | NODE_FLAG_STAT_DONE); */
node->flag = 0;
/* Now we handle the state. */
if (NODE_HAS_STATE(node, NODE_STATE_ASSOCIATED)) {
@ -329,6 +326,8 @@ static void
node_delete (node_t *f)
{
FN_W ("%s 0x%p %s\n", __func__, f, NODE_NAME(f));
/* Clean flags. */
f->flag = 0;
g_assert(f->state == 0);
g_assert(!NODE_IS_ACTIVE(f));
g_assert(g_hash_table_size (f->children) == 0);