Change in osmo-remsim[master]: bankd_pcsc: Don't log every successful SCardTransmit

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
Wed Dec 8 20:30:03 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/26468 )

Change subject: bankd_pcsc: Don't log every successful SCardTransmit
......................................................................

bankd_pcsc: Don't log every successful SCardTransmit

Contrary to other operations, SCardTransmit has a much higher frequency
and the logs should not be clobbered with "OK" lines all over the place.

Change-Id: Icf87b61d71722b2998ae78f9aee7c4ad94c46da7
---
M src/bankd/bankd_pcsc.c
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/src/bankd/bankd_pcsc.c b/src/bankd/bankd_pcsc.c
index 5bc7bb8..91eeadd 100644
--- a/src/bankd/bankd_pcsc.c
+++ b/src/bankd/bankd_pcsc.c
@@ -297,9 +297,10 @@
 	long rc;
 
 	rc = SCardTransmit(worker->reader.pcsc.hCard, pioSendPci, out, out_len, &pioRecvPci, in, in_len);
-	PCSC_ERROR(worker, rc, "SCardTransmit");
+	/* don't use PCSC_ERROR here as we don't want to log every successful SCardTransmit */
+	if (rc != SCARD_S_SUCCESS)
+		LOGW_PCSC_ERROR(worker, rc, "SCardTransmit");
 
-end:
 	return rc;
 }
 

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: Icf87b61d71722b2998ae78f9aee7c4ad94c46da7
Gerrit-Change-Number: 26468
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211208/21c536e0/attachment.htm>


More information about the gerrit-log mailing list