From f06ba300c4a251088b1aea01d5c0659e666f5caa Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 3 Jul 2017 10:56:59 +0200 Subject: [PATCH] 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 --- src/common/l1sap.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 3f9da4f0a..f487d77d4 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -52,16 +53,6 @@ #include #include -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) {