blob: 0760f88fee3c3bad639bcc22af939c3c6455a187 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- gio/fam/fam-helper.h.orig 2008-03-10 13:50:12.000000000 -0400
+++ gio/fam/fam-helper.h 2008-03-10 13:50:29.000000000 -0400
@@ -28,6 +28,7 @@
typedef struct _fam_sub fam_sub;
gboolean _fam_sub_startup (void);
+void _fam_sub_shutdown (void);
fam_sub* _fam_sub_add (const gchar* pathname,
gboolean directory,
gpointer user_data);
--- gio/fam/gfamdirectorymonitor.c.orig 2008-03-10 13:50:21.000000000 -0400
+++ gio/fam/gfamdirectorymonitor.c 2008-03-10 13:50:29.000000000 -0400
@@ -53,6 +53,8 @@ g_fam_directory_monitor_finalize (GObjec
fam_monitor->sub = NULL;
}
+ _fam_sub_shutdown ();
+
if (G_OBJECT_CLASS (g_fam_directory_monitor_parent_class)->finalize)
(*G_OBJECT_CLASS (g_fam_directory_monitor_parent_class)->finalize) (object);
}
--- gio/fam/gfamfilemonitor.c.orig 2008-03-10 13:50:18.000000000 -0400
+++ gio/fam/gfamfilemonitor.c 2008-03-10 13:50:29.000000000 -0400
@@ -52,6 +52,8 @@ g_fam_file_monitor_finalize (GObject *ob
fam_monitor->sub = NULL;
}
+ _fam_sub_shutdown ();
+
if (G_OBJECT_CLASS (g_fam_file_monitor_parent_class)->finalize)
(*G_OBJECT_CLASS (g_fam_file_monitor_parent_class)->finalize) (object);
}
--- gio/fam/fam-helper.c.orig 2008-03-10 20:31:58.000000000 -0400
+++ gio/fam/fam-helper.c 2008-03-10 23:06:32.000000000 -0400
@@ -181,6 +181,22 @@ _fam_sub_startup (void)
return TRUE;
}
+void
+_fam_sub_shutdown (void)
+{
+ G_LOCK (fam_connection);
+
+ if (fam_connection != NULL) {
+ FAMClose (fam_connection);
+ g_free (fam_connection);
+ g_source_remove (fam_watch_id);
+ fam_watch_id = 0;
+ fam_connection = NULL;
+ }
+
+ G_UNLOCK (fam_connection);
+}
+
fam_sub*
_fam_sub_add (const gchar* pathname,
gboolean directory,
|