|
@@ -153,6 +153,11 @@ periodic_event_disconnect(periodic_event_item_t *event)
|
|
|
{
|
|
{
|
|
|
if (!event)
|
|
if (!event)
|
|
|
return;
|
|
return;
|
|
|
|
|
+
|
|
|
|
|
+ /* First disable the event so we first cancel the event and set its enabled
|
|
|
|
|
+ * flag properly. */
|
|
|
|
|
+ periodic_event_disable(event);
|
|
|
|
|
+
|
|
|
mainloop_event_free(event->ev);
|
|
mainloop_event_free(event->ev);
|
|
|
event->last_action_time = 0;
|
|
event->last_action_time = 0;
|
|
|
}
|
|
}
|