mncc: remove callref argument from mncc_write()

The callref is always included in the struct mncc argument.

Change-Id: Ia156010194c1f4334a4966d01aadfd02fa7097a8
changes/01/22201/1
Alexander Couzens 2 years ago
parent e590dc15f4
commit 3b95463d09
  1. 12
      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)

Loading…
Cancel
Save