[glib] Fixed bugster 7007407. Do not clear stat info until a node is really deleted.
- From: Lin Ma <linma src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fixed bugster 7007407. Do not clear stat info until a node is really deleted.
- Date: Thu, 17 Feb 2011 07:06:43 +0000 (UTC)
commit 237df47c5f6f82021faef495afcbd2a8ad932a3c
Author: Lin Ma <lin ma oracle com>
Date: Thu Feb 17 14:57:37 2011 +0800
Fixed bugster 7007407. Do not clear stat info until a node is really
deleted.
gio/fen/fen-helper.c | 3 +--
gio/fen/fen-kernel.c | 3 +--
gio/fen/fen-node.c | 7 +++----
3 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gio/fen/fen-helper.c b/gio/fen/fen-helper.c
index 418d003..f1c51da 100644
--- a/gio/fen/fen-helper.c
+++ b/gio/fen/fen-helper.c
@@ -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__)
diff --git a/gio/fen/fen-kernel.c b/gio/fen/fen-kernel.c
index a060016..f09ebaa 100644
--- a/gio/fen/fen-kernel.c
+++ b/gio/fen/fen-kernel.c
@@ -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__)
diff --git a/gio/fen/fen-node.c b/gio/fen/fen-node.c
index 5bbe6b8..0a5f1e0 100644
--- a/gio/fen/fen-node.c
+++ b/gio/fen/fen-node.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]