summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-30 17:30:08 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-30 17:30:11 +0700
commit0ded4757be9ef704cb8213ca3460bf23dd46ce92 (patch)
tree7e583da5662494c7879a11a3f4f66e0f5b31c7ff /src
parentc89047d8bc916ea2417b3867014c17f397b66737 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/host/trxcon/sched_lchan_pdtch.c2
1 files changed, 1 insertions, 1 deletions
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 @@ int tx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
/* 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));