Change in libosmo-sccp[master]: Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()

2019-10-19 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/15808 )

Change subject: Move definition of LOGSS7() to header file; add LOGPAS() like 
LOGPASP()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15808
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
Gerrit-Change-Number: 15808
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 19 Oct 2019 12:13:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmo-sccp[master]: Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()

2019-10-19 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/15808 )

Change subject: Move definition of LOGSS7() to header file; add LOGPAS() like 
LOGPASP()
..

Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()

Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
2 files changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index f448ce7..14e2b7c 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -430,8 +430,14 @@

 void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb);

+#define _LOGSS7(inst, subsys, level, fmt, args ...)  \
+LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args)
+#define LOGSS7(inst, level, fmt, args ...)  _LOGSS7(inst, DLSS7, level, 
fmt, ## args)
+
 #define LOGPASP(asp, subsys, level, fmt, args ...) \
-   LOGP(subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args)
+   _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## 
args)
+#define LOGPAS(as, subsys, level, fmt, args ...)   \
+   _LOGSS7((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## 
args)

 /***
  * xUA Servers
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 053feca..8519ced 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -74,9 +74,6 @@
{ 0, NULL }
 };

-#define LOGSS7(inst, level, fmt, args ...) \
-   LOGP(DLSS7, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args)
-
 static int asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto)
 {
switch (proto) {

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15808
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
Gerrit-Change-Number: 15808
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in libosmo-sccp[master]: Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()

2019-10-19 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/15808 )


Change subject: Move definition of LOGSS7() to header file; add LOGPAS() like 
LOGPASP()
..

Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()

Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
2 files changed, 7 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/08/15808/1

diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index f448ce7..14e2b7c 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -430,8 +430,14 @@

 void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb);

+#define _LOGSS7(inst, subsys, level, fmt, args ...)  \
+LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args)
+#define LOGSS7(inst, level, fmt, args ...)  _LOGSS7(inst, DLSS7, level, 
fmt, ## args)
+
 #define LOGPASP(asp, subsys, level, fmt, args ...) \
-   LOGP(subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args)
+   _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## 
args)
+#define LOGPAS(as, subsys, level, fmt, args ...)   \
+   _LOGSS7((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## 
args)

 /***
  * xUA Servers
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 053feca..8519ced 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -74,9 +74,6 @@
{ 0, NULL }
 };

-#define LOGSS7(inst, level, fmt, args ...) \
-   LOGP(DLSS7, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args)
-
 static int asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto)
 {
switch (proto) {

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15808
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
Gerrit-Change-Number: 15808
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange