]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Changed service_mapper_notify() origin==NULL behaviour 351/head
authorJaroslav Kysela <perex@perex.cz>
Mon, 17 Mar 2014 09:37:27 +0000 (10:37 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 17 Mar 2014 09:37:27 +0000 (10:37 +0100)
src/service_mapper.c
src/service_mapper.h

index 364131be9e1234e730b9225423f75594b72bdb44..8f3ef301c6ab5afb890a8e916ab7e2250182729f 100644 (file)
@@ -177,11 +177,13 @@ service_mapper_remove ( service_t *s )
 static void
 service_mapper_notify ( channel_service_mapping_t *csm, void *origin )
 {
-  if (origin == NULL || origin == csm->csm_svc) {
+  if (origin == NULL)
+    return;
+  if (origin == csm->csm_svc) {
     idnode_notify_simple(&csm->csm_chn->ch_id);
     channel_save(csm->csm_chn);
   }
-  if (origin == NULL || origin == csm->csm_chn)
+  if (origin == csm->csm_chn)
     idnode_notify_simple(&csm->csm_svc->s_id);
 }
 
index 132249e73612c02439a592155b4ba97c15014f63..43f23aef6ef427e21a2e471d1c5e3031b505c018 100644 (file)
@@ -66,7 +66,7 @@ void service_mapper_unlink ( struct service *s, struct channel *c, void *origin
  * @param s       The service to clean linkages for
  * @param c       The channel to clean linkages for
  * @parma origin  Origin of the change (should be a service or a channel ptr).
- *                NULL = both changed, other ptr = no save and notifications.
+ *                NULL = no save and notifications.
  *
  * @return 1 if changes were made, else 0
  */