Add notify_reload() helper

This commit is contained in:
Andreas Öman 2012-10-18 11:04:45 +02:00
parent a40aad8ff2
commit 84ac2ebfdb
3 changed files with 13 additions and 4 deletions

View file

@ -520,10 +520,8 @@ _dvr_autorec_add(const char *config_name,
htsmsg_destroy(m);
/* Notify web clients that we have messed with the tables */
m = htsmsg_create_map();
htsmsg_add_u32(m, "reload", 1);
notify_by_msg("autorec", m);
notify_reload("autorec");
dvr_autorec_changed(dae);
}

View file

@ -33,3 +33,12 @@ notify_by_msg(const char *class, htsmsg_t *m)
comet_mailbox_add_message(m, 0);
htsmsg_destroy(m);
}
void
notify_reload(const char *class)
{
htsmsg_t *m = htsmsg_create_map();
htsmsg_add_u32(m, "reload", 1);
notify_by_msg(class, m);
}

View file

@ -23,4 +23,6 @@
void notify_by_msg(const char *class, htsmsg_t *m);
void notify_reload(const char *class);
#endif /* NOTIFY_H_ */