Change in osmo-mgw[master]: mgcp: find better locations for LOGPCONN and LOGPENDP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Wed May 27 19:44:31 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/18537 )


Change subject: mgcp: find better locations for LOGPCONN and LOGPENDP
......................................................................

mgcp: find better locations for LOGPCONN and LOGPENDP

The logging defines LOGPCONN and LOGPENDP are currently located in
mgcp_internal.h. However, there are specific header files for conn
(mgcp_conn.h) and endpoint (mgcp_endp.h) related stuff. Lets put LOGPCON
into mgcp_conn.h and LOGPENDP in mgcp_endp.h

Change-Id: I25ff37ee8108c27d169d294fd16ddcdde9b00195
---
M include/osmocom/mgcp/mgcp_conn.h
M include/osmocom/mgcp/mgcp_endp.h
M include/osmocom/mgcp/mgcp_internal.h
3 files changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/37/18537/1

diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index b0978a6..f4e89f2 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -28,6 +28,11 @@
 #include <osmocom/core/rate_ctr.h>
 #include <inttypes.h>
 
+#define LOGPCONN(conn, cat, level, fmt, args...) \
+LOGPENDP((conn)->endp, cat, level, "CI:%s " fmt, \
+         (conn)->id, \
+         ## args)
+
 /* RTP connection related counters */
 enum {
 	IN_STREAM_ERR_TSTMP_CTR,
diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h
index 75f093d..4c2caad 100644
--- a/include/osmocom/mgcp/mgcp_endp.h
+++ b/include/osmocom/mgcp/mgcp_endp.h
@@ -27,6 +27,11 @@
 struct mgcp_conn;
 struct mgcp_endpoint;
 
+#define LOGPENDP(endp, cat, level, fmt, args...) \
+LOGP(cat, level, "endpoint:0x%x " fmt, \
+     endp ? ENDPOINT_NUMBER(endp) : -1, \
+     ## args)
+
 /* Callback type for RTP dispatcher functions
    (e.g mgcp_dispatch_rtp_bridge_cb, see below) */
 typedef int (*mgcp_dispatch_rtp_cb) (int proto, struct sockaddr_in *addr,
diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h
index e9d5d2d..cbf533f 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -340,13 +340,3 @@
 
 void mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn);
 void mgcp_conn_watchdog_kick(struct mgcp_conn *conn);
-
-#define LOGPENDP(endp, cat, level, fmt, args...) \
-LOGP(cat, level, "endpoint:0x%x " fmt, \
-     endp ? ENDPOINT_NUMBER(endp) : -1, \
-     ## args)
-
-#define LOGPCONN(conn, cat, level, fmt, args...) \
-LOGPENDP((conn)->endp, cat, level, "CI:%s " fmt, \
-         (conn)->id, \
-         ## args)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/18537
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I25ff37ee8108c27d169d294fd16ddcdde9b00195
Gerrit-Change-Number: 18537
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200527/04997fb7/attachment.htm>


More information about the gerrit-log mailing list