summaryrefslogtreecommitdiff
path: root/src/lib/decoder
diff options
context:
space:
mode:
authorPiotr Krysik <perper@o2.pl>2009-06-13 17:28:03 +0200
committerPiotr Krysik <perper@o2.pl>2009-06-13 17:28:03 +0200
commitd406d48293c998567d628d950c66da1ca8ded39c (patch)
tree6069ed5d899d8f328931795a8d560d15c66198d1 /src/lib/decoder
parent8d22cd691b045295fd2de22e37868346ab0b0c45 (diff)
cch decoding now works! but I have to remove it in the future :)
Diffstat (limited to 'src/lib/decoder')
-rw-r--r--src/lib/decoder/gsmstack.c24
-rw-r--r--src/lib/decoder/gsmstack.h2
-rw-r--r--src/lib/decoder/sch.h4
3 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/decoder/gsmstack.c b/src/lib/decoder/gsmstack.c
index cf94939..ceda6c5 100644
--- a/src/lib/decoder/gsmstack.c
+++ b/src/lib/decoder/gsmstack.c
@@ -104,9 +104,9 @@ GS_new(GS_CTX *ctx)
* 142 bit
*/
int
-GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src)
+GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src, int fn)
{
- int fn;
+// int fn;
int bsic;
int ret;
unsigned char *data;
@@ -132,9 +132,9 @@ GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src)
}
#endif
- if (ts == 0) {
+/* if (ts == 0) {
if (type == SCH) {
- ret = decode_sch(src, &fn, &bsic);
+// ret = decode_sch(src, &fn, &bsic);
if (ret != 0)
return 0;
if ((ctx->bsic > 0) && (bsic != ctx->bsic))
@@ -143,17 +143,17 @@ GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src)
ctx->fn = fn;
ctx->bsic = bsic;
/* Reset message concatenator */
- ts_ctx->burst_count = 0;
- return 0;
- }
+// ts_ctx->burst_count = 0;
+// return 0;
+// }
/* If we did not get Frame Number yet then return */
- if (ctx->fn < 0)
- return 0;
-
- ctx->fn++;
- }
+// if (ctx->fn < 0)
+// return 0;
+// ctx->fn++;
+// }
+ ctx->fn = fn;
if (type == NORMAL) {
/* Interested in these frame numbers (cch)
* 2-5, 12-15, 22-25, 23-35, 42-45
diff --git a/src/lib/decoder/gsmstack.h b/src/lib/decoder/gsmstack.h
index fb88334..7295b08 100644
--- a/src/lib/decoder/gsmstack.h
+++ b/src/lib/decoder/gsmstack.h
@@ -34,7 +34,7 @@ typedef struct
} GS_CTX;
int GS_new(GS_CTX *ctx);
-int GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src);
+int GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src, int fn);
#ifdef __cplusplus
}
diff --git a/src/lib/decoder/sch.h b/src/lib/decoder/sch.h
index 199d739..4d47eb5 100644
--- a/src/lib/decoder/sch.h
+++ b/src/lib/decoder/sch.h
@@ -1,6 +1,6 @@
-#ifndef __GSMSTACK_H__
-#define __GSMSTACK_H__ 1
+#ifndef __SCH_H__
+#define __SCH_H__ 1
#ifdef __cplusplus
extern "C"
personal git repositories of Harald Welte. Your mileage may vary