Change in ...libosmocore[master]: gsm/gsm0480.c: use DLGLOBAL and LOGL_ERROR for logging

fixeria gerrit-no-reply at lists.osmocom.org
Sun Jul 21 09:31:27 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/14861


Change subject: gsm/gsm0480.c: use DLGLOBAL and LOGL_ERROR for logging
......................................................................

gsm/gsm0480.c: use DLGLOBAL and LOGL_ERROR for logging

Change-Id: Id38272ff93fae6d2fdf39df4ffc74856d6c9a898
---
M src/gsm/gsm0480.c
1 file changed, 14 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/14861/1

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 9f546cc..cf6c30a 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -323,7 +323,7 @@
 	memset(&ss, 0, sizeof(ss));
 
 	if (len < sizeof(*hdr) + 2) {
-		LOGP(0, LOGL_DEBUG, "USSD Request is too short.\n");
+		LOGP(DLGLOBAL, LOGL_ERROR, "USSD Request is too short.\n");
 		return 0;
 	}
 
@@ -345,7 +345,7 @@
 	}
 
 	if (!rc)
-		LOGP(0, LOGL_DEBUG, "Error occurred while parsing received USSD!\n");
+		LOGP(DLGLOBAL, LOGL_ERROR, "Error occurred while parsing received USSD!\n");
 
 	return rc;
 }
@@ -362,7 +362,7 @@
 	 */
 	pdisc = gsm48_hdr_pdisc(hdr);
 	if (pdisc != GSM48_PDISC_NC_SS) {
-		LOGP(0, LOGL_ERROR, "Dropping message with "
+		LOGP(DLGLOBAL, LOGL_ERROR, "Dropping message with "
 			"unsupported pdisc=%02x\n", pdisc);
 		return 0;
 	}
@@ -385,7 +385,7 @@
 	 */
 	if (msg_type != GSM0480_MTYPE_RELEASE_COMPLETE) {
 		if (len < 2) {
-			LOGP(0, LOGL_DEBUG, "SS Request is too short.\n");
+			LOGP(DLGLOBAL, LOGL_ERROR, "SS Request is too short.\n");
 			return 0;
 		}
 	}
@@ -393,7 +393,7 @@
 	/* Table 2.1: Messages for call independent SS control */
 	switch (msg_type) {
 	case GSM0480_MTYPE_RELEASE_COMPLETE:
-		LOGP(0, LOGL_DEBUG, "SS Release Complete\n");
+		LOGP(DLGLOBAL, LOGL_ERROR, "SS Release Complete\n");
 
 		/**
 		 * Indicates that there is no decoded message.
@@ -412,7 +412,7 @@
 		rc &= parse_ss_facility(&hdr->data[0], len, req);
 		break;
 	default:
-		LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 0x%02x\n",
+		LOGP(DLGLOBAL, LOGL_ERROR, "Unknown GSM 04.80 message-type field 0x%02x\n",
 			hdr->msg_type);
 		rc = 0;
 		break;
@@ -461,7 +461,7 @@
 	case GSM0480_IE_SS_VERSION:
 		break;
 	default:
-		LOGP(0, LOGL_DEBUG, "Unhandled GSM 04.08 or 04.80 IEI 0x%02x\n",
+		LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled GSM 04.08 or 04.80 IEI 0x%02x\n",
 			iei);
 		rc = 0;
 		break;
@@ -497,7 +497,7 @@
 
 		/* Make sure that there is no overflow */
 		if (offset + 2 + component_length > length) {
-			LOGP(0, LOGL_ERROR, "Component does not fit.\n");
+			LOGP(DLGLOBAL, LOGL_ERROR, "Component does not fit.\n");
 			return -EINVAL;
 		}
 
@@ -517,7 +517,7 @@
 		case GSM0480_CTYPE_REJECT:
 			break;
 		default:
-			LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 Facility "
+			LOGP(DLGLOBAL, LOGL_ERROR, "Unknown GSM 04.80 Facility "
 				"Component Type 0x%02x\n", component_type);
 			rc = 0;
 			break;
@@ -547,7 +547,7 @@
 
 	/* mandatory part */
 	if (invoke_data[0] != GSM0480_COMPIDTAG_INVOKE_ID) {
-		LOGP(0, LOGL_DEBUG, "Unexpected GSM 04.80 Component-ID tag "
+		LOGP(DLGLOBAL, LOGL_ERROR, "Unexpected GSM 04.80 Component-ID tag "
 		     "0x%02x (expecting Invoke ID tag)\n", invoke_data[0]);
 	}
 
@@ -589,13 +589,13 @@
 						 req);
 			break;
 		default:
-			LOGP(0, LOGL_DEBUG, "GSM 04.80 operation code 0x%02x "
+			LOGP(DLGLOBAL, LOGL_ERROR, "GSM 04.80 operation code 0x%02x "
 				"is not yet handled\n", operation_code);
 			rc = 0;
 			break;
 		}
 	} else {
-		LOGP(0, LOGL_DEBUG, "Unexpected GSM 04.80 Component-ID tag 0x%02x "
+		LOGP(DLGLOBAL, LOGL_ERROR, "Unexpected GSM 04.80 Component-ID tag 0x%02x "
 			"(expecting Operation Code tag)\n",
 			invoke_data[0]);
 		rc = 0;
@@ -616,7 +616,7 @@
 
 	/* Mandatory part */
 	if (rr_data[0] != GSM0480_COMPIDTAG_INVOKE_ID) {
-		LOGP(0, LOGL_DEBUG, "Unexpected GSM 04.80 Component-ID tag "
+		LOGP(DLGLOBAL, LOGL_ERROR, "Unexpected GSM 04.80 Component-ID tag "
 		     "0x%02x (expecting Invoke ID tag)\n", rr_data[0]);
 		return 0;
 	}
@@ -647,7 +647,7 @@
 		return parse_process_uss_data(rr_data + offset + 3,
 			length - offset - 3, req);
 	default:
-		LOGP(0, LOGL_DEBUG, "GSM 04.80 operation code 0x%02x "
+		LOGP(DLGLOBAL, LOGL_ERROR, "GSM 04.80 operation code 0x%02x "
 			"is not yet handled\n", operation_code);
 		return 0;
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14861
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id38272ff93fae6d2fdf39df4ffc74856d6c9a898
Gerrit-Change-Number: 14861
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/53a9be90/attachment-0001.html>


More information about the gerrit-log mailing list