annotate libgsmhr1/rxfe_create.c @ 585:3c6bf0d26ee7

TW-TS-005 reader: fix maximum line length bug TW-TS-005 section 4.1 states: The maximum allowed length of each line is 80 characters, not including the OS-specific newline encoding. The implementation of this line length limit in the TW-TS-005 hex file reader function in the present suite was wrong, such that lines of the full maximum length could not be read. Fix it. Note that this bug affects comment lines too, not just actual RTP payloads. Neither Annex A nor Annex B features an RTP payload format that goes to the maximum of 40 bytes, but if a comment line goes to the maximum allowed length of 80 characters not including the terminating newline, the bug will be triggered, necessitating the present fix.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 25 Feb 2025 07:49:28 +0000
parents 9cda792c0dd7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
583
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * Here we implement gsmhr_rxfe_create() function: allocation of a
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * free-standing RxFE state structure, used for our TFO transform.
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdint.h>
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdlib.h>
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "tw_gsmhr.h"
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include "typedefs.h"
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "namespace.h"
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include "rxfe.h"
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 struct gsmhr_rxfe_state *gsmhr_rxfe_create(void)
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 {
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 struct gsmhr_rxfe_state *st;
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 st = malloc(sizeof(struct gsmhr_rxfe_state));
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 if (st)
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 gsmhr_rxfe_reset(st);
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 return st;
9cda792c0dd7 libgsmhr1: implement RxFE state allocation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 }