Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
another --disable-trace compilation fixes, fixes #2460
  • Loading branch information
perexg committed Nov 10, 2014
1 parent c3c7675 commit dc39920
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
20 changes: 17 additions & 3 deletions src/input/mpegts/dvb_psi.c
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions src/subscriptions.c
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit dc39920

Please sign in to comment.