diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2016-07-23 17:38:22 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2016-07-25 17:35:47 +0200 |
commit | 745857277cd24fadcd27d54aaa402bd82090cc86 (patch) | |
tree | d96de2120f17dd4950694afde73a272534cd68bd /openbsc/include | |
parent | 34b8b5b29b72e245cc159ed4b035f6377988b762 (diff) |
code dup: join [rsl_]lchan_lookup() from libbsc and osmo-bts
lchan_lookup in abis_rsl.c and rsl_lchan_lookup() from osmo-bts rsl.c are the
same code, except for the log context, which is only set in abis_rsl.c.
Factor out the common code to rsl_lchan_lookup() in gsm_data_shared.c.
Openbsc and osmo-bts each define their own DRSL log constant, so add an int *rc
return code argument and keep the logging part in abis_rsl.c's thin lchan_lookup()
wrapper. Incidentally, this also removes code dup for logging.
To avoid duplicate symbols, the rsl_lchan_lookup() implementation needs to be
removed from osmo-bts, so older osmo-bts git revisions will not build with
this.
Change-Id: Ie89bc5bb9110a0e539d37991dedac6f913211b48
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 15bc49056..7241ff0f8 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -844,5 +844,7 @@ static inline uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts) return ts->trx->bts->bsic & 7; } +struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr, + int *rc); #endif |