pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-mgw/+/39718?usp=email )
Change subject: mgw: Move struct mgcp_request_data definition to header file
......................................................................
mgw: Move struct mgcp_request_data definition to header file
All the related handling structs are placed in the header file, let's
move them there. This will also allow accessing the rq object
information in other files.
Change-Id: I1b2831874c1aaad054ad19bf87646062ba9d4da4
---
M include/osmocom/mgcp/mgcp_protocol.h
M src/libosmo-mgcp/mgcp_protocol.c
2 files changed, 25 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/39718/1
diff --git a/include/osmocom/mgcp/mgcp_protocol.h b/include/osmocom/mgcp/mgcp_protocol.h
index 4fed248..dda0fb3 100644
--- a/include/osmocom/mgcp/mgcp_protocol.h
+++ b/include/osmocom/mgcp/mgcp_protocol.h
@@ -82,6 +82,31 @@
struct mgcp_parse_sdp sdp;
};
+/* Request data passed to the request handler */
+struct mgcp_request_data {
+ enum mgcp_verb verb;
+ /* Verb string (e.g. "MDCX") */
+ char name[4+1];
+
+ /* parsing results from the MGCP header (trans id, endpoint name ...) */
+ struct mgcp_parse_data *pdata;
+
+ /* pointer to endpoint resource (may be NULL for wildcarded requests) */
+ struct mgcp_endpoint *endp;
+
+ /* pointer to trunk resource */
+ struct mgcp_trunk *trunk;
+
+ /* set to true when the request has been classified as wildcarded */
+ bool wildcarded;
+
+ /* Set to true when the request is targeted at the "null" endpoint */
+ bool null_endp;
+
+ /* contains cause code in case of problems during endp/trunk resolution */
+ int mgcp_cause;
+};
+
/* Local connection options */
struct mgcp_lco {
char *string;
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 36d9ebf..74ed14e 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -89,31 +89,6 @@
LOGPTRUNK(trunk, cat, level, fmt, ## args); \
} while (0)
-/* Request data passed to the request handler */
-struct mgcp_request_data {
- enum mgcp_verb verb;
- /* Verb string (e.g. "MDCX") */
- char name[4+1];
-
- /* parsing results from the MGCP header (trans id, endpoint name ...) */
- struct mgcp_parse_data *pdata;
-
- /* pointer to endpoint resource (may be NULL for wildcarded requests) */
- struct mgcp_endpoint *endp;
-
- /* pointer to trunk resource */
- struct mgcp_trunk *trunk;
-
- /* set to true when the request has been classified as wildcarded */
- bool wildcarded;
-
- /* Set to true when the request is targeted at the "null" endpoint */
- bool null_endp;
-
- /* contains cause code in case of problems during endp/trunk resolution */
- int mgcp_cause;
-};
-
static struct msgb *handle_audit_endpoint(struct mgcp_request_data *data);
static struct msgb *handle_create_con(struct mgcp_request_data *data);
static struct msgb *handle_delete_con(struct mgcp_request_data *data);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/39718?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I1b2831874c1aaad054ad19bf87646062ba9d4da4
Gerrit-Change-Number: 39718
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>