sd->sd_sig_scale = 240;
sd->sd_dbus_allow = 1;
-
if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class,
uuid.hex, conf)) {
/* Note: sd is freed in above fcn */
TAILQ_INIT(&sd->sd_frontends);
TAILQ_INIT(&sd->sd_serialize_queue);
+ atomic_set(&sd->sd_wake_ref, 0);
+
/* we may check if uuid matches, but the SHA hash should be enough */
if (sd->sd_info.uuid)
free(sd->sd_info.uuid);
if (tr == NULL)
return;
+ if (atomic_add(&lfe->sf_device->sd_wake_ref, 1) > 0)
+ goto end;
+
hash1 = tr->sf_netposhash;
TAILQ_FOREACH(lfe2, &lfe->sf_device->sd_frontends, sf_link) {
tvh_write(lfe2->sf_dvr_pipe.wr, "o", 1);
pthread_mutex_unlock(&lfe2->sf_dvr_lock);
}
+
+end:
+ atomic_dec(&lfe->sf_device->sd_wake_ref, 1);
}
static void
int sd_dbus_allow;
int sd_skip_ts;
int sd_disable_workarounds;
+ int sd_wake_ref;
pthread_mutex_t sd_tune_mutex;
TAILQ_HEAD(,satip_frontend)sd_serialize_queue;
};