aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-07-03 10:56:59 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-10 08:44:02 +0000
commitf06ba300c4a251088b1aea01d5c0659e666f5caa (patch)
tree58d00c7b1538208cd0dc8a50ca110e8e9642adc2
parentffdc05bc4ed1171fa4306c058c45ae6a4793b2b8 (diff)
Move dump_gsmtime to libosmocore as osmo_dump_gsmtime
Internal l1sap dump_gsmtime has been moved to libosmocore as osmo_dump_gsmtime. Remove use of internal function and replace with the libosmocore version. Depends on libosmocore Ib5452e2c20f53006c0f6d197fb055728947125d8 Change-Id: Ia2f89965d970ed5bbb8c0d4f591a043e58c4bd66
-rw-r--r--src/common/l1sap.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 3f9da4f0..f487d77d 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -31,6 +31,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/l1sap.h>
+#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/gsmtap.h>
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/core/utils.h>
@@ -52,16 +53,6 @@
#include <osmo-bts/power_control.h>
#include <osmo-bts/msg_utils.h>
-static char *dump_gsmtime(const struct gsm_time *tm)
-{
- static char buf[64];
-
- snprintf(buf, sizeof(buf), "%06u/%02u/%02u/%02u/%02u",
- tm->fn, tm->t1, tm->t2, tm->t3, tm->fn%52);
- buf[sizeof(buf)-1] = '\0';
- return buf;
-}
-
struct gsm_lchan *get_lchan_by_chan_nr(struct gsm_bts_trx *trx,
unsigned int chan_nr)
{
@@ -627,13 +618,13 @@ static int lchan_pdtch_ph_rts_ind_loop(struct gsm_lchan *lchan,
loop_msg = msgb_dequeue(&lchan->dl_tch_queue);
if (!loop_msg) {
LOGP(DL1P, LOGL_NOTICE, "%s %s: no looped PDTCH message, sending empty\n",
- gsm_lchan_name(lchan), dump_gsmtime(tm));
+ gsm_lchan_name(lchan), osmo_dump_gsmtime(tm));
/* empty downlink message */
p = msgb_put(msg, GSM_MACBLOCK_LEN);
memset(p, 0, GSM_MACBLOCK_LEN);
} else {
LOGP(DL1P, LOGL_NOTICE, "%s %s: looped PDTCH message of %u bytes\n",
- gsm_lchan_name(lchan), dump_gsmtime(tm), msgb_l2len(loop_msg));
+ gsm_lchan_name(lchan), osmo_dump_gsmtime(tm), msgb_l2len(loop_msg));
/* copy over data from queued response message */
p = msgb_put(msg, msgb_l2len(loop_msg));
memcpy(p, msgb_l2(loop_msg), msgb_l2len(loop_msg));
@@ -666,7 +657,7 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
gsm_fn2gsmtime(&g_time, fn);
DEBUGP(DL1P, "Rx PH-RTS.ind %s chan_nr=%d link_id=%d\n",
- dump_gsmtime(&g_time), chan_nr, link_id);
+ osmo_dump_gsmtime(&g_time), chan_nr, link_id);
/* reuse PH-RTS.ind for PH-DATA.req */
if (!msg) {