matanp has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/41413?usp=email )


Change subject: handover: Move log macros to handover_fsm.h
......................................................................

handover: Move log macros to handover_fsm.h

Change-Id: I65fdde44042b8c4a050aaa07961676c4c18c0431
---
M include/osmocom/bsc/handover_fsm.h
M src/osmo-bsc/handover_decision_2.c
2 files changed, 45 insertions(+), 45 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/13/41413/1

diff --git a/include/osmocom/bsc/handover_fsm.h 
b/include/osmocom/bsc/handover_fsm.h
index 03a8436..400f86f 100644
--- a/include/osmocom/bsc/handover_fsm.h
+++ b/include/osmocom/bsc/handover_fsm.h
@@ -4,6 +4,51 @@
 #include <osmocom/bsc/debug.h>
 #include <osmocom/bsc/handover.h>

+#define LOGPHOBTS(bts, level, fmt, args...) \
+       LOGP(DHODEC, level, "(BTS %u) " fmt, bts->nr, ## args)
+
+#define LOGPHOLCHAN(lchan, level, fmt, args...) \
+       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s) (subscr %s) " fmt, \
+            lchan->ts->trx->bts->nr, \
+            lchan->ts->trx->nr, \
+            lchan->ts->nr, \
+            lchan->nr, \
+            gsm_chan_t_name(lchan->type), \
+            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
+            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
+            ## args)
+
+#define LOGPHOLCHANTOBTS(lchan, new_bts, level, fmt, args...) \
+       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s)->(BTS %u) (subscr %s) " 
fmt, \
+            lchan->ts->trx->bts->nr, \
+            lchan->ts->trx->nr, \
+            lchan->ts->nr, \
+            lchan->nr, \
+            gsm_chan_t_name(lchan->type), \
+            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
+            new_bts->nr, \
+            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
+            ## args)
+
+#define LOGPHOLCHANTOREMOTE(lchan, remote_cil, level, fmt, args...) \
+       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s)->(remote-BSS %s) (subscr 
%s) " fmt, \
+            lchan->ts->trx->bts->nr, \
+            lchan->ts->trx->nr, \
+            lchan->ts->nr, \
+            lchan->nr, \
+            gsm_chan_t_name(lchan->type), \
+            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
+            gsm0808_cell_id_list_name(remote_cil), \
+            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
+            ## args)
+
+#define LOGPHOCAND(candidate, level, fmt, args...) do {\
+       if ((candidate)->target.bts) \
+               LOGPHOLCHANTOBTS((candidate)->current.lchan, 
(candidate)->target.bts, level, fmt, ## args); \
+       else if ((candidate)->target.cell_ids.id_list_len) \
+               LOGPHOLCHANTOREMOTE((candidate)->current.lchan, 
&(candidate)->target.cell_ids, level, fmt, ## args); \
+       } while (0)
+
 /* Terminology:
  * Intra-Cell: stays within one BTS, this should actually be an Assignment.
  * Intra-BSC: stays within one BSC, but moves between BTSes.
diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index 073e013..204c438 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -44,51 +44,6 @@
 #include <osmocom/bsc/lchan_select.h>
 #include <osmocom/bsc/chan_counts.h>

-#define LOGPHOBTS(bts, level, fmt, args...) \
-       LOGP(DHODEC, level, "(BTS %u) " fmt, bts->nr, ## args)
-
-#define LOGPHOLCHAN(lchan, level, fmt, args...) \
-       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s) (subscr %s) " fmt, \
-            lchan->ts->trx->bts->nr, \
-            lchan->ts->trx->nr, \
-            lchan->ts->nr, \
-            lchan->nr, \
-            gsm_chan_t_name(lchan->type), \
-            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
-            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
-            ## args)
-
-#define LOGPHOLCHANTOBTS(lchan, new_bts, level, fmt, args...) \
-       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s)->(BTS %u) (subscr %s) " 
fmt, \
-            lchan->ts->trx->bts->nr, \
-            lchan->ts->trx->nr, \
-            lchan->ts->nr, \
-            lchan->nr, \
-            gsm_chan_t_name(lchan->type), \
-            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
-            new_bts->nr, \
-            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
-            ## args)
-
-#define LOGPHOLCHANTOREMOTE(lchan, remote_cil, level, fmt, args...) \
-       LOGP(DHODEC, level, "(lchan %u.%u%u%u %s %s)->(remote-BSS %s) (subscr 
%s) " fmt, \
-            lchan->ts->trx->bts->nr, \
-            lchan->ts->trx->nr, \
-            lchan->ts->nr, \
-            lchan->nr, \
-            gsm_chan_t_name(lchan->type), \
-            gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \
-            gsm0808_cell_id_list_name(remote_cil), \
-            bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \
-            ## args)
-
-#define LOGPHOCAND(candidate, level, fmt, args...) do {\
-       if ((candidate)->target.bts) \
-               LOGPHOLCHANTOBTS((candidate)->current.lchan, 
(candidate)->target.bts, level, fmt, ## args); \
-       else if ((candidate)->target.cell_ids.id_list_len) \
-               LOGPHOLCHANTOREMOTE((candidate)->current.lchan, 
&(candidate)->target.cell_ids, level, fmt, ## args); \
-       } while (0)
-

 #define REQUIREMENT_A_TCHF     0x01
 #define REQUIREMENT_B_TCHF     0x02

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41413?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I65fdde44042b8c4a050aaa07961676c4c18c0431
Gerrit-Change-Number: 41413
Gerrit-PatchSet: 1
Gerrit-Owner: matanp <[email protected]>

Reply via email to