aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-12 14:52:45 +0200
committerHarald Welte <laforge@gnumonks.org>2017-09-05 23:13:10 +0200
commit8a03ea8a326bb60cae3400076660ee08911bb9b1 (patch)
tree4c58b48118cff8ea8ab457d39f41e0e15219f0e3 /ggsn
parent9e6dfa05580777a728ec42f2bf4bfaf9994e776a (diff)
libgtp: Remove ctrl_handle from gsn_t, replace with private context
The control interface handle never belonged into libgtp in the first place. Commit 727417dd28813c697b4820aef9f54f249e30c4b8 should not have added this to the shared library (used by sgsnemu, osmo-sgsn, ...), but to some private state of the GGSN. Introducing a private context pointer at the same location will keep ABI compatibilty. Change-Id: I4f17516dae3e04114564828a3e5f6e2ea54212a5
Diffstat (limited to 'ggsn')
-rw-r--r--ggsn/ggsn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 7614b92..d865707 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -148,7 +148,7 @@ static bool send_trap(const struct gsn_t *gsn, const struct pdp_t *pdp, const st
snprintf(val, sizeof(val), "%s,%s", imsi_gtp2str(&pdp->imsi), addrstr);
- if (ctrl_cmd_send_trap(gsn->ctrl, var, val) < 0) {
+ if (ctrl_cmd_send_trap(gsn->priv, var, val) < 0) {
LOGP(DGGSN, LOGL_ERROR, "Failed to create and send TRAP for IMSI %" PRIu64 " [%s].\n", pdp->imsi, var);
return false;
}
@@ -722,8 +722,8 @@ int main(int argc, char **argv)
gtp_set_cb_delete_context(gsn, delete_context);
gtp_set_cb_create_context_ind(gsn, create_context_ind);
- gsn->ctrl = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_GGSN, NULL);
- if (!gsn->ctrl) {
+ gsn->priv = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_GGSN, NULL);
+ if (!gsn->priv) {
LOGP(DGGSN, LOGL_ERROR, "Failed to create CTRL interface.\n");
exit(1);
}