]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
another --disable-trace compilation fixes, fixes #2460
authorJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 19:17:22 +0000 (20:17 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 19:17:22 +0000 (20:17 +0100)
src/input/mpegts/dvb_psi.c
src/subscriptions.c

index baa50b3c20c9545488c1834cc0fd04547326ebcf..817b0b74169543ae2d8525c4dd12bc5f5990981e 100644 (file)
@@ -467,19 +467,26 @@ static void
 dvb_freesat_local_channels
   ( dvb_bat_id_t *bi, const char *dstr, const uint8_t *ptr, int len )
 {
-  uint16_t sid, unk, lcn, regionid;
+  uint16_t sid, lcn, regionid;
+#if ENABLE_TRACE
+  uint16_t unk;
+#endif
   dvb_freesat_svc_t *fs;
   int len2;
 
   while (len > 4) {
     sid = (ptr[0] << 8) | ptr[1];
+#if ENABLE_TRACE
     unk = (ptr[2] << 8) | ptr[3];
+#endif
     len2 = ptr[4];
     ptr += 5;
     len -= 5;
     if (len2 > len)
       break;
+#if ENABLE_TRACE
     tvhtrace(dstr, "      sid %04X (%d) uknown %04X (%d)", sid, sid, unk, unk);
+#endif
     while (len2 > 3) {
       lcn = ((ptr[0] & 0x0f) << 8) | ptr[1];
       regionid = (ptr[2] << 8) | ptr[3];
@@ -701,7 +708,10 @@ dvb_bskyb_local_channels
   ( dvb_bat_id_t *bi, const char *dstr,
     const uint8_t *ptr, int len, mpegts_mux_t *mm )
 {
-  uint16_t sid, unk, lcn, regionid, stype;
+  uint16_t sid, lcn, regionid;
+#if ENABLE_TRACE
+  uint16_t unk, stype;
+#endif
   dvb_freesat_region_t *fr;
   dvb_freesat_svc_t *fs;
   dvb_bat_svc_t *bs;
@@ -735,14 +745,18 @@ dvb_bskyb_local_channels
 
   while (len > 8) {
     sid = (ptr[0] << 8) | ptr[1];
-    stype = ptr[2];
     lcn = (ptr[5] << 8) | ptr[6];
+#if ENABLE_TRACE
+    stype = ptr[2];
     unk = (ptr[3] << 8) | ptr[4];
+#endif
     ptr += 9;
     len -= 9;
 
+#if ENABLE_TRACE
     tvhtrace(dstr, "      sid %04X (%d) type %02X (%d) lcn %d unknown %04X (%d)",
              sid, sid, stype, stype, lcn, unk, unk);
+#endif
 
     TAILQ_FOREACH(fs, &bi->fservices, link)
       if (fs->sid == sid && fs->regionid == regionid)
index 055c5553e599d49dc8b00ffe3cf1b5e668fa7669..041983d182071e3f2c38fbf9ac2c70a39f42585d 100644 (file)
@@ -647,13 +647,11 @@ subscription_create_from_channel_or_service(profile_chain_t *prch,
   th_subscription_t *s;
   channel_t *ch = NULL;
   service_t *t  = NULL;
-  const char *pro_name;
 
   assert(prch);
   assert(prch->prch_id);
   assert(prch->prch_st);
 
-  pro_name = prch->prch_pro ? (prch->prch_pro->pro_name ?: "") : "<none>";
 
   if (service)
     t  = prch->prch_id;
@@ -662,12 +660,15 @@ subscription_create_from_channel_or_service(profile_chain_t *prch,
 
   s = subscription_create(prch, weight, name, flags, subscription_input,
                           hostname, username, client);
+#if ENABLE_TRACE
+  const char *pro_name = prch->prch_pro ? (prch->prch_pro->pro_name ?: "") : "<none>";
   if (ch)
     tvhtrace("subscription", "%04X: creating subscription for %s weight %d using profile %s",
              shortid(s), channel_get_name(ch), weight, pro_name);
   else
     tvhtrace("subscription", "%04X: creating subscription for service %s weight %d sing profile %s",
              shortid(s), t->s_nicename, weight, pro_name);
+#endif
   s->ths_channel = ch;
   s->ths_service = t;
   if (ch)