summaryrefslogtreecommitdiff
blob: 26a3ccefc35836cb73f7c1585f269882e8f70d2e (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Index: server/gam_connection.c
===================================================================
RCS file: /cvs/gnome/gamin/server/gam_connection.c,v
retrieving revision 1.31
diff -u -p -r1.31 gam_connection.c
--- server/gam_connection.c	5 Sep 2006 14:26:56 -0000	1.31
+++ server/gam_connection.c	8 Sep 2006 12:42:41 -0000
@@ -108,7 +108,8 @@ gam_connection_close(GamConnDataPtr conn
     g_assert(conn->source);
 
     /* Kill the queue event source */
-    g_source_remove (conn->eq_source);
+    if (conn->eq_source != 0)
+      g_source_remove (conn->eq_source);
     /* Flush the event queue */
     gam_eq_flush (conn->eq, conn);
     /* Kill the event queue */
Index: server/gam_inotify.c
===================================================================
RCS file: /cvs/gnome/gamin/server/gam_inotify.c,v
retrieving revision 1.52
diff -u -p -r1.52 gam_inotify.c
--- server/gam_inotify.c	5 Sep 2006 14:17:20 -0000	1.52
+++ server/gam_inotify.c	8 Sep 2006 12:42:41 -0000
@@ -161,6 +161,9 @@ gboolean
 gam_inotify_add_subscription (GamSubscription *sub)
 {
 	ih_sub_t *isub = NULL;
+
+	gam_listener_add_subscription(gam_subscription_get_listener(sub), sub);
+	
 	isub = ih_sub_new (gam_subscription_get_path (sub), gam_subscription_is_dir (sub), 0, sub);
 
 	if (!ih_sub_add (isub))
Index: server/inotify-helper.c
===================================================================
RCS file: /cvs/gnome/gamin/server/inotify-helper.c,v
retrieving revision 1.1
diff -u -p -r1.1 inotify-helper.c
--- server/inotify-helper.c	5 Sep 2006 00:49:00 -0000	1.1
+++ server/inotify-helper.c	8 Sep 2006 12:42:41 -0000
@@ -161,28 +161,21 @@ static void
 ih_sub_foreach_worker (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata), gboolean free)
 {
 	GList *l = NULL;
-	GList *removed = NULL;
+	GList *next = NULL;
 
 	G_LOCK(inotify_lock);
 
-	for (l = sub_list; l; l = l->next)
+	for (l = sub_list; l; l = next)
 	{
 		ih_sub_t *sub = l->data;
-
+		next = l->next;
+		
 		if (f(sub, callerdata))
 		{
-			removed = g_list_prepend (removed, l);
-			ih_sub_cancel (sub);
+			ih_sub_cancel (sub); /* Removes sub from sub_list */
 			if (free)
 				ih_sub_free (sub);
 		}
-	}
-
-	for (l = removed; l ; l = l->next)
-	{
-		GList *llink = l->data;
-		sub_list = g_list_remove_link (sub_list, llink);
-		g_list_free_1 (llink);
 	}
 
 	G_UNLOCK(inotify_lock);
Index: server/inotify-sub.c
===================================================================
RCS file: /cvs/gnome/gamin/server/inotify-sub.c,v
retrieving revision 1.1
diff -u -p -r1.1 inotify-sub.c
--- server/inotify-sub.c	5 Sep 2006 00:49:00 -0000	1.1
+++ server/inotify-sub.c	8 Sep 2006 12:42:41 -0000
@@ -71,9 +71,7 @@ gchar *ih_sub_get_dirname (gchar *pathna
 static
 gchar *ih_sub_get_filename (gchar *pathname)
 {
-	gchar *out;
-	// FIXME: return filename here
-	return out;
+	return g_path_get_basename (pathname);
 }
 
 static