doxygen: add some missing docstrings.
[disorder] / server / disorderd.c
index 14b459f..3e1ab44 100644 (file)
@@ -80,8 +80,12 @@ static int handle_sigterm(ev_source attribute((unused)) *ev_,
 
 /* periodic actions --------------------------------------------------------- */
 
+/** @brief A job executed periodically by the server */
 struct periodic_data {
+  /** @brief Callback to process job */
   void (*callback)(ev_source *);
+
+  /** @brief Period of job in seconds */
   int period;
 };
 
@@ -302,6 +306,8 @@ int main(int argc, char **argv) {
   create_periodic(ev, periodic_play_check, 1, 0);
   /* Try adding a random track immediately and once every two seconds */
   create_periodic(ev, periodic_add_random, 2, 1);
+  /* Issue a rescan when devices are mounted or unmouted */
+  create_periodic(ev, periodic_mount_check, MOUNT_CHECK_INTERVAL, 1);
   /* enter the event loop */
   n = ev_run(ev);
   /* if we exit the event loop, something must have gone wrong */