summaryrefslogtreecommitdiff
path: root/gsm-receiver/src/lib/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'gsm-receiver/src/lib/decoder')
-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