Change in osmo-sip-connector[master]: mncc: remove callref argument from mncc_write()

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Jan 14 20:27:24 UTC 2021


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/22201 )


Change subject: mncc: remove callref argument from mncc_write()
......................................................................

mncc: remove callref argument from mncc_write()

The callref is always included in the struct mncc argument.

Change-Id: Ia156010194c1f4334a4966d01aadfd02fa7097a8
---
M src/mncc.c
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/01/22201/1

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_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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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)

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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ia156010194c1f4334a4966d01aadfd02fa7097a8
Gerrit-Change-Number: 22201
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210114/1315d6a7/attachment.htm>


More information about the gerrit-log mailing list