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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/19821 )
Change subject: ipa: Fix wrong output log formatting
......................................................................
ipa: Fix wrong output log formatting
Change-Id: I1862465e9f9a1d9f06a189641360ae7b9e03b1fc
---
M src/gsm/ipa.c
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/19821/1
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 1563d0a..7a26ba4 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -121,22 +121,25 @@
memset(dec, 0, sizeof(*dec));
+ LOGP(DLMI, LOGL_DEBUG, "Rx IPA CCM ID_GET: ");
while (len >= 2) {
len -= 2;
t_len = *cur++;
t_tag = *cur++;
if (t_len < len_offset) {
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
LOGP(DLMI, LOGL_ERROR, "minimal offset not included: %d < %d\n", t_len, len_offset);
return -EINVAL;
}
if (t_len > len + 1) {
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
LOGP(DLMI, LOGL_ERROR, "The tag does not fit: %d > %d\n", t_len, len + 1);
return -EINVAL;
}
- DEBUGPC(DLMI, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);
+ LOGPC(DLMI, LOGL_DEBUG, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);
dec->lv[t_tag].len = t_len - len_offset;
dec->lv[t_tag].val = cur;
@@ -144,6 +147,7 @@
cur += t_len - len_offset;
len -= t_len - len_offset;
}
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
return 0;
}
@@ -164,17 +168,19 @@
memset(dec, 0, sizeof(*dec));
+ LOGP(DLMI, LOGL_DEBUG, "Rx IPA CCM ID_GET: ");
while (len >= 2) {
len -= 2;
t_len = *cur++;
t_tag = *cur++;
if (t_len > len + 1) {
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
LOGP(DLMI, LOGL_ERROR, "The tag does not fit: %d > %d\n", t_len, len + 1);
return -EINVAL;
}
- DEBUGPC(DLMI, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);
+ LOGPC(DLMI, LOGL_DEBUG, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);
dec->lv[t_tag].len = t_len-1;
dec->lv[t_tag].val = cur;
@@ -182,6 +188,7 @@
cur += t_len-1;
len -= t_len-1;
}
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
return 0;
}
@@ -202,6 +209,7 @@
memset(dec, 0, sizeof(*dec));
+ LOGP(DLMI, LOGL_DEBUG, "Rx IPA CCM ID_RESP: ");
while (len >= 3) {
len -= 3;
t_len = osmo_load16be(cur);
@@ -209,6 +217,7 @@
t_tag = *cur++;
if (t_len > len + 1) {
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
LOGP(DLMI, LOGL_ERROR, "The tag does not fit: %d > %d\n", t_len, len + 1);
return -EINVAL;
}
@@ -221,6 +230,7 @@
cur += t_len-1;
len -= t_len-1;
}
+ LOGPC(DLMI, LOGL_DEBUG, "\n");
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19821
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1862465e9f9a1d9f06a189641360ae7b9e03b1fc
Gerrit-Change-Number: 19821
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200826/62265dbe/attachment.htm>