Change in ...osmocom-bb[master]: trxcon/scheduer: fix: properly check rc of gsm0503_pdtch_encode()

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
Mon Jul 1 08:31:34 UTC 2019


fixeria has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14638 )

Change subject: trxcon/scheduer: fix: properly check rc of gsm0503_pdtch_encode()
......................................................................

trxcon/scheduer: fix: properly check rc of gsm0503_pdtch_encode()

The gsm0503_pdtch_encode() returns negative number on error,
and the amount of encoded bits in case of success.

Change-Id: I7d75141142922909330c5e86be8734bb06cd57a4
---
M src/host/trxcon/sched_lchan_pdtch.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/host/trxcon/sched_lchan_pdtch.c b/src/host/trxcon/sched_lchan_pdtch.c
index ad021a9..733e574 100644
--- a/src/host/trxcon/sched_lchan_pdtch.c
+++ b/src/host/trxcon/sched_lchan_pdtch.c
@@ -145,7 +145,7 @@
 	/* Encode payload */
 	rc = gsm0503_pdtch_encode(buffer, lchan->prim->payload,
 		lchan->prim->payload_len);
-	if (rc) {
+	if (rc < 0) {
 		LOGP(DSCHD, LOGL_ERROR, "Failed to encode L2 payload (len=%zu): %s\n",
 		     lchan->prim->payload_len, osmo_hexdump(lchan->prim->payload,
 							    lchan->prim->payload_len));

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7d75141142922909330c5e86be8734bb06cd57a4
Gerrit-Change-Number: 14638
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190701/ae352fd8/attachment.htm>


More information about the gerrit-log mailing list