Change in ...osmo-sip-connector[master]: Cosmetic: Logging and Comments, spelling and clarity changes

keith gerrit-no-reply at lists.osmocom.org
Tue Aug 6 16:44:18 UTC 2019


keith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15072


Change subject: Cosmetic: Logging and Comments, spelling and clarity changes
......................................................................

Cosmetic: Logging and Comments, spelling and clarity changes

Also removes a comment in sdp_create_file() about the
IP address in o= and c= having to be the same.
It is completely legal in SDP and often normal for the
originator and the connection information IP to be different.

Change-Id: I057573467c335fc27ead391c0bb4c775f2f6ba0a
---
M src/call.c
M src/mncc.c
M src/sdp.c
M src/sip.c
M src/vty.c
5 files changed, 21 insertions(+), 21 deletions(-)



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

diff --git a/src/call.c b/src/call.c
index 67207e5..9f593ea 100644
--- a/src/call.c
+++ b/src/call.c
@@ -169,6 +169,6 @@
 		mncc = (struct mncc_call_leg *) leg;
 		return get_value_string(mncc_state_vals, mncc->state);
 	default:
-		return "unknown call type";
+		return "Unknown call type";
 	}
 }
diff --git a/src/mncc.c b/src/mncc.c
index 8f512d9..a60b104 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -50,7 +50,7 @@
 	struct mncc_call_leg *leg = data;
 	struct call_leg *other_leg;
 
-	LOGP(DMNCC, LOGL_ERROR, "cmd(0x%x) never arrived for leg(%u)\n",
+	LOGP(DMNCC, LOGL_ERROR, "command(0x%x) never arrived for leg(%u)\n",
 		leg->rsp_wanted, leg->callref);
 
 	other_leg = call_leg_other(&leg->base);
@@ -72,7 +72,7 @@
 static void stop_cmd_timer(struct mncc_call_leg *leg, uint32_t got_res)
 {
 	if (leg->rsp_wanted != got_res) {
-		LOGP(DMNCC, LOGL_ERROR, "Wanted rsp(%s) but got(%s) for leg(%u)\n",
+		LOGP(DMNCC, LOGL_ERROR, "Wanted response(%s) but got(%s) for leg(%u)\n",
 			osmo_mncc_name(leg->rsp_wanted), osmo_mncc_name(got_res), leg->callref);
 		return;
 	}
@@ -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 call(%u)\n", callref);
+		LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u)\n", callref);
 		close_connection(conn);
 	}
 }
@@ -164,12 +164,12 @@
 
 	rc = write(conn->fd.fd, &mncc, sizeof(mncc));
 	if (rc != sizeof(mncc)) {
-		LOGP(DMNCC, LOGL_ERROR, "Failed to send message call(%u)\n", callref);
+		LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u)\n", callref);
 		close_connection(conn);
 	}
 }
 
-/* Send a MNCC_RTP_CONNET to the MSC for the given call legs */
+/* Send a MNCC_RTP_CONNECT to the MSC for the given call legs */
 static bool send_rtp_connect(struct mncc_call_leg *leg, struct call_leg *other)
 {
 	struct gsm_mncc_rtp mncc = { 0, };
@@ -194,7 +194,7 @@
 	LOGP(DMNCC, LOGL_DEBUG, "SEND rtp_connect: IP=(%s) PORT=(%u)\n", ip_addr, mncc.port);
 	rc = write(leg->conn->fd.fd, &mncc, sizeof(mncc));
 	if (rc != sizeof(mncc)) {
-		LOGP(DMNCC, LOGL_ERROR, "Failed to send message leg(%u)\n",
+		LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u)\n",
 			leg->callref);
 		close_connection(leg->conn);
 		return false;
@@ -206,7 +206,7 @@
 
 	struct mncc_call_leg *leg;
 
-	LOGP(DMNCC, LOGL_DEBUG, "UPDATE RTP with LEG Type (%u)\n", _leg->type);
+	LOGP(DMNCC, LOGL_DEBUG, "UPDATE RTP for LEG Type (%u)\n", _leg->type);
 
 	if (_leg->type == CALL_TYPE_MNCC) {
 		leg = (struct mncc_call_leg *) _leg;
@@ -251,7 +251,7 @@
 	mncc_fill_header(&out_mncc, MNCC_ALERT_REQ, leg->callref);
 	/* GSM 04.08 10.5.4.21 */
 	out_mncc.fields |= MNCC_F_PROGRESS;
-	out_mncc.progress.coding = GSM48_CAUSE_CODING_GSM; /* Standard defined for the GSMßPLMNS */
+	out_mncc.progress.coding = GSM48_CAUSE_CODING_GSM; /* Standard defined for the GSM PLMNS */
 	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 */
 
@@ -277,7 +277,7 @@
 	/* drop it directly, if not connected */
 	if (leg->conn->state != MNCC_READY) {
 		LOGP(DMNCC, LOGL_DEBUG,
-			"MNCC not connected releasing leg leg(%u)\n", leg->callref);
+			"MNCC not connected releasing leg(%u)\n", leg->callref);
 		return mncc_leg_release(leg);
 	}
 
@@ -422,7 +422,7 @@
 	struct in_addr net = { .s_addr = leg->base.ip };
 	inet_ntop(AF_INET, &net, ip_addr, sizeof(ip_addr));
 	LOGP(DMNCC, LOGL_DEBUG,
-		"RTP cnt leg(%u) ip(%s), port(%u) pt(%u) ptm(%u)\n",
+		"RTP continue leg(%u) ip(%s), port(%u) pt(%u) ptm(%u)\n",
 		leg->callref, ip_addr, leg->base.port,
 		leg->base.payload_type, leg->base.payload_msg_type);
 	stop_cmd_timer(leg, MNCC_RTP_CREATE);
@@ -658,7 +658,7 @@
 		return;
 
 	LOGP(DMNCC, LOGL_DEBUG,
-		"leg(%u) confirmend. creating RTP socket.\n",
+		"leg(%u) confirmed. creating RTP socket.\n",
 		leg->callref);
 
 	start_cmd_timer(leg, MNCC_RTP_CREATE);
@@ -700,7 +700,7 @@
 		return;
 
 	LOGP(DMNCC, LOGL_DEBUG,
-		"leg(%u) is req hold.\n", leg->callref);
+		"leg(%u) is requesting hold.\n", leg->callref);
 	other_leg = call_leg_other(&leg->base);
 	other_leg->hold_call(other_leg);
 	mncc_send(leg->conn, MNCC_HOLD_CNF, leg->callref);
