From f1b56f76366d7c52c4c5f0c08a6a2f7d952c9394 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Sat, 6 Jul 2013 23:36:45 +0100 Subject: [PATCH] prop: ensure notify callback is triggered --- src/prop.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/prop.c b/src/prop.c index c238ffc8..cc665bd2 100644 --- a/src/prop.c +++ b/src/prop.c @@ -81,7 +81,7 @@ prop_find(const property_t *p, const char *id) int prop_write_values(void *obj, const property_t *pl, htsmsg_t *m, int optmask) { - int save = 0; + int save, save2 = 0; htsmsg_field_t *f; if (!pl) return 0; @@ -101,6 +101,7 @@ prop_write_values(void *obj, const property_t *pl, htsmsg_t *m, int optmask) if(p->opts & optmask) continue; /* Write */ + save = 0; void *v = obj + p->off; switch(TO_FROM(p->type, f->hmf_type)) { case TO_FROM(PT_BOOL, HMF_BOOL): { @@ -163,8 +164,14 @@ prop_write_values(void *obj, const property_t *pl, htsmsg_t *m, int optmask) break; } } + + if (save) { + save2 = 1; + if (p->notify) + p->notify(obj); + } } - return save; + return save2; } /* **************************************************************************