/* Adds a subscription to the missing files list.  */
void _km_add_missing(kqueue_sub *sub)
/* Adds a subscription to the missing files list.  */
void _km_add_missing(kqueue_sub *sub)
{
  G_LOCK (missing_lock);
  if (g_slist_find (missing_subs_list, sub))
    {
      KM_W ("asked to add %s to missing list but it's already on the list!\n", sub->filename);
      G_UNLOCK (missing_lock);
      return;
    }
  KM_W ("adding %s to missing list\n", sub->filename);
  missing_subs_list = g_slist_prepend (missing_subs_list, sub);
  G_UNLOCK (missing_lock);
  if (!scan_missing_running)
    {
      scan_missing_running = TRUE;
      g_timeout_add_seconds (SCAN_MISSING_TIME, km_scan_missing, NULL);
    }
}