2008-03-14 Alexander Larsson <alexl@redhat.com>
* fam/fam-helper.[ch]:
* fam/fam-module.c:
Shut down fam (including removing fam GSource) when
module is unloaded (#521513)
Patch from Joe Marcus Clarke
svn path=/trunk/; revision=6706
+2008-03-14 Alexander Larsson <alexl@redhat.com>
+
+ * fam/fam-helper.[ch]:
+ * fam/fam-module.c:
+ Shut down fam (including removing fam GSource) when
+ module is unloaded (#521513)
+ Patch from Joe Marcus Clarke
+
2008-03-14 Alexander Larsson <alexl@redhat.com>
* giomodule.c:
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,
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);
#include "giomodule.h"
#include "gfamdirectorymonitor.h"
#include "gfamfilemonitor.h"
+#include "fam-helper.h"
void
g_io_module_load (GIOModule *module)
void
g_io_module_unload (GIOModule *module)
{
+ _fam_sub_shutdown ();
}