summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-01-14 03:21:23 +0100
committerAlexander Couzens <lynxis@fe80.eu>2021-01-14 03:41:34 +0100
commit3b95463d094e3aa93deb855552e0f00c6f34c09c (patch)
treece12a11296183d366c7f690b4da296325e685eab
parente590dc15f4121bdd89a283d455b72701e804ee6c (diff)
mncc: remove callref argument from mncc_write()
The callref is always included in the struct mncc argument. Change-Id: Ia156010194c1f4334a4966d01aadfd02fa7097a8
-rw-r--r--src/mncc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 0725d4c..5456ac6 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -130,7 +130,7 @@ static void mncc_fill_header(struct gsm_mncc *mncc, uint32_t msg_type, uint32_t
}
}
-static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc, uint32_t callref)
+static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc)
{
int rc;
@@ -141,7 +141,7 @@ static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc, uint
rc = write(conn->fd.fd, mncc, sizeof(*mncc));
LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", osmo_mncc_name(mncc->msg_type));
if (rc != sizeof(*mncc)) {
- LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u)\n", callref);
+ LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u)\n", mncc->callref);
close_connection(conn);
}
}
@@ -151,7 +151,7 @@ static void mncc_send(struct mncc_connection *conn, uint32_t msg_type, uint32_t
struct gsm_mncc mncc = { 0, };
mncc_fill_header(&mncc, msg_type, callref);
- mncc_write(conn, &mncc, callref);
+ mncc_write(conn, &mncc);
}
static void mncc_rtp_send(struct mncc_connection *conn, uint32_t msg_type, uint32_t callref)
@@ -264,7 +264,7 @@ static void mncc_call_leg_ring(struct call_leg *_leg)
out_mncc.progress.location = GSM48_CAUSE_LOC_PRN_S_LU; /* Private network serving the local user */
out_mncc.progress.descr = GSM48_PROGR_IN_BAND_AVAIL; /* In-band information or appropriate pattern now available */
- mncc_write(leg->conn, &out_mncc, leg->callref);
+ mncc_write(leg->conn, &out_mncc);
/*
* If we have remote IP/port let's connect it already.
@@ -807,7 +807,7 @@ static void check_dtmf_start(struct mncc_connection *conn, const char *buf, int
mncc_fill_header(&out_mncc, MNCC_START_DTMF_RSP, leg->callref);
out_mncc.fields |= MNCC_F_KEYPAD;
out_mncc.keypad = data->keypad;
- mncc_write(conn, &out_mncc, leg->callref);
+ mncc_write(conn, &out_mncc);
}
static void check_dtmf_stop(struct mncc_connection *conn, const char *buf, int rc)
@@ -825,7 +825,7 @@ static void check_dtmf_stop(struct mncc_connection *conn, const char *buf, int r
mncc_fill_header(&out_mncc, MNCC_STOP_DTMF_RSP, leg->callref);
out_mncc.fields |= MNCC_F_KEYPAD;
out_mncc.keypad = data->keypad;
- mncc_write(conn, &out_mncc, leg->callref);
+ mncc_write(conn, &out_mncc);
}
static void check_hello(struct mncc_connection *conn, const char *buf, int rc)