@@ -718,7 +718,7 @@
 		return;
 
 	LOGP(DMNCC, LOGL_DEBUG,
-		"leg(%u) is req unhold.\n", leg->callref);
+		"leg(%u) is requesting unhold.\n", leg->callref);
 	other_leg = call_leg_other(&leg->base);
 	other_leg->retrieve_call(other_leg);
 	mncc_send(leg->conn, MNCC_RETRIEVE_CNF, leg->callref);
diff --git a/src/sdp.c b/src/sdp.c
index 56a41f7..46330cd 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -243,7 +243,7 @@
 				"%s"
 				"a=rtpmap:%d %s/8000\r\n"
 				"%s",
-				ip_addr, ip_addr, /* never use diff. addr! */
+				ip_addr, ip_addr,
 				other->port, other->payload_type,
 				fmtp_str ? fmtp_str : "",
 				other->payload_type,
diff --git a/src/sip.c b/src/sip.c
index 350eb0b..327e90f 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -150,7 +150,7 @@
 	 * not this place. It starts with the TCH/F vs. TCH/H selection based
 	 * on the offered codecs, and then RTP_CREATE should have it. So both
 	 * are GSM related... and do not belong here. Just pick the first codec
-	 * so the IP addresss port and payload type is set.
+	 * so the IP address, port and payload type is set.
 	 */
 	if (!sdp_extract_sdp(leg, sip, true)) {
 		LOGP(DSIP, LOGL_ERROR, "leg(%p) no audio, releasing\n", leg);
@@ -395,7 +395,7 @@
 		struct sip_call_leg *leg;
 		struct call_leg *other;
 
-		LOGP(DSIP, LOGL_ERROR, "Canceled on leg(%p)\n", hmagic);
+		LOGP(DSIP, LOGL_ERROR, "Cancelled on leg(%p)\n", hmagic);
 
 		leg = (struct sip_call_leg *) hmagic;
 		other = call_leg_other(&leg->base);
@@ -453,12 +453,12 @@
 
 	switch (leg->state) {
 	case SIP_CC_INITIAL:
-		LOGP(DSIP, LOGL_NOTICE, "Canceling leg(%p) in int state\n", leg);
+		LOGP(DSIP, LOGL_NOTICE, "Cancelling leg(%p) in initial state\n", leg);
 		nua_handle_destroy(leg->nua_handle);
 		call_leg_release(&leg->base);
 		break;
 	case SIP_CC_DLG_CNFD:
-		LOGP(DSIP, LOGL_NOTICE, "Canceling leg(%p) in cnfd state\n", leg);
+		LOGP(DSIP, LOGL_NOTICE, "Cancelling leg(%p) in confirmed state\n", leg);
 		if (leg->dir == SIP_DIR_MT)
 			nua_cancel(leg->nua_handle, TAG_END());
 		else {
@@ -471,7 +471,7 @@
 		break;
 	case SIP_CC_CONNECTED:
 	case SIP_CC_HOLD:
-		LOGP(DSIP, LOGL_NOTICE, "Ending leg(%p) in con\n", leg);
+		LOGP(DSIP, LOGL_NOTICE, "Ending leg(%p) in connected state.\n", leg);
 		nua_bye(leg->nua_handle, TAG_END());
 		break;
 	}
diff --git a/src/vty.c b/src/vty.c
index c11a976..ea76d46 100644
--- a/src/vty.c
+++ b/src/vty.c
@@ -129,7 +129,7 @@
 
 DEFUN(cfg_sip_remote_addr, cfg_sip_remote_addr_cmd,
 	"remote ADDR <1-65534>",
-	"Remore information\nSIP hostname\nport\n")
+	"Remote information\nSIP hostname\nport\n")
 {
 	talloc_free((char *) g_app.sip.remote_addr);
 	g_app.sip.remote_addr = talloc_strdup(tall_mncc_ctx, argv[0]);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15072
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: I057573467c335fc27ead391c0bb4c775f2f6ba0a
Gerrit-Change-Number: 15072
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190806/32a80dd4/attachment.html>


More information about the gerrit-log mailing list