Change in ...osmocom-bb[master]: trx_toolkit/trx_sniff.py: also print header for incorrect messages

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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Aug 27 21:05:41 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/15299


Change subject: trx_toolkit/trx_sniff.py: also print header for incorrect messages
......................................................................

trx_toolkit/trx_sniff.py: also print header for incorrect messages

Change-Id: I376f1e7af46750e53305109cf4a9f64427b9960c
---
M src/target/trx_toolkit/trx_sniff.py
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/99/15299/1

diff --git a/src/target/trx_toolkit/trx_sniff.py b/src/target/trx_toolkit/trx_sniff.py
index f4b7662..7e5c2bd 100755
--- a/src/target/trx_toolkit/trx_sniff.py
+++ b/src/target/trx_toolkit/trx_sniff.py
@@ -111,7 +111,10 @@
 			msg.parse_msg(msg_raw)
 			msg.validate()
 		except ValueError as e:
-			log.warning("Ignoring an incorrect message: %s" % e)
+			desc = msg.desc_hdr()
+			if desc is "":
+				desc = "parsing error"
+			log.warning("Ignoring an incorrect message (%s): %s" % (desc, e))
 			self.cnt_burst_dropped_num += 1
 			return
 

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I376f1e7af46750e53305109cf4a9f64427b9960c
Gerrit-Change-Number: 15299
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/20190827/d7f6a53f/attachment.htm>


More information about the gerrit-log mailing list