Mercurial > pidgin.yaz
changeset 6107:38410dac4ac2
[gaim-migrate @ 6568]
Fix Cae Non-Fatal Bad Bug 3: "unloading the remote control plugin makes
the cpu run at 99% and stay there"
Here comes the sun...
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 13 Jul 2003 09:55:04 +0000 |
parents | 99f4bbeb27bc |
children | edbd278822a0 |
files | plugins/gaim-remote/remote.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c Sun Jul 13 09:34:48 2003 +0000 +++ b/plugins/gaim-remote/remote.c Sun Jul 13 09:55:04 2003 +0000 @@ -51,6 +51,7 @@ #ifndef _WIN32 static gint UI_fd = -1; +static guint watcher = 0; #endif static int gaim_session = 0; static GSList *uis = NULL; @@ -676,7 +677,7 @@ return 1; channel = g_io_channel_unix_new(UI_fd); - g_io_add_watch(channel, G_IO_IN, socket_readable, NULL); + watcher = g_io_add_watch(channel, G_IO_IN, socket_readable, NULL); g_io_channel_unref(channel); #endif @@ -694,6 +695,7 @@ /* don't save prefs after plugins are gone... */ #ifndef _WIN32 char buf[1024]; + g_source_remove(watcher); close(UI_fd); g_snprintf(buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session);