Skip to content

Commit

Permalink
Various fixes by Lars #1116 #1115 #1112
Browse files Browse the repository at this point in the history
  • Loading branch information
Catalin Toda committed Jun 2, 2023
1 parent 72abc76 commit a9bbd6d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,13 @@ int detect_dvb_parameters(char *s, transponder *tp) {
tp->gi = map_int(arg[i] + 3, fe_gi);
if (strncmp("tmode=", arg[i], 6) == 0)
tp->tmode = map_int(arg[i] + 6, fe_tmode);
if (strncmp("bw=", arg[i], 3) == 0)
if (strncmp("bw=", arg[i], 3) == 0) {
tp->bw = map_float(arg[i] + 3, 1000000);
if (tp->bw < 0 || tp->bw > 100000000) // Fix clients that send bw=8000 !
tp->bw = map_float(arg[i] + 3, 1000);
if (tp->bw < 0 || tp->bw > 100000000) // Fix clients that send bw=8000000 !
tp->bw = map_float(arg[i] + 3, 1);
}
if (strncmp("specinv=", arg[i], 8) == 0)
tp->inversion = map_int(arg[i] + 8, NULL);
if (strncmp("c2tft=", arg[i], 6) == 0)
Expand Down
5 changes: 2 additions & 3 deletions src/pmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ char *cw_to_string(SCW *cw, char *buf) {
}

void clear_cw_for_pmt(int master_pmt, int parity) {
int i, dcw = 0;
int i;
int64_t ctime = getTick();
for (i = 0; i < ncws; i++)
if (cws[i] && cws[i]->enabled && cws[i]->pmt == master_pmt &&
Expand All @@ -660,7 +660,6 @@ void clear_cw_for_pmt(int master_pmt, int parity) {
if (cws[i]->op->stop_cw)
cws[i]->op->stop_cw(cws[i], get_pmt(master_pmt));
cws[i]->enabled = 0;
dcw++;
}
i = MAX_CW;
while (--i >= 0)
Expand Down Expand Up @@ -1111,7 +1110,7 @@ void start_active_pmts(adapter *ad) {
memset(pids, 0, sizeof(pids));

for (i = 0; i < MAX_PIDS; i++)
if ((ad->pids[i].flags == 1)) {
if (ad->pids[i].flags == 1) {
pids[ad->pids[i].pid] = ad->pids + i;
}
for (i = 0; i < ad->active_pmts; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ int enqueue_rtp_header(streams *sid, struct iovec *iov, int liov,
len = 4;
}

copy16(rtp_buf, len + 0, 0x8021);
copy16(rtp_buf, len + 0, (uint32_t)0x8021);
copy16(rtp_buf, len + 2, sid->seq);
copy32(rtp_buf, len + 4, timestamp);
copy32(rtp_buf, len + 8, sid->ssrc);
Expand Down
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ int addr2line(char const *const program_name, void const *const addr) {
}

void print_trace(void) {
#if !defined(NO_BACKTRACE)
void *array[10];
size_t size;
size_t i;
#if !defined(NO_BACKTRACE)

size = backtrace(array, 10);

Expand Down

0 comments on commit a9bbd6d

Please sign in to comment.