diff options
author | root <root> | 2007-11-29 17:36:35 +0000 |
---|---|---|
committer | root <root> | 2007-11-29 17:36:35 +0000 |
commit | 8e89c9383f4e3beeb586b448a9aa2f86b23376f3 (patch) | |
tree | 1667ba7dd7eb5ce647080bcd650112f0a3fa17b4 /ev++.h | |
parent | 756a6378f76a80c595335d4a78ab426cc44d247d (diff) |
fix bug reported by chris brody
Diffstat (limited to 'ev++.h')
-rw-r--r-- | ev++.h | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -250,6 +250,7 @@ namespace ev { void start (const char *path, ev_tstamp interval = 0.) { + stop (); set (path, interval); start (); } @@ -275,17 +276,10 @@ namespace ev { #if EV_EMBED_ENABLE EV_BEGIN_WATCHER (embed, embed) - void set (struct ev_loop *loop) - { - int active = is_active (); - if (active) stop (); - ev_embed_set (static_cast<ev_embed *>(this), loop); - if (active) start (); - } - void start (struct ev_loop *embedded_loop) { - set (embedded_loop); + stop (); + ev_embed_set (static_cast<ev_embed *>(this), embedded_loop); start (); } |