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

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

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 21 15:47:35 UTC 2019


laforge has submitted this change and it was merged. ( 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, 13 insertions(+), 13 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 66a22b6..3ae591a 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;
 		}
 	}
@@ -410,7 +410,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;
@@ -459,7 +459,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;
@@ -495,7 +495,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;
 		}
 
@@ -515,7 +515,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;
@@ -545,7 +545,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]);
 	}
 
@@ -587,13 +587,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;
@@ -614,7 +614,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;
 	}
@@ -645,7 +645,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: 3
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/31899ff7/attachment.htm>


More information about the gerrit-log mailing list