aboutsummaryrefslogtreecommitdiffstats
path: root/src/e1_recorder.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-10-19 10:47:41 +0200
committerHarald Welte <laforge@gnumonks.org>2016-10-19 10:55:25 +0200
commit2ac78497ddb0320f8b6c3f38f1acd0a0b70dcf00 (patch)
treed946e51ac497a1596f2f12d53fde540772ba9d6a /src/e1_recorder.c
parentdf7a306df5a1cb41ad42c303001f24a06f28458e (diff)
e1_recorder: propagate errors to main, where we exit() in case of failing to open file
Diffstat (limited to 'src/e1_recorder.c')
-rw-r--r--src/e1_recorder.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/e1_recorder.c b/src/e1_recorder.c
index b0ae044..11ec93e 100644
--- a/src/e1_recorder.c
+++ b/src/e1_recorder.c
@@ -32,10 +32,15 @@ void e1ts_raw_recv(struct e1inp_ts *ts, struct msgb *msg)
{
struct e1_recorder_line *rline = &g_recorder.line[ts->line->num];
enum osmo_e1cap_capture_mode cap_mode = ts2cap_mode(ts);
+ int rc;
/* FIXME: special processing of TFP and PGSL */
- e1frame_store(ts, msg, cap_mode);
+ rc = e1frame_store(ts, msg, cap_mode);
+ if (rc < 0) {
+ LOGP(DMAIN, LOGL_FATAL, "Error writing E1/T1 frame to disk\n");
+ exit(1);
+ }
if (rline->mirror.enabled) {
struct e1inp_line *other_line =