diff options
author | tvoid <tvoid@lesaige.com> | 2008-04-11 09:08:00 -0600 |
---|---|---|
committer | tvoid <tvoid@lesaige.com> | 2008-04-11 09:08:00 -0600 |
commit | 67272251547bc999e581eb0d1fcd90b5cb14d469 (patch) | |
tree | 2f31580521e57ab08e69d06f2f678b54d6161d87 /gsm-tvoid/src/lib/gsmstack.c | |
parent | 26645da7613da2c50675f2059c70811354a334a3 (diff) | |
parent | 21aadd29384bfa45639940fc904592b8a7a5a073 (diff) |
Merge commit 'origin/HEAD'
Conflicts:
gsm-tvoid/src/lib/gsm.i
gsm-tvoid/src/lib/gsm_burst.cc
gsm-tvoid/src/lib/gsm_burst.h
gsm-tvoid/src/lib/gsm_burst_cf.cc
gsm-tvoid/src/lib/gsm_burst_ff.cc
gsm-tvoid/src/lib/gsm_burst_ff.h
gsm-tvoid/src/python/gsm_scan.py
Diffstat (limited to 'gsm-tvoid/src/lib/gsmstack.c')
-rw-r--r-- | gsm-tvoid/src/lib/gsmstack.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gsm-tvoid/src/lib/gsmstack.c b/gsm-tvoid/src/lib/gsmstack.c index a38ffcb..22fa170 100644 --- a/gsm-tvoid/src/lib/gsmstack.c +++ b/gsm-tvoid/src/lib/gsmstack.c @@ -14,6 +14,7 @@ static void out_gsmdecode(char type, int arfcn, int ts, int fn, char *data, int len); +#if 0 static void diff_decode(char *dst, char *src, int len) { @@ -33,6 +34,7 @@ diff_decode(char *dst, char *src, int len) dst++; } } +#endif /* * Initialize a new GSMSTACK context. @@ -49,26 +51,23 @@ GS_new(GS_CTX *ctx) } /* - * 156 bit + * 142 bit */ int -GS_process(GS_CTX *ctx, int ts, int type, char *src) +GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src) { int fn; int bsic; int ret; - char buf[156]; unsigned char *data; int len; if (ts != 0) return; - diff_decode(buf, src, 156); - if (type == SCH) { - ret = decode_sch(buf, &fn, &bsic); + ret = decode_sch(src, &fn, &bsic); if (ret != 0) return 0; if ((ctx->bsic > 0) && (bsic != ctx->bsic)) @@ -94,8 +93,8 @@ GS_process(GS_CTX *ctx, int ts, int type, char *src) */ /* Copy content data into new array */ //DEBUGF("burst count %d\n", ctx->burst_count); - memcpy(ctx->burst + (116 * ctx->burst_count), buf + 3, 58); - memcpy(ctx->burst + (116 * ctx->burst_count) + 58, buf + 3 + 58 + 26, 58); + memcpy(ctx->burst + (116 * ctx->burst_count), src, 58); + memcpy(ctx->burst + (116 * ctx->burst_count) + 58, src + 58 + 26, 58); ctx->burst_count++; /* Return if not enough bursts for a full gsm message */ if (ctx->burst_count < 4) |