etrunko pushed a commit to branch master.
commit fb0dc85bc312a37efad12e2394b4a536f130580e
Author: Eduardo Lima (Etrunko) <[email protected]>
Date: Mon May 27 18:17:54 2013 -0300
eldbus: Reset value of fd_handler after deletion
Signed-off-by: Eduardo Lima (Etrunko) <[email protected]>
---
src/lib/eldbus/eldbus_core.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/lib/eldbus/eldbus_core.c b/src/lib/eldbus/eldbus_core.c
index c2b3b57..3c8217f 100644
--- a/src/lib/eldbus/eldbus_core.c
+++ b/src/lib/eldbus/eldbus_core.c
@@ -635,8 +635,15 @@ cb_watch_toggle(DBusWatch *watch, void *data EINA_UNUSED)
hd->enabled = dbus_watch_get_enabled(watch);
DBG("watch %p is %sabled", hd, hd->enabled ? "en" : "dis");
- if (hd->enabled) eldbus_fd_handler_add(hd);
- else ecore_main_fd_handler_del(hd->fd_handler);
+ if (hd->enabled)
+ {
+ eldbus_fd_handler_add(hd);
+ }
+ else
+ {
+ ecore_main_fd_handler_del(hd->fd_handler);
+ hd->fd_handler = NULL;
+ }
}
static void
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may