summaryrefslogtreecommitdiff
path: root/gsm-receiver/src
diff options
context:
space:
mode:
authorDieter Spaar <spaar@mirider.augusta.de>2010-07-29 20:29:34 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-29 20:29:34 +0200
commit7f5253594d631c7b3beb06147e5cfdf1f06ba7f5 (patch)
tree76db3683e427a7dcf5a29dccd046a9f1461a57dd /gsm-receiver/src
parent714da0d58ec57c4ffbccc74c4b43eaf1d9eaaea6 (diff)
Don't abort if we have Rx bit errors but try to correct them
Diffstat (limited to 'gsm-receiver/src')
-rw-r--r--gsm-receiver/src/lib/decoder/cch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gsm-receiver/src/lib/decoder/cch.c b/gsm-receiver/src/lib/decoder/cch.c
index f1da56d..c6da29d 100644
--- a/gsm-receiver/src/lib/decoder/cch.c
+++ b/gsm-receiver/src/lib/decoder/cch.c
@@ -405,8 +405,6 @@ static unsigned char *decode_sacch(GS_CTX *ctx, unsigned char *burst, unsigned i
// Viterbi decode
errors = conv_decode(decoded_data, conv_data);
//DEBUGF("conv_decode: %d\n", errors);
- if (errors)
- return NULL;
// check parity
// If parity check error detected try to fix it.
@@ -417,15 +415,18 @@ static unsigned char *decode_sacch(GS_CTX *ctx, unsigned char *burst, unsigned i
if (FC_check_crc(&fc_ctx, decoded_data, crc_result) == 0)
{
errors = -1;
- DEBUGF("error: sacch: parity error (%d)\n", errors);
+ DEBUGF("error: sacch: parity error (%d fn=%d)\n", errors, ctx->fn);
return NULL;
} else {
- DEBUGF("Successfully corrected parity bits!\n");
+ DEBUGF("Successfully corrected parity bits! (errors=%d fn=%d)\n", errors, ctx->fn);
memcpy(decoded_data, crc_result, sizeof crc_result);
errors = 0;
}
}
+ if (errors)
+ printf("WRN: errors=%d fn=%d\n", errors, ctx->fn);
+
if((len = compress_bits(ctx->msg, data_size, decoded_data,
DATA_BLOCK_SIZE)) < 0) {
fprintf(stderr, "error: compress_bits\n");
personal git repositories of Harald Welte. Your mileage may vary